From 25c0ad0745bf84e63b8c283863eb43ebbf7badd7 Mon Sep 17 00:00:00 2001 From: chengchen-google <38364020+chengchen-google@users.noreply.github.com> Date: Wed, 1 Jul 2026 14:07:57 -0700 Subject: [PATCH 01/51] Rework speed features 2 - 5 (#5080) Anchor: research-v15.0.0 CTC: v9 Baseline: speed 0 Configuration: RA 33frames (A2 - A5) Original (research-v15.0.0) Speed 1: PSNR-YUV: +0.66% | VMAF: +0.51% | EncTime: 71.38% Speed 2: PSNR-YUV: +4.46% | VMAF: +5.00% | EncTime: 31.91% Speed 3: PSNR-YUV: +13.00% | VMAF: +14.41% | EncTime: 16.95% Speed 4: PSNR-YUV: +16.86% | VMAF: +18.32% | EncTime: 13.32% Speed 5: PSNR-YUV: +21.24% | VMAF: +23.32% | EncTime: 9.53% New Speed 1: PSNR-YUV: +0.66% | VMAF: +0.51% | EncTime: 71.38% Speed 2: PSNR-YUV: +3.37% | VMAF: +3.51% | EncTime: 32.26% Speed 3: PSNR-YUV: +8.45% | VMAF: +9.50% | EncTime: 19.44% Speed 4: PSNR-YUV: +10.48% | VMAF: +11.55% | EncTime: 14.91% Speed 5: PSNR-YUV: +11.45% | VMAF: +12.80% | EncTime: 13.95% Configuration: RA 17frames (A1) Original (research-v15.0.0) Speed 1: PSNR-YUV: +0.42% | VMAF: +0.35% | EncTime: 82.13% Speed 2: PSNR-YUV: +5.96% | VMAF: +5.92% | EncTime: 40.46% Speed 3: PSNR-YUV: +15.80% | VMAF: +16.50% | EncTime: 25.52% Speed 4: PSNR-YUV: +20.19% | VMAF: +21.10% | EncTime: 22.01% Speed 5: PSNR-YUV: +25.91% | VMAF: +30.35% | EncTime: 16.90% New Speed 1: PSNR-YUV: +0.42% | VMAF: +0.35% | EncTime: 82.13% Speed 2: PSNR-YUV: +4.27% | VMAF: +4.07% | EncTime: 42.26% Speed 3: PSNR-YUV: +9.82% | VMAF: +10.11% | EncTime: 29.48% Speed 4: PSNR-YUV: +12.02% | VMAF: +12.67% | EncTime: 24.22% Speed 5: PSNR-YUV: +13.34% | VMAF: +13.82% | EncTime: 23.12% --- av2/av2_dx_iface.c | 6 +++- av2/encoder/compound_type.c | 12 +++---- av2/encoder/partition_search.c | 17 ++++++++-- av2/encoder/rdopt.c | 55 ++----------------------------- av2/encoder/rdopt_utils.h | 8 +---- av2/encoder/speed_features.c | 59 +++++++++------------------------- av2/encoder/speed_features.h | 24 ++------------ av2/encoder/tx_search.c | 19 ++++------- 8 files changed, 51 insertions(+), 149 deletions(-) diff --git a/av2/av2_dx_iface.c b/av2/av2_dx_iface.c index 72e18e9a6d..dbb8533e0c 100644 --- a/av2/av2_dx_iface.c +++ b/av2/av2_dx_iface.c @@ -1106,7 +1106,11 @@ static avm_codec_err_t decoder_decode(avm_codec_alg_priv_t *ctx, res = decode_one(ctx, &data_start, frame_unit_size, user_priv); - if (res != AVM_CODEC_OK) return res; + if (res != AVM_CODEC_OK) { + free(frame_worker_data->pbi->obu_list); + frame_worker_data->pbi->num_obus_with_frame_unit = 0; + return res; + } set_last_frame_unit(frame_worker_data->pbi); free(frame_worker_data->pbi->obu_list); diff --git a/av2/encoder/compound_type.c b/av2/encoder/compound_type.c index 5dc2ab909a..d636ded207 100644 --- a/av2/encoder/compound_type.c +++ b/av2/encoder/compound_type.c @@ -121,8 +121,7 @@ static INLINE bool enable_wedge_interinter_search(MACROBLOCK *const x, static INLINE bool enable_wedge_interintra_search(MACROBLOCK *const x, const AV2_COMP *const cpi) { return enable_wedge_search(x, cpi) && - cpi->oxcf.comp_type_cfg.enable_interintra_wedge && - !cpi->sf.inter_sf.disable_wedge_interintra_search; + cpi->oxcf.comp_type_cfg.enable_interintra_wedge; } static int8_t estimate_wedge_sign(const AV2_COMP *cpi, const MACROBLOCK *x, @@ -582,8 +581,7 @@ static int handle_smooth_inter_intra_mode( } args->inter_intra_mode[mbmi->ref_frame[0]] = *best_interintra_mode; } - assert(IMPLIES(!cpi->oxcf.comp_type_cfg.enable_smooth_interintra || - cpi->sf.inter_sf.disable_smooth_interintra, + assert(IMPLIES(!cpi->oxcf.comp_type_cfg.enable_smooth_interintra, *best_interintra_mode != II_SMOOTH_PRED)); // Recompute prediction if required bool interintra_mode_reuse = cpi->sf.inter_sf.reuse_inter_intra_mode || @@ -634,8 +632,7 @@ static int handle_wedge_inter_intra_mode( const AV2_COMMON *const cm = &cpi->common; const int bw = block_size_wide[bsize]; const int try_smooth_interintra = - cpi->oxcf.comp_type_cfg.enable_smooth_interintra && - !cpi->sf.inter_sf.disable_smooth_interintra; + cpi->oxcf.comp_type_cfg.enable_smooth_interintra; mbmi->use_wedge_interintra = 1; assert(IMPLIES(!mbmi->warp_inter_intra, mbmi->motion_mode == INTERINTRA)); @@ -757,8 +754,7 @@ int av2_handle_inter_intra_mode(const AV2_COMP *const cpi, MACROBLOCK *const x, const MOTION_MODE org_motion_mode = mbmi->motion_mode; const MOTION_MODE org_warp_inter_intra = mbmi->warp_inter_intra; const int try_smooth_interintra = - cpi->oxcf.comp_type_cfg.enable_smooth_interintra && - !cpi->sf.inter_sf.disable_smooth_interintra; + cpi->oxcf.comp_type_cfg.enable_smooth_interintra; const int is_wedge_used = av2_is_wedge_used(bsize); const int try_wedge_interintra = diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index 5f27120720..d856f45625 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -2960,7 +2960,8 @@ static INLINE void accumulate_partition_timing_stats( static AVM_INLINE void init_allowed_partitions( PartitionSearchState *part_search_state, const PartitionCfg *part_cfg, - const int bru_skip, const bool *partition_allowed) { + const SPEED_FEATURES *const sf, const int bru_skip, + const bool *partition_allowed) { const PartitionBlkParams *blk_params = &part_search_state->part_blk_params; const BLOCK_SIZE bsize = blk_params->bsize; if (bru_skip) { @@ -2997,6 +2998,7 @@ static AVM_INLINE void init_allowed_partitions( is_bsize_geq(vert_subsize, min_partition_size); part_search_state->partition_3_allowed[HORZ] = + !sf->part_sf.disable_ext_partitions && partition_allowed[PARTITION_HORZ_3] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_HORZ_3), blk_params->min_partition_size) && @@ -3004,6 +3006,7 @@ static AVM_INLINE void init_allowed_partitions( blk_params->min_partition_size); part_search_state->partition_3_allowed[VERT] = + !sf->part_sf.disable_ext_partitions && partition_allowed[PARTITION_VERT_3] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_VERT_3), blk_params->min_partition_size) && @@ -3011,18 +3014,26 @@ static AVM_INLINE void init_allowed_partitions( blk_params->min_partition_size); part_search_state->partition_4a_allowed[HORZ] = + !sf->part_sf.disable_ext_partitions && + !sf->part_sf.disable_uneven_4way_partitions && partition_allowed[PARTITION_HORZ_4A] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_HORZ_4A), blk_params->min_partition_size); part_search_state->partition_4b_allowed[HORZ] = + !sf->part_sf.disable_ext_partitions && + !sf->part_sf.disable_uneven_4way_partitions && partition_allowed[PARTITION_HORZ_4B] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_HORZ_4B), blk_params->min_partition_size); part_search_state->partition_4a_allowed[VERT] = + !sf->part_sf.disable_ext_partitions && + !sf->part_sf.disable_uneven_4way_partitions && partition_allowed[PARTITION_VERT_4A] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_VERT_4A), blk_params->min_partition_size); part_search_state->partition_4b_allowed[VERT] = + !sf->part_sf.disable_ext_partitions && + !sf->part_sf.disable_uneven_4way_partitions && partition_allowed[PARTITION_VERT_4B] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_VERT_4B), blk_params->min_partition_size); @@ -3147,7 +3158,7 @@ static void init_partition_search_state_params( pc_tree->region_type, partition_allowed); init_allowed_partitions( - part_search_state, &cpi->oxcf.part_cfg, + part_search_state, &cpi->oxcf.part_cfg, &cpi->sf, is_bru_not_active_and_not_on_partial_border(cm, mi_col, mi_row, bsize), partition_allowed); @@ -5730,7 +5741,7 @@ bool av2_rd_pick_partition( (pc_tree->parent ? pc_tree->parent->region_type : INTRA_REGION), mi_row, mi_col, ss_x, ss_y, bsize, &pc_tree->chroma_ref_info); init_allowed_partitions( - &part_search_state, &cpi->oxcf.part_cfg, + &part_search_state, &cpi->oxcf.part_cfg, &cpi->sf, is_bru_not_active_and_not_on_partial_border(cm, mi_col, mi_row, bsize), partition_allowed); #if CONFIG_ML_PART_SPLIT diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 35e43132f1..f1655bedc6 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -6323,9 +6323,7 @@ static AVM_INLINE void rd_pick_skip_mode( assert(second_ref_frame != NONE_FRAME); const PREDICTION_MODE this_mode = NEAR_NEARMV; - if ((!cpi->oxcf.ref_frm_cfg.enable_onesided_comp || - cpi->sf.inter_sf.disable_onesided_comp) && - cpi->all_one_sided_refs) { + if (!cpi->oxcf.ref_frm_cfg.enable_onesided_comp && cpi->all_one_sided_refs) { return; } @@ -6881,8 +6879,7 @@ static AVM_INLINE int prune_ref_frame(const AV2_COMP *cpi, const MACROBLOCK *x, av2_set_ref_frame(rf, ref_frame); const int comp_pred = is_inter_ref_frame(rf[1]); if (comp_pred) { - if (!cpi->oxcf.ref_frm_cfg.enable_onesided_comp || - cpi->sf.inter_sf.disable_onesided_comp) { + if (!cpi->oxcf.ref_frm_cfg.enable_onesided_comp) { // Disable all compound references if (cpi->all_one_sided_refs) return 1; // If both references are on the same side prune @@ -7651,47 +7648,6 @@ static int compound_skip_by_single_states( return 0; } -// Check if ref frames of current block matches with given block. -static INLINE void match_ref_frame(const MB_MODE_INFO *const mbmi, - const MV_REFERENCE_FRAME *ref_frames, - int *const is_ref_match) { - if (is_inter_block(mbmi, SHARED_PART)) { - is_ref_match[0] |= ref_frames[0] == mbmi->ref_frame[0]; - is_ref_match[1] |= ref_frames[1] == mbmi->ref_frame[0]; - if (has_second_ref(mbmi)) { - is_ref_match[0] |= ref_frames[0] == mbmi->ref_frame[1]; - is_ref_match[1] |= ref_frames[1] == mbmi->ref_frame[1]; - } - } -} - -// Prune compound mode using ref frames of neighbor blocks. -static INLINE int compound_skip_using_neighbor_refs( - MACROBLOCKD *const xd, const PREDICTION_MODE this_mode, - const MV_REFERENCE_FRAME *ref_frames, int prune_compound_using_neighbors) { - // Exclude non-extended compound modes from pruning - if (this_mode == NEAR_NEARMV || this_mode == NEW_NEWMV || - this_mode == GLOBAL_GLOBALMV) - return 0; - - int is_ref_match[2] = { 0 }; // 0 - match for forward refs - // 1 - match for backward refs - // Check if ref frames of this block matches with left neighbor. - if (xd->left_available) - match_ref_frame(xd->left_mbmi, ref_frames, is_ref_match); - - // Check if ref frames of this block matches with above neighbor. - if (xd->up_available) - match_ref_frame(xd->above_mbmi, ref_frames, is_ref_match); - - // Combine ref frame match with neighbors in forward and backward refs. - const int track_ref_match = is_ref_match[0] + is_ref_match[1]; - - // Pruning based on ref frame match with neighbors. - if (track_ref_match >= prune_compound_using_neighbors) return 0; - return 1; -} - // Update best single mode for the given reference frame based on simple rd. static INLINE void update_best_single_mode(InterModeSearchState *search_state, const PREDICTION_MODE this_mode, @@ -7989,13 +7945,6 @@ static int skip_inter_mode(AV2_COMP *cpi, MACROBLOCK *x, const BLOCK_SIZE bsize, return 1; } - if (sf->inter_sf.prune_compound_using_neighbors && comp_pred) { - if (compound_skip_using_neighbor_refs( - xd, this_mode, ref_frames, - sf->inter_sf.prune_compound_using_neighbors)) - return 1; - } - if (sf->inter_sf.prune_comp_using_best_single_mode_ref && comp_pred) { if (skip_compound_using_best_single_mode_ref( this_mode, ref_frames, args->search_state->best_single_mode, diff --git a/av2/encoder/rdopt_utils.h b/av2/encoder/rdopt_utils.h index ff54a35a4c..ff31f0eb76 100644 --- a/av2/encoder/rdopt_utils.h +++ b/av2/encoder/rdopt_utils.h @@ -199,11 +199,6 @@ static INLINE int is_winner_mode_processing_enabled( sf->tx_sf.tx_type_search.fast_inter_tx_type_search && !cpi->oxcf.txfm_cfg.use_inter_dct_only) return 1; - } else { - if (sf->tx_sf.tx_type_search.fast_intra_tx_type_search && - !cpi->oxcf.txfm_cfg.use_intra_default_tx_only && - !cpi->oxcf.txfm_cfg.use_intra_dct_only) - return 1; } // Check speed feature related to winner mode processing @@ -315,8 +310,7 @@ static INLINE void set_mode_eval_params(const struct AV2_COMP *cpi, break; case MODE_EVAL: txfm_params->use_default_intra_tx_type = - (cpi->sf.tx_sf.tx_type_search.fast_intra_tx_type_search || - cpi->oxcf.txfm_cfg.use_intra_default_tx_only); + cpi->oxcf.txfm_cfg.use_intra_default_tx_only; txfm_params->use_default_inter_tx_type = cpi->sf.tx_sf.tx_type_search.fast_inter_tx_type_search; txfm_params->skip_txfm_level = diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 15e0c6a95a..48aa08ba50 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -199,10 +199,6 @@ static void set_good_speed_feature_framesize_dependent( if (speed >= 3) { sf->part_sf.use_square_partition_only_threshold = BLOCK_128X128; - if (is_480p_or_larger) { - sf->tx_sf.tx_type_search.prune_tx_type_using_stats = 1; - } - sf->part_sf.ml_early_term_after_part_split_level = 0; if (is_720p_or_larger) { @@ -223,7 +219,7 @@ static void set_good_speed_feature_framesize_dependent( } if (is_480p_or_larger) { - sf->tx_sf.tx_type_search.prune_tx_type_using_stats = 2; + sf->tx_sf.tx_type_search.prune_tx_type_using_stats = 1; } } @@ -328,8 +324,6 @@ static void set_good_speed_features_framesize_independent( sf->tx_sf.model_based_prune_tx_search_level = 1; sf->tx_sf.prune_tx_rd_eval_sec_tx_sse = true; sf->tx_sf.tx_type_search.use_reduced_intra_txset = 1; - sf->tx_sf.tx_type_search.skip_stx_search = 0; - sf->tx_sf.tx_type_search.skip_cctx_search = 0; if (cpi->twopass.fr_content_type == FC_HIGHMOTION || cpi->is_screen_content_type) { @@ -357,6 +351,9 @@ static void set_good_speed_features_framesize_independent( // speed feature accordingly sf->part_sf.simple_motion_search_split = allow_screen_content_tools ? 1 : 2; + sf->part_sf.disable_uneven_4way_partitions = true; + sf->part_sf.disable_ext_partitions = true; + if (cpi->twopass.fr_content_type == FC_HIGHMOTION || cpi->is_screen_content_type) { sf->mv_sf.exhaustive_searches_thresh = (1 << 21); @@ -378,17 +375,13 @@ static void set_good_speed_features_framesize_independent( sf->inter_sf.selective_ref_frame = 2; sf->inter_sf.skip_repeated_newmv = 1; - sf->interp_sf.use_interp_filter = 1; sf->intra_sf.prune_palette_search_level = 1; - sf->intra_sf.skip_intra_dip_search = true; sf->tx_sf.adaptive_tx_type_search_idx = 4; sf->tx_sf.adaptive_tx_partition_type_search_idx = 4; sf->tx_sf.model_based_prune_tx_search_level = 0; sf->tx_sf.tx_type_search.prune_2d_txfm_mode = TX_TYPE_PRUNE_2; - sf->tx_sf.tx_type_search.skip_tx_search = 1; - sf->rd_sf.disable_tcq = 1; sf->rd_sf.perform_coeff_opt = boosted ? 2 : 3; sf->rd_sf.tx_domain_dist_level = boosted ? 1 : 2; sf->rd_sf.tx_domain_dist_thres_level = 1; @@ -401,6 +394,14 @@ static void set_good_speed_features_framesize_independent( } if (speed >= 3) { + // These features are moved down from speed 2 + // --- Start --- + sf->interp_sf.use_interp_filter = 1; + sf->tx_sf.tx_type_search.skip_tx_search = 1; + sf->intra_sf.skip_intra_dip_search = true; + sf->rd_sf.disable_tcq = 1; + // --- End --- + sf->hl_sf.high_precision_mv_usage = CURRENT_Q; sf->hl_sf.recode_loop = ALLOW_RECODE_KFARFGF; @@ -419,7 +420,6 @@ static void set_good_speed_features_framesize_independent( sf->mv_sf.full_pixel_search_level = 1; sf->mv_sf.simple_motion_subpel_force_stop = QUARTER_PEL; sf->mv_sf.subpel_search_method = SUBPEL_TREE_PRUNED; - sf->mv_sf.search_method = DIAMOND; sf->gm_sf.num_refinement_steps = 0; @@ -431,19 +431,13 @@ static void set_good_speed_features_framesize_independent( sf->inter_sf.comp_inter_joint_search_thresh = BLOCK_SIZES_ALL; sf->inter_sf.disable_wedge_search_var_thresh = 100; sf->inter_sf.fast_interintra_wedge_search = 1; - sf->inter_sf.prune_compound_using_neighbors = 1; sf->inter_sf.prune_comp_type_by_comp_avg = 2; sf->inter_sf.disable_sb_level_mv_cost_upd = 1; - // TODO(yunqing): evaluate this speed feature for speed 1 & 2, and combine - // it with cpi->sf.disable_wedge_search_var_thresh. - sf->inter_sf.disable_wedge_interintra_search = 1; - sf->inter_sf.disable_smooth_interintra = boosted ? 0 : 1; // TODO(any): Experiment with the early exit mechanism for speeds 0, 1 and 2 // and clean-up the speed feature sf->inter_sf.perform_best_rd_based_gating_for_chroma = 1; sf->inter_sf.prune_inter_modes_based_on_tpl = boosted ? 0 : 1; sf->inter_sf.prune_comp_search_by_single_result = boosted ? 4 : 2; - sf->inter_sf.selective_ref_frame = 4; sf->inter_sf.skip_repeated_ref_mv = 1; sf->inter_sf.skip_repeated_full_newmv = 1; // TODO(any): Set this speed feature to 2 after correcting the match @@ -464,8 +458,6 @@ static void set_good_speed_features_framesize_independent( sf->tpl_sf.subpel_force_stop = QUARTER_PEL; sf->tpl_sf.search_method = DIAMOND; - sf->tx_sf.tx_type_search.skip_stx_search = 1; - sf->tx_sf.tx_type_search.skip_cctx_search = 1; sf->tx_sf.adaptive_tx_type_search_idx = boosted ? 4 : 5; sf->tx_sf.adaptive_tx_partition_type_search_idx = boosted ? 4 : 5; sf->tx_sf.tx_type_search.use_skip_flag_prediction = 2; @@ -499,12 +491,7 @@ static void set_good_speed_features_framesize_independent( sf->inter_sf.txfm_rd_gate_level = boosted ? 0 : 4; sf->inter_sf.prune_inter_modes_based_on_tpl = boosted ? 0 : 3; - sf->inter_sf.prune_compound_using_neighbors = 2; sf->inter_sf.prune_comp_using_best_single_mode_ref = 2; - sf->inter_sf.disable_smooth_interintra = 1; - sf->inter_sf.disable_onesided_comp = 1; - - sf->interp_sf.use_interp_filter = 2; sf->intra_sf.intra_uv_mode_mask[TX_16X16] = UV_INTRA_DC_H_V_CFL; sf->intra_sf.intra_uv_mode_mask[TX_32X32] = UV_INTRA_DC_H_V_CFL; @@ -516,21 +503,18 @@ static void set_good_speed_features_framesize_independent( // presets as well sf->intra_sf.skip_intra_in_interframe = 2; - sf->mv_sf.simple_motion_subpel_force_stop = HALF_PEL; - sf->tpl_sf.prune_starting_mv = 2; sf->tpl_sf.subpel_force_stop = HALF_PEL; sf->tpl_sf.search_method = FAST_BIGDIA; sf->tx_sf.tx_type_search.winner_mode_tx_type_pruning = 1; - sf->tx_sf.tx_type_search.fast_intra_tx_type_search = 1; - sf->tx_sf.tx_type_search.prune_2d_txfm_mode = TX_TYPE_PRUNE_3; + sf->tx_sf.tx_type_search.prune_2d_txfm_mode = TX_TYPE_PRUNE_2; sf->tx_sf.tx_type_search.prune_tx_type_est_rd = 1; sf->rd_sf.perform_coeff_opt = is_boosted_arf2_bwd_type ? 3 : 5; sf->rd_sf.perform_coeff_opt_based_on_satd = is_boosted_arf2_bwd_type ? 1 : 2; - sf->rd_sf.tx_domain_dist_thres_level = 2; + sf->rd_sf.tx_domain_dist_thres_level = 1; // TODO(any): Extend multi-winner mode processing support for inter frames sf->winner_mode_sf.multi_winner_mode_type = @@ -555,15 +539,10 @@ static void set_good_speed_features_framesize_independent( frame_is_intra_only(&cpi->common) ? MULTI_WINNER_MODE_FAST : MULTI_WINNER_MODE_OFF; - sf->lpf_sf.disable_lr_filter = 1; - sf->mv_sf.prune_mesh_search = 1; sf->mv_sf.warp_search_method = WARP_SEARCH_DIAMOND; sf->tpl_sf.prune_starting_mv = 3; - - sf->winner_mode_sf.dc_blk_pred_level = 1; - sf->winner_mode_sf.tx_size_search_level = USE_LARGESTALL; } if (speed >= 6) { @@ -663,6 +642,8 @@ static AVM_INLINE void init_part_sf(PARTITION_SPEED_FEATURES *part_sf) { part_sf->prune_split_ml_level = -2; // default pruning part_sf->prune_split_ml_level_inter = -1; #endif // CONFIG_ML_PART_SPLIT + part_sf->disable_ext_partitions = false; + part_sf->disable_uneven_4way_partitions = false; } static AVM_INLINE void init_mv_sf(MV_SPEED_FEATURES *mv_sf) { @@ -719,16 +700,12 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->skip_repeated_full_newmv = 0; inter_sf->inter_mode_rd_model_estimation = 0; inter_sf->prune_compound_using_single_ref = 0; - inter_sf->prune_compound_using_neighbors = 0; inter_sf->prune_comp_using_best_single_mode_ref = 0; - inter_sf->disable_onesided_comp = 0; inter_sf->prune_mode_search_simple_translation = 0; inter_sf->prune_comp_type_by_comp_avg = 0; inter_sf->disable_interinter_wedge_newmv_search = 0; inter_sf->enable_interinter_diffwtd_newmv_search = 0; - inter_sf->disable_smooth_interintra = 0; inter_sf->prune_motion_mode_level = 0; - inter_sf->disable_wedge_interintra_search = 0; inter_sf->fast_interintra_wedge_search = 0; inter_sf->prune_comp_type_by_model_rd = 0; inter_sf->perform_best_rd_based_gating_for_chroma = 0; @@ -768,7 +745,6 @@ static AVM_INLINE void init_tx_sf(TX_SPEED_FEATURES *tx_sf) { tx_sf->tx_type_search.prune_2d_txfm_mode = TX_TYPE_PRUNE_1; tx_sf->tx_type_search.use_skip_flag_prediction = 1; tx_sf->tx_type_search.use_reduced_intra_txset = 0; - tx_sf->tx_type_search.fast_intra_tx_type_search = 0; tx_sf->tx_type_search.fast_inter_tx_type_search = 0; tx_sf->tx_type_search.skip_tx_search = 0; tx_sf->tx_type_search.prune_tx_type_using_stats = 0; @@ -1054,9 +1030,6 @@ void av2_set_speed_features_framesize_independent(AV2_COMP *cpi, int speed) { cpi->common.seq_params.enable_masked_compound &= !sf->inter_sf.disable_masked_comp; - if (sf->inter_sf.disable_wedge_interintra_search) { - cpi->common.seq_params.seq_enabled_motion_modes &= ~(1 << INTERINTRA); - } if (sf->intra_sf.skip_intra_dip_search) { cpi->common.seq_params.enable_intra_dip = 0; } diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 11989675e9..8ea2d293b4 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -146,7 +146,6 @@ enum { typedef struct { TX_TYPE_PRUNE_MODE prune_2d_txfm_mode; - int fast_intra_tx_type_search; int fast_inter_tx_type_search; // prune two least frequently chosen transforms for each intra mode @@ -170,10 +169,6 @@ typedef struct { // mode evaluation and disables tx type mode pruning for winner mode // processing. int winner_mode_tx_type_pruning; - // Speed feature to disable intra secondary transform - int skip_stx_search; - // Speed feature to disable cross chroma component transform - int skip_cctx_search; } TX_TYPE_SEARCH; enum { @@ -433,6 +428,9 @@ typedef struct PARTITION_SPEED_FEATURES { int prune_split_ml_level_inter; int prune_none_with_ml; #endif // CONFIG_ML_PART_SPLIT + + bool disable_ext_partitions; + bool disable_uneven_4way_partitions; } PARTITION_SPEED_FEATURES; typedef struct MV_SPEED_FEATURES { @@ -599,13 +597,6 @@ typedef struct INTER_MODE_SPEED_FEATURES { // the single reference modes, it is one of the two best performers. int prune_compound_using_single_ref; - // Skip extended compound mode using ref frames of above and left neighbor - // blocks. - // 0 : no pruning - // 1 : prune extended compound mode (less aggressiveness) - // 2 : prune extended compound mode (high aggressiveness) - int prune_compound_using_neighbors; - // Skip extended compound mode when ref frame corresponding to NEWMV does not // have NEWMV as single mode winner. // 0 : no pruning @@ -616,9 +607,6 @@ typedef struct INTER_MODE_SPEED_FEATURES { // Based on previous ref_mv_idx search result, prune the following search. int prune_ref_mv_idx_search; - // Disable one sided compound modes. - int disable_onesided_comp; - // Prune/gate motion mode evaluation based on token based rd // during transform search for inter blocks // Values are 0 (not used) , 1 - 3 with progressively increasing @@ -631,9 +619,6 @@ typedef struct INTER_MODE_SPEED_FEATURES { // Prune warpmv with mvd search using previous frame stats. int prune_warpmv_prob_thresh; - // Enable/disable interintra wedge search. - int disable_wedge_interintra_search; - // De-couple wedge and mode search during interintra RDO. int fast_interintra_wedge_search; @@ -653,9 +638,6 @@ typedef struct INTER_MODE_SPEED_FEATURES { // ~0.1 on the lowres test set, but ~15% slower computation. int enable_interinter_diffwtd_newmv_search; - // Enable/disable smooth inter-intra mode - int disable_smooth_interintra; - // Disable interinter_wedge int disable_interinter_wedge; diff --git a/av2/encoder/tx_search.c b/av2/encoder/tx_search.c index 31d3c2b8fc..23e0a989c8 100644 --- a/av2/encoder/tx_search.c +++ b/av2/encoder/tx_search.c @@ -1804,14 +1804,10 @@ get_tx_mask(const AV2_COMP *cpi, MACROBLOCK *x, int plane, int block, if (cpi->sf.tx_sf.tx_type_search.prune_tx_type_using_stats) { // TODO(yunqing): adjust the thresholds. - static const int thresh_arr[2][FRAME_UPDATE_TYPES] = { - { 10, 15, 15, 10, 15, 15, 15, 0, 0 }, - { 10, 17, 17, 10, 17, 17, 17, 0, 0 } - }; - - const int thresh = - thresh_arr[cpi->sf.tx_sf.tx_type_search.prune_tx_type_using_stats - 1] - [update_type]; + static const int thresh_arr[FRAME_UPDATE_TYPES] = { 10, 17, 17, 10, 17, + 17, 17, 0, 0 }; + + const int thresh = thresh_arr[update_type]; uint16_t prune = 0; int max_prob = -1; int max_idx = 0; @@ -2315,7 +2311,6 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, xd->enable_ist = (is_inter_block(mbmi, xd->tree_type) ? cm->seq_params.enable_inter_ist : cm->seq_params.enable_ist) && - !cpi->sf.tx_sf.tx_type_search.skip_stx_search && !mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && !xd->lossless[mbmi->segment_id]; @@ -2648,8 +2643,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // Intra mode needs decoded pixels such that the next transform block // can use them for prediction. If cctx is enabled, this reconstruction // should be done later in search_cctx_type, when cctx type is chosen. - if (plane == AVM_PLANE_Y || !is_cctx_allowed(cm, xd) || - cpi->sf.tx_sf.tx_type_search.skip_cctx_search) { + if (plane == AVM_PLANE_Y || !is_cctx_allowed(cm, xd)) { recon_intra(cpi, x, plane, block, blk_row, blk_col, plane_bsize, tx_size, txb_ctx, skip_trellis, best_tx_type, 0, &rate_cost, best_eob); p->dqcoeff = orig_dqcoeff; @@ -4028,8 +4022,7 @@ int av2_txfm_uvrd(const AV2_COMP *const cpi, MACROBLOCK *x, RD_STATS *rd_stats, const int skip_trellis = 0; int is_cost_valid = 1; - if (is_cctx_allowed(&cpi->common, xd) && - !cpi->sf.tx_sf.tx_type_search.skip_cctx_search) { + if (is_cctx_allowed(&cpi->common, xd)) { RD_STATS this_rd_stats; int64_t chroma_ref_best_rd = ref_best_rd; if (cpi->sf.inter_sf.perform_best_rd_based_gating_for_chroma && is_inter && From 59eebce01e23f3aaca4ede36bcd71d36d92ce150 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Tue, 7 Jul 2026 19:21:40 -0700 Subject: [PATCH 02/51] Move set_sb_size() to encoder dir (#5084) --- av2/common/av2_common_int.h | 9 --------- av2/common/common_data.h | 16 ---------------- av2/encoder/block.h | 16 ++++++++++++++++ av2/encoder/encoder_utils.h | 9 +++++++++ 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/av2/common/av2_common_int.h b/av2/common/av2_common_int.h index e90a00f57b..c87601f852 100644 --- a/av2/common/av2_common_int.h +++ b/av2/common/av2_common_int.h @@ -5394,15 +5394,6 @@ static AVM_INLINE void av2_set_frame_sb_size(AV2_COMMON *cm, cm->mib_size_log2 = mi_size_wide_log2[sb_size]; } -static INLINE void set_sb_size(AV2_COMMON *cm, BLOCK_SIZE sb_size) { - SequenceHeader *const seq_params = &cm->seq_params; - seq_params->sb_size = sb_size; - seq_params->mib_size = mi_size_wide[sb_size]; - seq_params->mib_size_log2 = mi_size_wide_log2[sb_size]; - - av2_set_frame_sb_size(cm, sb_size); -} - // Sets the frame's lr specific fields in feature params depending on // which tools are enabled for the frame for the given plane. static INLINE void av2_set_lr_tools(uint8_t lr_tools_disable_mask, int plane, diff --git a/av2/common/common_data.h b/av2/common/common_data.h index cb96f419fb..5e3ecdb781 100644 --- a/av2/common/common_data.h +++ b/av2/common/common_data.h @@ -802,22 +802,6 @@ static const int av2_size_class[TX_SIZES_ALL] = { 0, 1, 2, 3, 3, 0, 0, 1, 1, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }; -static AVM_INLINE bool is_bsize_geq(BLOCK_SIZE bsize1, BLOCK_SIZE bsize2) { - if (bsize1 == BLOCK_INVALID || bsize2 == BLOCK_INVALID) { - return false; - } - return block_size_wide[bsize1] >= block_size_wide[bsize2] && - block_size_high[bsize1] >= block_size_high[bsize2]; -} - -static AVM_INLINE bool is_bsize_gt(BLOCK_SIZE bsize1, BLOCK_SIZE bsize2) { - if (bsize1 == BLOCK_INVALID || bsize2 == BLOCK_INVALID) { - return false; - } - return block_size_wide[bsize1] > block_size_wide[bsize2] && - block_size_high[bsize1] > block_size_high[bsize2]; -} - static const int fwd_tx_shift[TX_SIZES_ALL][2] = { { 1, 10 }, // TX_4X4, // 4x4 transform { 2, 10 }, // TX_8X8, // 8x8 transform diff --git a/av2/encoder/block.h b/av2/encoder/block.h index cf9bc195d7..30752e4f39 100644 --- a/av2/encoder/block.h +++ b/av2/encoder/block.h @@ -1709,6 +1709,22 @@ static INLINE int is_rect_tx_allowed(const MACROBLOCKD *xd, !xd->lossless[mbmi->segment_id]; } +static AVM_INLINE bool is_bsize_geq(BLOCK_SIZE bsize1, BLOCK_SIZE bsize2) { + if (bsize1 == BLOCK_INVALID || bsize2 == BLOCK_INVALID) { + return false; + } + return block_size_wide[bsize1] >= block_size_wide[bsize2] && + block_size_high[bsize1] >= block_size_high[bsize2]; +} + +static AVM_INLINE bool is_bsize_gt(BLOCK_SIZE bsize1, BLOCK_SIZE bsize2) { + if (bsize1 == BLOCK_INVALID || bsize2 == BLOCK_INVALID) { + return false; + } + return block_size_wide[bsize1] > block_size_wide[bsize2] && + block_size_high[bsize1] > block_size_high[bsize2]; +} + static INLINE void set_blk_skip(uint8_t txb_skip[], int blk_idx, int skip) { if (skip) txb_skip[blk_idx] |= 1UL; diff --git a/av2/encoder/encoder_utils.h b/av2/encoder/encoder_utils.h index e1c49b3edf..91c9a08908 100644 --- a/av2/encoder/encoder_utils.h +++ b/av2/encoder/encoder_utils.h @@ -69,6 +69,15 @@ static AVM_INLINE void set_mb_mi(CommonModeInfoParams *mi_params, int width, mi_size_high[mi_params->mi_alloc_bsize]); } +static INLINE void set_sb_size(AV2_COMMON *cm, BLOCK_SIZE sb_size) { + SequenceHeader *const seq_params = &cm->seq_params; + seq_params->sb_size = sb_size; + seq_params->mib_size = mi_size_wide[sb_size]; + seq_params->mib_size_log2 = mi_size_wide_log2[sb_size]; + + av2_set_frame_sb_size(cm, sb_size); +} + static AVM_INLINE void enc_free_mi(CommonModeInfoParams *mi_params) { avm_free(mi_params->mi_alloc); mi_params->mi_alloc = NULL; From f3cea3dcf8ac9b4e759c9ac6e2e02701ff22403e Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Thu, 9 Jul 2026 09:35:51 -0700 Subject: [PATCH 03/51] Move get_partition() to enc dir (#5091) These functions are only needed by the encoder. --- av2/common/av2_common_int.h | 102 --------------------------------- av2/encoder/partition_search.c | 1 + av2/encoder/partition_search.h | 82 ++++++++++++++++++++++++++ av2/encoder/tx_search.h | 19 ++++++ 4 files changed, 102 insertions(+), 102 deletions(-) diff --git a/av2/common/av2_common_int.h b/av2/common/av2_common_int.h index c87601f852..ba6514b682 100644 --- a/av2/common/av2_common_int.h +++ b/av2/common/av2_common_int.h @@ -3207,14 +3207,6 @@ static INLINE int frame_is_intra_only(const AV2_COMMON *const cm) { cm->current_frame.frame_type == INTRA_ONLY_FRAME; } -// Check whether this is chroma component of an intra region in inter frame -static INLINE int is_inter_sdp_chroma(const AV2_COMMON *const cm, - REGION_TYPE cur_region_type, - TREE_TYPE cur_tree_type) { - return !frame_is_intra_only(cm) && cur_region_type == INTRA_REGION && - cur_tree_type == CHROMA_PART; -} - static INLINE int frame_is_sframe(const AV2_COMMON *cm) { return cm->current_frame.frame_type == S_FRAME; } @@ -5178,26 +5170,6 @@ static INLINE TX_SIZE get_tx_partition_one_size(TX_PARTITION_TYPE partition, return get_tx_size(sub_txw, sub_txh); } -/* -Gets the type to signal for the 4 way split tree in the tx partition -type signaling. -*/ -static INLINE int get_split4_partition(TX_PARTITION_TYPE partition) { - switch (partition) { - case TX_PARTITION_NONE: - case TX_PARTITION_SPLIT: - case TX_PARTITION_VERT: - case TX_PARTITION_HORZ: - case TX_PARTITION_VERT4: - case TX_PARTITION_HORZ4: - case TX_PARTITION_HORZ5: - case TX_PARTITION_VERT5: return partition; - default: assert(0); - } - assert(0); - return 0; -} - /* Gets tx type group table if TX partition supports both vertical and horizontal partitions. @@ -5308,80 +5280,6 @@ static INLINE int use_tx_partition(TX_PARTITION_TYPE partition, return 0; } -// Compute the next partition in the direction of the sb_type stored in the mi -// array, starting with bsize. -static INLINE PARTITION_TYPE get_partition(const AV2_COMMON *const cm, - const int plane_type, int mi_row, - int mi_col, BLOCK_SIZE bsize) { - const CommonModeInfoParams *const mi_params = &cm->mi_params; - if (mi_row >= mi_params->mi_rows || mi_col >= mi_params->mi_cols) - return PARTITION_INVALID; - - const int offset = mi_row * mi_params->mi_stride + mi_col; - MB_MODE_INFO **mi = mi_params->mi_grid_base + offset; - const BLOCK_SIZE subsize = mi[0]->sb_type[plane_type]; - - assert(bsize < BLOCK_SIZES_ALL); - - if (subsize == bsize) return PARTITION_NONE; - - const int bhigh = mi_size_high[bsize]; - const int bwide = mi_size_wide[bsize]; - const int sshigh = mi_size_high[subsize]; - const int sswide = mi_size_wide[subsize]; - - if (bsize > BLOCK_8X8 && mi_row + bwide / 2 < mi_params->mi_rows && - mi_col + bhigh / 2 < mi_params->mi_cols) { - // In this case, the block might be using an extended partition - // type. - const MB_MODE_INFO *const mbmi_right = mi[bwide / 2]; - const MB_MODE_INFO *const mbmi_below = mi[bhigh / 2 * mi_params->mi_stride]; - - if (sswide == bwide) { - // Smaller height but same width. Is PARTITION_HORZ_4, PARTITION_HORZ or - // PARTITION_HORZ_B. To distinguish the latter two, check if the lower - // half was split. - if (sshigh * 4 == bhigh) { - return PARTITION_HORZ_4A; - } - if (mbmi_below->sb_type[plane_type] == subsize) return PARTITION_HORZ; - } else if (sshigh == bhigh) { - // Smaller width but same height. Is PARTITION_VERT_4, PARTITION_VERT or - // PARTITION_VERT_B. To distinguish the latter two, check if the right - // half was split. - if (sswide * 4 == bwide) { - return PARTITION_VERT_4A; - } - if (mbmi_right->sb_type[plane_type] == subsize) return PARTITION_VERT; - - } else { - // Smaller width and smaller height. Might be PARTITION_SPLIT or could be - // PARTITION_HORZ_A or PARTITION_VERT_A. If subsize isn't halved in both - // dimensions, we immediately know this is a split (which will recurse to - // get to subsize). Otherwise look down and to the right. With - // PARTITION_VERT_A, the right block will have height bhigh; with - // PARTITION_HORZ_A, the lower block with have width bwide. Otherwise - // it's PARTITION_SPLIT. - if (sswide * 2 != bwide || sshigh * 2 != bhigh) { - if (mi_size_wide[mbmi_below->sb_type[plane_type]] < bwide && - mi_size_high[mbmi_right->sb_type[plane_type]] < bhigh) - return PARTITION_SPLIT; - } - return PARTITION_SPLIT; - } - } - const int vert_split = sswide < bwide; - const int horz_split = sshigh < bhigh; - const int split_idx = (vert_split << 1) | horz_split; - assert(split_idx != 0); - - static const PARTITION_TYPE base_partitions[4] = { - PARTITION_INVALID, PARTITION_HORZ, PARTITION_VERT, PARTITION_SPLIT - }; - - return base_partitions[split_idx]; -} - static AVM_INLINE void av2_set_frame_sb_size(AV2_COMMON *cm, BLOCK_SIZE sb_size) { // BLOCK_256X256 gives no benefits in all intra encoding, so downsize the diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index d856f45625..201bb34cf9 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -34,6 +34,7 @@ #include "av2/encoder/partition_strategy.h" #include "av2/encoder/reconinter_enc.h" #include "av2/encoder/tokenize.h" +#include "av2/encoder/tx_search.h" #include "av2/common/reconinter.h" #include "av2/encoder/erp_ml.h" diff --git a/av2/encoder/partition_search.h b/av2/encoder/partition_search.h index e7ff3079fc..944c4dc9e7 100644 --- a/av2/encoder/partition_search.h +++ b/av2/encoder/partition_search.h @@ -55,4 +55,86 @@ void setup_block_rdmult(const AV2_COMP *const cpi, MACROBLOCK *const x, int mi_row, int mi_col, BLOCK_SIZE bsize, AQ_MODE aq_mode, MB_MODE_INFO *mbmi); +// Check whether this is chroma component of an intra region in inter frame +static INLINE int is_inter_sdp_chroma(const AV2_COMMON *const cm, + REGION_TYPE cur_region_type, + TREE_TYPE cur_tree_type) { + return !frame_is_intra_only(cm) && cur_region_type == INTRA_REGION && + cur_tree_type == CHROMA_PART; +} + +// Compute the next partition in the direction of the sb_type stored in the mi +// array, starting with bsize. +static INLINE PARTITION_TYPE get_partition(const AV2_COMMON *const cm, + const int plane_type, int mi_row, + int mi_col, BLOCK_SIZE bsize) { + const CommonModeInfoParams *const mi_params = &cm->mi_params; + if (mi_row >= mi_params->mi_rows || mi_col >= mi_params->mi_cols) + return PARTITION_INVALID; + + const int offset = mi_row * mi_params->mi_stride + mi_col; + MB_MODE_INFO **mi = mi_params->mi_grid_base + offset; + const BLOCK_SIZE subsize = mi[0]->sb_type[plane_type]; + + assert(bsize < BLOCK_SIZES_ALL); + + if (subsize == bsize) return PARTITION_NONE; + + const int bhigh = mi_size_high[bsize]; + const int bwide = mi_size_wide[bsize]; + const int sshigh = mi_size_high[subsize]; + const int sswide = mi_size_wide[subsize]; + + if (bsize > BLOCK_8X8 && mi_row + bwide / 2 < mi_params->mi_rows && + mi_col + bhigh / 2 < mi_params->mi_cols) { + // In this case, the block might be using an extended partition + // type. + const MB_MODE_INFO *const mbmi_right = mi[bwide / 2]; + const MB_MODE_INFO *const mbmi_below = mi[bhigh / 2 * mi_params->mi_stride]; + + if (sswide == bwide) { + // Smaller height but same width. Is PARTITION_HORZ_4, PARTITION_HORZ or + // PARTITION_HORZ_B. To distinguish the latter two, check if the lower + // half was split. + if (sshigh * 4 == bhigh) { + return PARTITION_HORZ_4A; + } + if (mbmi_below->sb_type[plane_type] == subsize) return PARTITION_HORZ; + } else if (sshigh == bhigh) { + // Smaller width but same height. Is PARTITION_VERT_4, PARTITION_VERT or + // PARTITION_VERT_B. To distinguish the latter two, check if the right + // half was split. + if (sswide * 4 == bwide) { + return PARTITION_VERT_4A; + } + if (mbmi_right->sb_type[plane_type] == subsize) return PARTITION_VERT; + + } else { + // Smaller width and smaller height. Might be PARTITION_SPLIT or could be + // PARTITION_HORZ_A or PARTITION_VERT_A. If subsize isn't halved in both + // dimensions, we immediately know this is a split (which will recurse to + // get to subsize). Otherwise look down and to the right. With + // PARTITION_VERT_A, the right block will have height bhigh; with + // PARTITION_HORZ_A, the lower block with have width bwide. Otherwise + // it's PARTITION_SPLIT. + if (sswide * 2 != bwide || sshigh * 2 != bhigh) { + if (mi_size_wide[mbmi_below->sb_type[plane_type]] < bwide && + mi_size_high[mbmi_right->sb_type[plane_type]] < bhigh) + return PARTITION_SPLIT; + } + return PARTITION_SPLIT; + } + } + const int vert_split = sswide < bwide; + const int horz_split = sshigh < bhigh; + const int split_idx = (vert_split << 1) | horz_split; + assert(split_idx != 0); + + static const PARTITION_TYPE base_partitions[4] = { + PARTITION_INVALID, PARTITION_HORZ, PARTITION_VERT, PARTITION_SPLIT + }; + + return base_partitions[split_idx]; +} + #endif // AVM_AV2_ENCODER_PARTITION_SEARCH_H_ diff --git a/av2/encoder/tx_search.h b/av2/encoder/tx_search.h index 27c750f798..1397405441 100644 --- a/av2/encoder/tx_search.h +++ b/av2/encoder/tx_search.h @@ -33,6 +33,25 @@ enum { FTXS_USE_TRANSFORM_DOMAIN = 1 << 2 } UENUM1BYTE(FAST_TX_SEARCH_MODE); +/* +Gets the type to signal for the 4 way split tree in the tx partition +type signaling. +*/ +static INLINE int get_split4_partition(TX_PARTITION_TYPE partition) { + switch (partition) { + case TX_PARTITION_NONE: + case TX_PARTITION_SPLIT: + case TX_PARTITION_VERT: + case TX_PARTITION_HORZ: + case TX_PARTITION_VERT4: + case TX_PARTITION_HORZ4: + case TX_PARTITION_HORZ5: + case TX_PARTITION_VERT5: return partition; + default: assert(0); + } + return 0; +} + static AVM_INLINE int inter_tx_partition_cost(const MACROBLOCK *const x, TX_PARTITION_TYPE partition, BLOCK_SIZE bsize, From 88cd18b065fcb98c16c7e18aebc0a15549ce9e67 Mon Sep 17 00:00:00 2001 From: chengchen-google <38364020+chengchen-google@users.noreply.github.com> Date: Fri, 10 Jul 2026 20:26:51 -0700 Subject: [PATCH 04/51] Partitioning bugfix (#5095) Only assign pc_tree->partitioning = partition when last_part_rdc represents a valid RDO search result. Guard the do_recon block so reconstruction is only attempted on a valid partition. Fixes #5092 Co-authored-by: Urvang Joshi --- av2/encoder/partition_search.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index 201bb34cf9..1cc4754703 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -2781,7 +2781,13 @@ void av2_rd_use_partition(AV2_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, // If last_part is better set the partitioning to that. const int plane_type = (xd->tree_type == CHROMA_PART); mib[0]->sb_type[plane_type] = bsize; - if (bsize >= BLOCK_8X8) pc_tree->partitioning = partition; + if (bsize >= BLOCK_8X8) { + if (last_part_rdc.rate < INT_MAX && last_part_rdc.dist < INT64_MAX) { + pc_tree->partitioning = partition; + } else { + pc_tree->partitioning = PARTITION_NONE; + } + } av2_restore_context(cm, x, &x_ctx, mi_row, mi_col, bsize, num_planes); @@ -2790,7 +2796,8 @@ void av2_rd_use_partition(AV2_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, if (bsize == cm->sb_size) assert(last_part_rdc.rate < INT_MAX && last_part_rdc.dist < INT64_MAX); - if (do_recon) { + if (do_recon && last_part_rdc.rate < INT_MAX && + last_part_rdc.dist < INT64_MAX) { if (bsize == cm->sb_size) { // NOTE: To get estimate for rate due to the tokens, use: // int rate_coeffs = 0; From fb72060d9dc832de60f98147a315aa31ba33e26d Mon Sep 17 00:00:00 2001 From: yeqing-wu Date: Tue, 14 Jul 2026 15:32:06 -0700 Subject: [PATCH 05/51] Inter mode search: restructure loop, prune_motion_mode (#5098) Drive the main inter-mode loop in av2_rd_pick_inter_mode_sb from a static ref-frame-centric LUT and revise the motion-mode pruning heuristic. STATS_CHANGED Anchor: commit 165345b Speed 1 (cpu-used=1): FG16 CTC (33 frames, class A1 and A2, RA) Speed 0 (cpu-used=0): VCWG CTC (130 frames, all classes, RA and LD). Speed 4 (cpu-used=4): FG16 CTC (33 frames, class A1 and A2, RA) ``` 1) This change in isolation (loop restructure + motion-mode pruning). Speed 1 (cpu-used=1), RA: +------------+------+-------+-------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+-------+-------+------+------+------+ | A1 | 0.18 | -0.03 | -0.20 | 0.14 | 95 | 101 | | A2 | 0.18 | 0.67 | 0.35 | 0.20 | 93 | 100 | | Avg w/o B2 | 0.18 | 0.47 | 0.19 | 0.18 | 94 | 100 | +------------+------+-------+-------+------+------+------+ Speed 0 (cpu-used=0), RA: +------------+-------+-------+-------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+-------+-------+-------+-------+------+------+ | A1 | -0.01 | 0.05 | -0.05 | -0.01 | 100 | 101 | | A2 | 0.01 | 0.02 | 0.06 | 0.01 | 100 | 100 | | A3 | 0.00 | 0.01 | 0.10 | 0.01 | 100 | 100 | | A4 | -0.02 | 0.01 | -0.51 | -0.03 | 99 | 100 | | A5 | -0.01 | -0.50 | 0.05 | -0.03 | 101 | 100 | | B1 | 0.05 | 0.18 | -0.04 | 0.04 | 100 | 101 | | B2 | 0.36 | 0.36 | 0.32 | 0.36 | 101 | 108 | | Avg w/o B2 | 0.01 | 0.01 | -0.03 | 0.00 | 100 | 100 | +------------+-------+-------+-------+-------+------+------+ Speed 0 (cpu-used=0), LD: +------------+-------+-------+-------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+-------+-------+-------+-------+------+------+ | A2 | 0.02 | -0.01 | -0.14 | 0.01 | 100 | 100 | | A3 | -0.03 | 0.01 | 0.63 | -0.01 | 101 | 101 | | A4 | -0.00 | -0.26 | -1.13 | -0.05 | 100 | 100 | | A5 | 0.16 | 0.60 | 0.05 | 0.16 | 102 | 103 | | B1 | 0.02 | -0.07 | -0.03 | 0.01 | 101 | 100 | | B2 | 0.36 | 0.34 | 0.61 | 0.38 | 101 | 102 | | Avg w/o B2 | 0.02 | 0.00 | -0.10 | 0.01 | 101 | 100 | +------------+-------+-------+-------+-------+------+------+ 2) For reference, the two follow-up commits (single-ref to compound pruning, and per-ref RD-based pruning for single-ref NEWMV / WARP_NEWMV) combined, Speed 1 (cpu-used=1), RA: +------------+------+-------+-------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+-------+-------+------+------+------+ | A1 | 0.20 | -0.08 | -0.06 | 0.16 | 83 | 102 | | A2 | 0.22 | 0.53 | 0.15 | 0.23 | 84 | 101 | | Avg w/o B2 | 0.22 | 0.35 | 0.09 | 0.21 | 84 | 101 | +------------+------+-------+-------+------+------+------+ 3) Overall, motion-mode pruning stacked on top of (2), Speed 1 (cpu-used=1), RA: +------------+------+------+-------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+------+-------+------+------+------+ | A1 | 0.31 | 0.29 | -0.20 | 0.28 | 80 | 101 | | A2 | 0.32 | 0.90 | 0.58 | 0.35 | 80 | 100 | | Avg w/o B2 | 0.32 | 0.72 | 0.35 | 0.33 | 80 | 100 | +------------+------+------+-------+------+------+------+ 4) Overall, motion-mode pruning, single-ref to compound pruning, and per-ref RD-based pruning for single-ref NEWMV / WARP_NEWMV combined, Speed 4 (cpu-used=4), RA: +------------+------+------+------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+------+------+------+------+------+ | A1 | 0.27 | 0.17 | 0.00 | 0.24 | 82 | 102 | | A2 | 0.42 | 0.63 | 0.15 | 0.42 | 81 | 102 | | Avg w/o B2 | 0.38 | 0.49 | 0.11 | 0.36 | 81 | 102 | +------------+------+------+------+------+------+------+ ``` --- av2/encoder/rd.h | 14 +- av2/encoder/rdopt.c | 733 ++++++++++++++++++++--------------- av2/encoder/rdopt.h | 2 +- av2/encoder/speed_features.c | 3 +- av2/encoder/speed_features.h | 7 + 5 files changed, 439 insertions(+), 320 deletions(-) diff --git a/av2/encoder/rd.h b/av2/encoder/rd.h index 933fca43e0..ebf902e9bf 100644 --- a/av2/encoder/rd.h +++ b/av2/encoder/rd.h @@ -92,9 +92,6 @@ typedef struct RD_OPT { } RD_OPT; static INLINE void av2_init_rd_stats(RD_STATS *rd_stats) { -#if CONFIG_RD_DEBUG - int plane; -#endif rd_stats->rate = 0; rd_stats->dist = 0; rd_stats->rdcost = 0; @@ -104,13 +101,12 @@ static INLINE void av2_init_rd_stats(RD_STATS *rd_stats) { #if CONFIG_RD_DEBUG // This may run into problems when monochrome video is // encoded, as there will only be 1 plane - for (plane = 0; plane < MAX_MB_PLANE; ++plane) { + for (int plane = 0; plane < MAX_MB_PLANE; ++plane) { rd_stats->txb_coeff_cost[plane] = 0; - { - int r, c; - for (r = 0; r < TXB_COEFF_COST_MAP_SIZE; ++r) - for (c = 0; c < TXB_COEFF_COST_MAP_SIZE; ++c) - rd_stats->txb_coeff_cost_map[plane][r][c] = 0; + for (int r = 0; r < TXB_COEFF_COST_MAP_SIZE; ++r) { + for (int c = 0; c < TXB_COEFF_COST_MAP_SIZE; ++c) { + rd_stats->txb_coeff_cost_map[plane][r][c] = 0; + } } } #endif diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index f1655bedc6..ede65e2e9f 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -2080,28 +2080,84 @@ static int av2_adjust_mvs_for_derive_sign(const AV2_COMP *const cpi, return (best_model_rd != INT64_MAX); } -// Reject this motion mode if modelrd is larder that the stored model rd values +// Returns 1 for the simplest inter-mode setting: SIMPLE_TRANSLATION +// (or a warp mode with no side-info tweaks), top-ranked ref frame, +// first DRL index, and no CWP/BAWP/JMVD/RefineMV modifiers. This +// setting is always fully evaluated (never pruned by the model-RD +// heuristic) so the search keeps a stable point to compare against. +static int motion_mode_is_prune_exempt(const AV2_COMMON *const cm, + const MACROBLOCKD *const xd, + BLOCK_SIZE bsize) { + const MB_MODE_INFO *const mbmi = xd->mi[0]; + + // Motion mode: only SIMPLE_TRANSLATION, or a warp mode (WARP_CAUSAL / + // WARP_DELTA / WARP_EXTEND) with all warp side-info knobs at their + // default (no warp+inter-intra combo, first warp ref candidate, no + // warp MVD, first warp precision). + if (mbmi->motion_mode != SIMPLE_TRANSLATION) { + if (!is_warp_mode(mbmi->motion_mode)) return 0; + if (mbmi->warp_inter_intra != 0 || mbmi->warp_ref_idx != 0 || + mbmi->warpmv_with_mvd_flag != 0 || mbmi->warp_precision_idx != 0) + return 0; + } + + // Reference frames: top ranked ref for single, (0, 1) pair for compound. + if (has_second_ref(mbmi)) { + if (mbmi->ref_frame[0] != 0 || mbmi->ref_frame[1] != 1) return 0; + } else if (mbmi->ref_frame[0] != 0) { + return 0; + } + + // DRL index: first candidate, for both lists when a separate DRL is used. + if (mbmi->ref_mv_idx[0] != 0) return 0; + if (has_second_drl(mbmi) && mbmi->ref_mv_idx[1] != 0) return 0; + + // CWP: equal weighting, when CWP is allowed for this mode. + if (is_cwp_allowed(mbmi) && mbmi->cwp_idx != CWP_EQUAL) return 0; + + // BAWP: off or basic on (exclude explicit-scale variants), when allowed. + if (av2_allow_bawp(cm, mbmi, xd->mi_row, xd->mi_col) && + mbmi->bawp_flag[0] > 1) + return 0; + + // JMVD scale index: no scaling, when joint-MVD coding is used. + if (is_joint_mvd_coding_mode(mbmi->mode) && mbmi->jmvd_scale_mode != 0) + return 0; + + // RefineMV: disabled, when refinemv is allowed. + if (is_refinemv_allowed(cm, mbmi, bsize) && mbmi->refinemv_flag != 0) + return 0; + + return 1; +} + +// Reject this motion mode if modelrd is larger than the stored model rd values. +// Maintains a sorted list of the best model rd values seen so far. // Return 1 means reject this mode // Return 0 means compute full RD static int prune_motion_mode(int64_t this_model_rd, - int64_t top_motion_mode_model_rd[]) { - const double thresh_top = 1.00; + int64_t top_motion_mode_model_rd[], + const AV2_COMMON *const cm, + const MACROBLOCKD *const xd, BLOCK_SIZE bsize) { + // top_motion_mode_model_rd[] holds the smallest model RDs seen so far in + // ascending order, padded with the INT64_MAX sentinel. Insert this_model_rd + // if it ranks among them. for (int i = 0; i < TOP_MOTION_MODE_MODEL_COUNT; i++) { if (this_model_rd < top_motion_mode_model_rd[i]) { for (int j = TOP_MOTION_MODE_MODEL_COUNT - 1; j > i; j--) { top_motion_mode_model_rd[j] = top_motion_mode_model_rd[j - 1]; } top_motion_mode_model_rd[i] = this_model_rd; - break; + return 0; // Ranked among the best -> compute full RD. } } - if (top_motion_mode_model_rd[TOP_MOTION_MODE_MODEL_COUNT - 1] != INT64_MAX && - this_model_rd > - thresh_top * - top_motion_mode_model_rd[TOP_MOTION_MODE_MODEL_COUNT - 1]) - return 1; - - return 0; + // Never prune the prune-exempt setting, even when its model RD does not rank. + if (motion_mode_is_prune_exempt(cm, xd, bsize)) return 0; + // Did not rank: this_model_rd is >= every kept value. Prune only when it + // strictly exceeds the largest kept RD. An unfilled pool keeps the INT64_MAX + // sentinel in the last slot, which can never be exceeded, so it returns 0. + return this_model_rd > + top_motion_mode_model_rd[TOP_MOTION_MODE_MODEL_COUNT - 1]; } // Handle SIMPLE_TRANSLATION motion mode: adjust MVD sign if needed. @@ -2802,7 +2858,8 @@ static AVM_INLINE int evaluate_motion_mode_trial( NULL, &curr_sse, NULL, NULL, NULL); int64_t est_rd = RDCOST(x->rdmult, rd_stats->rate + est_residue_cost, est_dist); - if (prune_motion_mode(est_rd, top_motion_mode_model_rd)) return -1; + if (prune_motion_mode(est_rd, top_motion_mode_model_rd, cm, xd, bsize)) + return -1; } // Do transform search @@ -7123,8 +7180,6 @@ static AVM_INLINE void init_inter_mode_search_state( static bool mask_says_skip(const mode_skip_mask_t *mode_skip_mask, const MV_REFERENCE_FRAME *ref_frame, const PREDICTION_MODE this_mode) { - if (is_tip_ref_frame(ref_frame[0])) return false; - if (mode_skip_mask->pred_modes[COMPACT_INDEX0_NRS(ref_frame[0])] & ((int64_t)1 << this_mode)) { return true; @@ -7134,33 +7189,6 @@ static bool mask_says_skip(const mode_skip_mask_t *mode_skip_mask, [COMPACT_INDEX0_NRS(ref_frame[1]) + 1]; } -static int inter_mode_compatible_skip(const AV2_COMP *cpi, const MACROBLOCK *x, - BLOCK_SIZE bsize, - PREDICTION_MODE curr_mode, - const MV_REFERENCE_FRAME *ref_frames) { - const int comp_pred = is_inter_ref_frame(ref_frames[1]); - if (comp_pred) { - if (!is_comp_ref_allowed(bsize)) return 1; - if (!(cpi->common.ref_frame_flags & (1 << ref_frames[1]))) return 1; - - const AV2_COMMON *const cm = &cpi->common; - if (frame_is_intra_only(cm)) return 1; - - const CurrentFrame *const current_frame = &cm->current_frame; - if (current_frame->reference_mode == SINGLE_REFERENCE) return 1; - - (void)x; - } - - if (is_inter_ref_frame(ref_frames[0]) && ref_frames[1] == INTRA_FRAME) { - // Mode must be compatible - if (!is_interintra_allowed_bsize(bsize)) return 1; - if (!is_interintra_allowed_mode(curr_mode)) return 1; - } - - return 0; -} - static uint64_t fetch_picked_ref_frames_mask(const MACROBLOCK *const x, BLOCK_SIZE bsize, int mib_size) { const int sb_size_mask = mib_size - 1; @@ -7379,6 +7407,7 @@ static INLINE void init_mbmi(MB_MODE_INFO *mbmi, PREDICTION_MODE curr_mode, } set_default_interp_filters(mbmi, cm, xd, cm->features.interp_filter); mbmi->use_intrabc[xd->tree_type == CHROMA_PART] = 0; + mbmi->use_intrabc[xd->tree_type != CHROMA_PART] = 0; mbmi->morph_pred = 0; mbmi->local_rest_type = 1; mbmi->local_ccso_blk_flag = 1; @@ -7398,6 +7427,7 @@ static INLINE void init_mbmi(MB_MODE_INFO *mbmi, PREDICTION_MODE curr_mode, mbmi->bawp_flag[0] = 0; mbmi->bawp_flag[1] = 0; mbmi->jmvd_scale_mode = 0; + mbmi->interinter_comp.type = COMPOUND_AVERAGE; } static AVM_INLINE void collect_single_states(const AV2_COMMON *const cm, @@ -7865,8 +7895,8 @@ typedef struct { } InterModeSFArgs; /*!\endcond */ -static int skip_inter_mode(AV2_COMP *cpi, MACROBLOCK *x, const BLOCK_SIZE bsize, - int64_t *ref_frame_rd, PREDICTION_MODE this_mode, +static int skip_inter_mode(AV2_COMP *cpi, MACROBLOCK *x, int64_t *ref_frame_rd, + PREDICTION_MODE this_mode, const MV_REFERENCE_FRAME *ref_frames, InterModeSFArgs *args) { const SPEED_FEATURES *const sf = &cpi->sf; @@ -7875,18 +7905,7 @@ static int skip_inter_mode(AV2_COMP *cpi, MACROBLOCK *x, const BLOCK_SIZE bsize, const MV_REFERENCE_FRAME second_ref_frame = ref_frames[1]; const int comp_pred = is_inter_ref_frame(second_ref_frame); - if (is_tip_ref_frame(ref_frame) && - cpi->common.features.tip_frame_mode == TIP_FRAME_DISABLED) { - return 1; - } else if (is_tip_ref_frame(ref_frame)) { - return 0; - } - - // Check if this mode should be skipped because it is incompatible with the - // current frame - if (inter_mode_compatible_skip(cpi, x, bsize, this_mode, ref_frames)) - return 1; - + if (is_tip_ref_frame(ref_frame)) return 0; if (this_mode == WARPMV) return 0; const int ret = inter_mode_search_order_independent_skip( @@ -7913,23 +7932,18 @@ static int skip_inter_mode(AV2_COMP *cpi, MACROBLOCK *x, const BLOCK_SIZE bsize, if (args->search_state->best_rd < mode_threshold) return 1; + if (!comp_pred) return 0; + // Skip this compound mode based on the RD results from the single // prediction modes if (sf->inter_sf.prune_comp_search_by_single_result > 0 && - this_mode < NEAR_NEARMV_OPTFLOW && comp_pred && - !has_second_drl(xd->mi[0])) { + this_mode < NEAR_NEARMV_OPTFLOW && !has_second_drl(xd->mi[0])) { if (compound_skip_by_single_states(cpi, args->search_state, this_mode, ref_frame, second_ref_frame, x)) return 1; } - // Speed features to prune out INTRA frames - if (ref_frame == INTRA_FRAME) { - // Intra modes will be handled in another loop later - return 1; - } - - if (sf->inter_sf.prune_compound_using_single_ref && comp_pred) { + if (sf->inter_sf.prune_compound_using_single_ref) { // After we done with single reference modes, find the 2nd best RD // for a reference frame. Only search compound modes that have a reference // frame at least as good as 110% the best one. @@ -7945,7 +7959,7 @@ static int skip_inter_mode(AV2_COMP *cpi, MACROBLOCK *x, const BLOCK_SIZE bsize, return 1; } - if (sf->inter_sf.prune_comp_using_best_single_mode_ref && comp_pred) { + if (sf->inter_sf.prune_comp_using_best_single_mode_ref) { if (skip_compound_using_best_single_mode_ref( this_mode, ref_frames, args->search_state->best_single_mode, sf->inter_sf.prune_comp_using_best_single_mode_ref)) @@ -8152,20 +8166,6 @@ static void handle_winner_cand( } } -static INLINE int is_tip_mode(PREDICTION_MODE mode) { - return (mode == NEARMV || mode == NEWMV); -} - -static INLINE int is_compound_mode_disallowed(PREDICTION_MODE mode, - int ref_frame0, int ref_frame1) { - if (ref_frame0 == ref_frame1 && - (mode == NEW_NEARMV || mode == NEW_NEARMV_OPTFLOW)) { - return 1; - } - - return 0; -} - // Initialize the table that stores best RD Costs of NONE transform partition static INLINE void init_top_tx_part_rd_for_inter_modes( MACROBLOCK *const x, bool prune_inter_tx_part_rd_eval) { @@ -8360,6 +8360,127 @@ static void av2_evaluate_intra_modes_in_inter_frame( } } +/*!\cond */ +// (mode, rf0, rf1) tuple describing one entry of the ref-frame-centric +// evaluation order. rf1 == NONE_FRAME marks a single-reference entry; +// rf0 == TIP_FRAME marks a TIP entry; rf0 == rf1 marks a same-ref compound +// entry. +typedef struct { + PREDICTION_MODE mode; + MV_REFERENCE_FRAME rf0; + MV_REFERENCE_FRAME rf1; +} MODE_REF_TUPLE; +/*!\endcond */ + +// Pre-computed (mode, rf0, rf1) evaluation order used by +// av2_rd_pick_inter_mode_sb. +// +// Traversal: +// 1. TIP entries: TIP/NEARMV, TIP/NEWMV. +// 2. For max_ref = 0..INTER_REFS_PER_FRAME-1 (= 0..6): +// a. All single inter modes with (rf0=max_ref, rf1=NONE_FRAME). +// b. All compound inter modes with (rf0, rf1=max_ref) for +// rf0 in [0, min(max_ref, RANKED_REF0_TO_PRUNE)). +// RANKED_REF0_TO_PRUNE = 3, so rf0 ∈ {0, 1, 2} for max_ref >= 3. +// c. Same-ref compound modes (rf0=max_ref, rf1=max_ref) only when +// max_ref < num_same_ref_compound (= 2, so max_ref ∈ {0, 1}). +// Restricted to modes that permit same-ref compound: +// NEAR_NEARMV, NEAR_NEWMV, GLOBAL_GLOBALMV, NEW_NEWMV. +// +// Frame-level feasibility checks (tip_allowed, comp_ref_allowed, opfl, +// joint MVD, BRU, ref_frame_flags, warpmv, global_motion, etc.) still +// apply at the use site via existing skip/continue logic. +// clang-format off +#define MODE_REF_SINGLE_GROUP(rf) \ + { NEARMV, (rf), NONE_FRAME }, \ + { GLOBALMV, (rf), NONE_FRAME }, \ + { NEWMV, (rf), NONE_FRAME }, \ + { WARPMV, (rf), NONE_FRAME }, \ + { WARP_NEWMV, (rf), NONE_FRAME } + +#define MODE_REF_COMPOUND_GROUP(rf0, rf1) \ + { NEAR_NEARMV, (rf0), (rf1) }, \ + { NEAR_NEWMV, (rf0), (rf1) }, \ + { NEW_NEARMV, (rf0), (rf1) }, \ + { GLOBAL_GLOBALMV, (rf0), (rf1) }, \ + { NEW_NEWMV, (rf0), (rf1) }, \ + { JOINT_NEWMV, (rf0), (rf1) }, \ + { NEAR_NEARMV_OPTFLOW, (rf0), (rf1) }, \ + { NEAR_NEWMV_OPTFLOW, (rf0), (rf1) }, \ + { NEW_NEARMV_OPTFLOW, (rf0), (rf1) }, \ + { NEW_NEWMV_OPTFLOW, (rf0), (rf1) }, \ + { JOINT_NEWMV_OPTFLOW, (rf0), (rf1) } + +#define MODE_REF_SAME_REF_GROUP(rf) \ + { NEAR_NEARMV, (rf), (rf) }, \ + { NEAR_NEWMV, (rf), (rf) }, \ + { GLOBAL_GLOBALMV, (rf), (rf) }, \ + { NEW_NEWMV, (rf), (rf) } + +#define MODE_REF_TIP_GROUP \ + { NEARMV, TIP_FRAME, NONE_FRAME }, \ + { NEWMV, TIP_FRAME, NONE_FRAME } + +static const MODE_REF_TUPLE ref_frame_centric_eval_order[] = { + // TIP entries : TIP/NEARMV, TIP/NEWMV + MODE_REF_TIP_GROUP, + + // max_ref = 0 : single, same-ref(0,0) + MODE_REF_SINGLE_GROUP(0), + MODE_REF_SAME_REF_GROUP(0), + + // max_ref = 1 : single, cross(0,1), same-ref(1,1) + MODE_REF_SINGLE_GROUP(1), + MODE_REF_COMPOUND_GROUP(0, 1), + MODE_REF_SAME_REF_GROUP(1), + + // max_ref = 2 : single, cross(0,2), cross(1,2) + MODE_REF_SINGLE_GROUP(2), + MODE_REF_COMPOUND_GROUP(0, 2), + MODE_REF_COMPOUND_GROUP(1, 2), + + // max_ref = 3 : single, cross(0,3), cross(1,3), cross(2,3) + MODE_REF_SINGLE_GROUP(3), + MODE_REF_COMPOUND_GROUP(0, 3), + MODE_REF_COMPOUND_GROUP(1, 3), + MODE_REF_COMPOUND_GROUP(2, 3), + + // max_ref = 4 : single, cross(0..2, 4) (rf0 clamped by RANKED_REF0_TO_PRUNE) + MODE_REF_SINGLE_GROUP(4), + MODE_REF_COMPOUND_GROUP(0, 4), + MODE_REF_COMPOUND_GROUP(1, 4), + MODE_REF_COMPOUND_GROUP(2, 4), + + // max_ref = 5 : single, cross(0..2, 5) + MODE_REF_SINGLE_GROUP(5), + MODE_REF_COMPOUND_GROUP(0, 5), + MODE_REF_COMPOUND_GROUP(1, 5), + MODE_REF_COMPOUND_GROUP(2, 5), + + // max_ref = 6 : single, cross(0..2, 6) + MODE_REF_SINGLE_GROUP(6), + MODE_REF_COMPOUND_GROUP(0, 6), + MODE_REF_COMPOUND_GROUP(1, 6), + MODE_REF_COMPOUND_GROUP(2, 6), +}; +#undef MODE_REF_SINGLE_GROUP +#undef MODE_REF_COMPOUND_GROUP +#undef MODE_REF_SAME_REF_GROUP +#undef MODE_REF_TIP_GROUP +// clang-format on + +static const int ref_frame_centric_eval_order_num = + (int)(sizeof(ref_frame_centric_eval_order) / + sizeof(ref_frame_centric_eval_order[0])); +// Tripwire: if the LUT above grows or shrinks, this assert fires so any +// caller-side dependencies on the count are re-audited before shipping. +// Update the literal deliberately. +static_assert(sizeof(ref_frame_centric_eval_order) / + sizeof(ref_frame_centric_eval_order[0]) == + 210, + "ref_frame_centric_eval_order size changed; audit callers."); + +// TODO(chiyotsai@google.com): See the todo for av2_rd_pick_intra_mode_sb. void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, struct TileDataEnc *tile_data, struct macroblock *x, struct RD_STATS *rd_cost, @@ -8387,9 +8508,9 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, INTERINTRA_MODES, INTERINTRA_MODES, INTERINTRA_MODES, INTERINTRA_MODES }; HandleInterModeArgs args = { - NULL, - NULL, - NULL, + search_state.single_newmv, + search_state.single_newmv_rate, + search_state.single_newmv_valid, search_state.modelled_rd, INT_MAX, INT_MAX, @@ -8641,254 +8762,248 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, mode_thresh_mul_fact, &num_single_modes_processed, 0 }; - // This is the main loop of this function. It loops over all possible modes - // and calls handle_inter_mode() to compute the RD for each. - // Here midx is just an iterator index that should not be used by itself - // except to keep track of the number of modes searched. It should be used - // with av2_default_mode_order to get the enum that defines the mode, which - // can be used with av2_mode_defs to get the prediction mode and the ref - // frames. - for (PREDICTION_MODE this_mode = 0; this_mode < MB_MODE_COUNT; ++this_mode) { - int64_t top_motion_mode_model_rd[TOP_MOTION_MODE_MODEL_COUNT]; - uint8_t enable_tx_prune = do_tx_search; - if (enable_tx_prune) { + + const uint8_t enable_tx_prune = do_tx_search; + // Pool of top model RDs used by prune_motion_mode(). When + // share_across_modes is 1, every prediction mode shares pool_shared + // (smaller working set, more pruning). When 0, each prediction mode + // keeps its own row in pool_per_mode. + const int share_across_modes = cpi->sf.inter_sf.share_motion_mode_prune_pool; + int64_t pool_shared[TOP_MOTION_MODE_MODEL_COUNT]; + int64_t pool_per_mode[MB_MODE_COUNT][TOP_MOTION_MODE_MODEL_COUNT]; + if (enable_tx_prune) { + if (share_across_modes) { for (int k = 0; k < TOP_MOTION_MODE_MODEL_COUNT; k++) { - top_motion_mode_model_rd[k] = INT64_MAX; + pool_shared[k] = INT64_MAX; + } + } else { + for (int m = 0; m < MB_MODE_COUNT; m++) { + for (int k = 0; k < TOP_MOTION_MODE_MODEL_COUNT; k++) { + pool_per_mode[m][k] = INT64_MAX; + } } } + } + // This is the main loop of this function. It loops over all inter modes + // and calls handle_inter_mode() to compute the RD for each. - for (MV_REFERENCE_FRAME rf = NONE_FRAME; - rf < cm->ref_frames_info.num_total_refs + 1; ++rf) { - const MV_REFERENCE_FRAME ref_frame = - (rf == NONE_FRAME) - ? INTRA_FRAME - : ((rf == cm->ref_frames_info.num_total_refs) ? TIP_FRAME : rf); - if (is_tip_ref_frame(ref_frame) && - (!is_tip_allowed(cm, xd) || !is_tip_mode(this_mode))) + // Intra modes are evaluated separately after this loop. + const int prune_comp_by_single = + sf->inter_sf.prune_comp_search_by_single_result > 0; + const int prune_comp_best_single = + sf->inter_sf.prune_comp_using_best_single_mode_ref > 0; + const int prune_comp_using_single_ref = + sf->inter_sf.prune_compound_using_single_ref; + const int motion_mode_winner = + cpi->sf.winner_mode_sf.motion_mode_for_winner_cand; + const int reference_mode_select = + cm->current_frame.reference_mode == REFERENCE_MODE_SELECT; + + const int num_total_refs = cm->ref_frames_info.num_total_refs; + // Suppress TIP on frames that must decode correctly under base-only + // implicit-ref-map decode: base-layer frames (mlayer_id == 0) of a + // multi-layer sequence (number_mlayers > 1) using implicit ref-map + // signalling. TIP's virtual reference is derived from frames that may + // be absent under such decode, so a TIP-winning block on these frames + // would not be correctly decodable. + const int must_avoid_tip_for_base_only_decode = + cm->number_mlayers > 1 && cm->mlayer_id == 0 && + !cm->seq_params.enable_explicit_ref_frame_map; + const int tip_allowed = + is_tip_allowed(cm, xd) && !must_avoid_tip_for_base_only_decode; + const int comp_ref_allowed = + cm->current_frame.reference_mode != SINGLE_REFERENCE && + is_comp_ref_allowed(bsize); + const int warpmv_allowed = + (cm->features.enabled_motion_modes & (1 << WARP_DELTA)) != 0 && + cm->features.allow_warpmv_mode && is_warpmv_allowed_bsize(bsize); + const int warp_newmv_allowed = + is_motion_variation_allowed_bsize(bsize, mi_row, mi_col) && + !xd->cur_frame_force_integer_mv; + const int thin_4xn_nx4 = is_thin_4xn_nx4_block(bsize); + // OPTFLOW modes are only useful with REFINE_SWITCHABLE; REFINE_NONE disables + // opfl entirely, REFINE_ALL applies opfl to all compound (explicit modes + // redundant), and sframes/seq-level disable also kill it. + const int opfl_modes_allowed = + cm->seq_params.enable_opfl_refine != AVM_OPFL_REFINE_NONE && + cm->features.opfl_refine_type == REFINE_SWITCHABLE && + !frame_is_sframe(cm) && !thin_4xn_nx4; + + for (int mode_refs_pair_idx = 0; + mode_refs_pair_idx < ref_frame_centric_eval_order_num; + ++mode_refs_pair_idx) { + if (bsize == BLOCK_4X4) break; + const PREDICTION_MODE this_mode = + ref_frame_centric_eval_order[mode_refs_pair_idx].mode; + const MV_REFERENCE_FRAME ref_frame = + ref_frame_centric_eval_order[mode_refs_pair_idx].rf0; + const MV_REFERENCE_FRAME second_ref_frame = + ref_frame_centric_eval_order[mode_refs_pair_idx].rf1; + const int is_comp_mode = (second_ref_frame != NONE_FRAME); + const int is_single_pred = !is_comp_mode; + const int comp_pred = is_comp_mode; + + // Gate LUT entries by runtime ref-frame availability. + if (is_tip_ref_frame(ref_frame)) { + if (!tip_allowed) continue; + } else if ((int)ref_frame >= num_total_refs) { + continue; + } + if (is_comp_mode) { + if (!comp_ref_allowed) continue; + if ((int)second_ref_frame >= num_total_refs) continue; + // Same-ref compound only when permitted at runtime. + if (ref_frame == second_ref_frame && + (int)ref_frame >= cm->ref_frames_info.num_same_ref_compound) continue; + } - if (this_mode < INTRA_MODE_END && ref_frame != INTRA_FRAME) continue; - if (this_mode >= INTRA_MODE_END && ref_frame == INTRA_FRAME) continue; - if (ref_frame != INTRA_FRAME && bsize == BLOCK_4X4) { - continue; // disable 4x4 inter blocks - } - for (MV_REFERENCE_FRAME second_rf = NONE_FRAME; - second_rf < cm->ref_frames_info.num_total_refs; ++second_rf) { - MV_REFERENCE_FRAME second_ref_frame = second_rf; - // write this to a function - if (cm->bru.enabled) { - assert(xd->sbi->sb_active_mode == BRU_ACTIVE_SB); - if (xd->sbi->sb_active_mode == BRU_ACTIVE_SB) { - if (ref_frame != INVALID_IDX && - cm->bru.update_ref_idx == ref_frame) { - continue; - } - if (second_ref_frame != INVALID_IDX && - cm->bru.update_ref_idx == second_ref_frame) { - continue; - } - } - } - if ((ref_frame == second_ref_frame) && - (is_joint_mvd_coding_mode(this_mode))) - continue; - - if (second_ref_frame != NONE_FRAME && this_mode < COMP_INTER_MODE_START) - continue; - if (this_mode >= COMP_INTER_MODE_START && - this_mode < COMP_INTER_MODE_END && second_ref_frame == NONE_FRAME) - continue; - if (is_inter_ref_frame(second_ref_frame) && - ((second_ref_frame < ref_frame) || - is_compound_mode_disallowed(this_mode, ref_frame, - second_ref_frame) || - ((second_ref_frame == ref_frame) && - (ref_frame >= cm->ref_frames_info.num_same_ref_compound)))) - continue; - - if (is_tip_ref_frame(ref_frame) && second_ref_frame != NONE_FRAME) - continue; - - const MV_REFERENCE_FRAME ref_frames[2] = { ref_frame, - second_ref_frame }; - - const int is_single_pred = - ref_frame != INTRA_FRAME && second_ref_frame == NONE_FRAME; - const int comp_pred = is_inter_ref_frame(second_ref_frame); - - init_mbmi(mbmi, this_mode, ref_frames, cm, xd, xd->sbi); - - if ((this_mode == WARPMV || this_mode == WARP_NEWMV) && - !is_warpmv_mode_allowed(cm, mbmi, bsize)) - continue; - - if (this_mode == WARP_NEWMV && - !is_warp_newmv_allowed(cm, xd, mbmi, bsize)) - continue; - - set_mv_precision(mbmi, mbmi->max_mv_precision); - if (is_pb_mv_precision_active(cm, mbmi, bsize)) - set_most_probable_mv_precision(cm, mbmi, bsize); + if (this_mode == WARPMV && !warpmv_allowed) continue; + if (this_mode == WARP_NEWMV && (!warpmv_allowed || !warp_newmv_allowed)) + continue; + if (this_mode >= NEAR_NEARMV_OPTFLOW && !opfl_modes_allowed) continue; + if (is_joint_mvd_coding_mode(this_mode) && + cm->seq_params.enable_joint_mvd == 0) + continue; - // Initialize compound average type for optical flow refinement - mbmi->interinter_comp.type = COMPOUND_AVERAGE; + const int num_amvd_modes = + 1 + (cm->seq_params.enable_adaptive_mvd && allow_amvd_mode(this_mode)); + // Asymmetric NEAR/NEW compound modes default to AMVD on, invert the flag + const int amvd_inverted = + (this_mode == NEW_NEARMV || this_mode == NEAR_NEWMV || + this_mode == NEAR_NEWMV_OPTFLOW || this_mode == NEW_NEARMV_OPTFLOW); - // Optical flow compound modes are only enabled - // when prediction is bi-directional - if (this_mode >= NEAR_NEARMV_OPTFLOW && - (!opfl_allowed_cur_refs_bsize(cm, xd, mbmi) || - cm->features.opfl_refine_type == REFINE_ALL)) - continue; - // Optical flow is disabled for 4xn/nx4 blocks - if (is_thin_4xn_nx4_block(bsize) && (this_mode >= NEAR_NEARMV_OPTFLOW)) + if (cm->bru.enabled) { + assert(xd->sbi->sb_active_mode == BRU_ACTIVE_SB); + if (xd->sbi->sb_active_mode == BRU_ACTIVE_SB) { + if (cm->bru.update_ref_idx == ref_frame) continue; + if (second_ref_frame != NONE_FRAME && + cm->bru.update_ref_idx == second_ref_frame) continue; + } + } - int num_amvd_modes = 1 + allow_amvd_mode(mbmi->mode); - for (int use_amvd_mode = 0; use_amvd_mode < num_amvd_modes; - ++use_amvd_mode) { - mbmi->use_amvd = use_amvd_mode; - - if (mbmi->mode == NEW_NEARMV || mbmi->mode == NEAR_NEWMV || - mbmi->mode == NEAR_NEWMV_OPTFLOW || - mbmi->mode == NEW_NEARMV_OPTFLOW) { - mbmi->use_amvd = use_amvd_mode ? 0 : 1; - - if (!mbmi->use_amvd && - search_state.best_mbmode.mode != mbmi->mode) { - continue; - } - } - - txfm_info->skip_txfm = 0; - num_single_modes_processed += is_single_pred; - set_ref_ptrs(cm, xd, ref_frame, second_ref_frame); + if (comp_pred && !(cm->ref_frame_flags & (1 << second_ref_frame))) continue; - // Apply speed features to decide if this inter mode can be skipped - if (skip_inter_mode(cpi, x, bsize, ref_frame_rd, this_mode, - ref_frames, &sf_args)) - continue; + const MV_REFERENCE_FRAME ref_frames[2] = { ref_frame, second_ref_frame }; + init_mbmi(mbmi, this_mode, ref_frames, cm, xd, xd->sbi); + mbmi->fsc_mode[PLANE_TYPE_Y] = 0; + mbmi->fsc_mode[PLANE_TYPE_UV] = 0; + mbmi->angle_delta[PLANE_TYPE_Y] = 0; + mbmi->angle_delta[PLANE_TYPE_UV] = 0; + mbmi->use_dpcm_y = 0; + mbmi->dpcm_mode_y = 0; + mbmi->use_dpcm_uv = 0; + mbmi->dpcm_mode_uv = 0; - if (cm->seq_params.enable_adaptive_mvd == 0 && mbmi->use_amvd == 1) - continue; + // Bi-directional ref check for OPTFLOW (frame-level checks already + // passed via opfl_modes_allowed) + if (this_mode >= NEAR_NEARMV_OPTFLOW && + !opfl_allowed_cur_refs_bsize(cm, xd, mbmi)) + continue; - if (is_joint_mvd_coding_mode(this_mode) && - cm->seq_params.enable_joint_mvd == 0) - continue; + set_ref_ptrs(cm, xd, ref_frame, second_ref_frame); - // Select prediction reference frames. - for (i = 0; i < num_planes; i++) { - xd->plane[i].pre[0] = yv12_mb[COMPACT_INDEX0_NRS(ref_frame)][i]; - if (comp_pred) - xd->plane[i].pre[1] = - yv12_mb[COMPACT_INDEX0_NRS(second_ref_frame)][i]; - } + if (skip_inter_mode(cpi, x, ref_frame_rd, this_mode, ref_frames, &sf_args)) + continue; - mbmi->fsc_mode[PLANE_TYPE_Y] = 0; - mbmi->fsc_mode[PLANE_TYPE_UV] = 0; - mbmi->use_intrabc[0] = 0; - mbmi->use_intrabc[1] = 0; - mbmi->angle_delta[PLANE_TYPE_Y] = 0; - mbmi->angle_delta[PLANE_TYPE_UV] = 0; - mbmi->use_intra_dip = 0; - mbmi->use_dpcm_y = 0; - mbmi->dpcm_mode_y = 0; - mbmi->use_dpcm_uv = 0; - mbmi->dpcm_mode_uv = 0; - mbmi->ref_mv_idx[0] = 0; - mbmi->ref_mv_idx[1] = 0; - mbmi->warp_ref_idx = 0; - mbmi->max_num_warp_candidates = 0; - mbmi->warpmv_with_mvd_flag = 0; - const int64_t ref_best_rd = search_state.best_rd; - RD_STATS rd_stats, rd_stats_y, rd_stats_uv; - av2_init_rd_stats(&rd_stats); - - const int ref_frame_index = COMPACT_INDEX0_NRS(ref_frame); - - const int ref_frame_cost = - comp_pred ? ref_costs_comp[ref_frame][second_ref_frame] - : ref_costs_single[ref_frame_index]; - - const int compmode_cost = - (is_comp_ref_allowed(mbmi->sb_type[PLANE_TYPE_Y]) && - !is_tip_ref_frame(ref_frame)) - ? comp_inter_cost[comp_pred] - : 0; - const int real_compmode_cost = - cm->current_frame.reference_mode == REFERENCE_MODE_SELECT - ? compmode_cost - : 0; - // Point to variables that are maintained between loop iterations - args.single_newmv = search_state.single_newmv; - args.single_newmv_rate = search_state.single_newmv_rate; - args.single_newmv_valid = search_state.single_newmv_valid; - args.single_comp_cost = real_compmode_cost; - args.ref_frame_cost = ref_frame_cost; - - int64_t skip_rd[2] = { search_state.best_skip_rd[0], - search_state.best_skip_rd[1] }; - - int64_t this_rd = handle_inter_mode( - cpi, tile_data, x, bsize, &rd_stats, &rd_stats_y, &rd_stats_uv, - &args, ref_best_rd, tmp_buf, &x->comp_rd_buffer, &best_est_rd, - do_tx_search, inter_modes_info, &motion_mode_cand, skip_rd, - search_state.best_mbmode.mode, - enable_tx_prune ? top_motion_mode_model_rd : NULL, - &inter_cost_info_from_tpl); - - if (sf->inter_sf.prune_comp_search_by_single_result > 0 && - is_inter_singleref_mode(this_mode)) { - collect_single_states(cm, x, &search_state, mbmi); - } + // Select prediction reference frames. + for (i = 0; i < num_planes; i++) { + xd->plane[i].pre[0] = yv12_mb[COMPACT_INDEX0_NRS(ref_frame)][i]; + if (comp_pred) + xd->plane[i].pre[1] = yv12_mb[COMPACT_INDEX0_NRS(second_ref_frame)][i]; + } + + const int ref_frame_index = COMPACT_INDEX0_NRS(ref_frame); + const int ref_frame_cost = comp_pred + ? ref_costs_comp[ref_frame][second_ref_frame] + : ref_costs_single[ref_frame_index]; + const int compmode_cost = (comp_ref_allowed && !is_tip_ref_frame(ref_frame)) + ? comp_inter_cost[comp_pred] + : 0; + const int real_compmode_cost = reference_mode_select ? compmode_cost : 0; + // Point to variables that are maintained between loop iterations + args.single_comp_cost = real_compmode_cost; + args.ref_frame_cost = ref_frame_cost; + + for (int use_amvd_mode = 0; use_amvd_mode < num_amvd_modes; + ++use_amvd_mode) { + mbmi->use_amvd = (num_amvd_modes > 1 && amvd_inverted) ? !use_amvd_mode + : use_amvd_mode; + + if (amvd_inverted && !mbmi->use_amvd && + search_state.best_mbmode.mode != mbmi->mode) { + continue; + } - if (sf->inter_sf.prune_comp_using_best_single_mode_ref > 0 && - is_inter_singleref_mode(this_mode)) - update_best_single_mode(&search_state, this_mode, ref_frame, - this_rd); + num_single_modes_processed += is_single_pred; + txfm_info->skip_txfm = 0; + + const int64_t ref_best_rd = search_state.best_rd; + int64_t skip_rd[2] = { search_state.best_skip_rd[0], + search_state.best_skip_rd[1] }; + + RD_STATS rd_stats, rd_stats_y, rd_stats_uv; + av2_init_rd_stats(&rd_stats); + + int64_t *const pool = + enable_tx_prune + ? (share_across_modes ? pool_shared : pool_per_mode[this_mode]) + : NULL; + int64_t this_rd = handle_inter_mode( + cpi, tile_data, x, bsize, &rd_stats, &rd_stats_y, &rd_stats_uv, &args, + ref_best_rd, tmp_buf, &x->comp_rd_buffer, &best_est_rd, do_tx_search, + inter_modes_info, &motion_mode_cand, skip_rd, + search_state.best_mbmode.mode, pool, &inter_cost_info_from_tpl); + + // collect_single_states uses simple_rd/modelled_rd populated by + // handle_inter_mode even when this_rd == INT64_MAX, so call before + // the early exit. + if (is_single_pred && prune_comp_by_single) + collect_single_states(cm, x, &search_state, mbmi); + + if (this_rd == INT64_MAX) continue; + + if (is_single_pred) { + if (prune_comp_best_single) + update_best_single_mode(&search_state, this_mode, ref_frame, this_rd); + if (prune_comp_using_single_ref && + this_rd < ref_frame_rd[ref_frame_index]) + ref_frame_rd[ref_frame_index] = this_rd; + } - if (this_rd == INT64_MAX) continue; - if (mbmi->skip_txfm[xd->tree_type == CHROMA_PART]) { - rd_stats_y.rate = 0; - rd_stats_uv.rate = 0; - } + if (mbmi->skip_txfm[xd->tree_type == CHROMA_PART]) { + rd_stats_y.rate = 0; + rd_stats_uv.rate = 0; + } - if (sf->inter_sf.prune_compound_using_single_ref && is_single_pred && - this_rd < ref_frame_rd[ref_frame_index]) { - ref_frame_rd[ref_frame_index] = this_rd; - } + // Did this mode help, i.e., is it the new best mode + if (this_rd < search_state.best_rd) { + if (is_tip_ref_frame(ref_frame) && + this_rd + TIP_RD_CORRECTION > search_state.best_rd) { + continue; + } - // Did this mode help, i.e., is it the new best mode - if (this_rd < search_state.best_rd) { - if (is_tip_ref_frame(ref_frame) && - this_rd + TIP_RD_CORRECTION > search_state.best_rd) { - continue; - } - assert(IMPLIES(comp_pred, cm->current_frame.reference_mode != - SINGLE_REFERENCE)); - update_search_state(&search_state, rd_cost, ctx, &rd_stats, - &rd_stats_y, &rd_stats_uv, this_mode, x, - do_tx_search, cm); - if (do_tx_search) search_state.best_skip_rd[0] = skip_rd[0]; - search_state.best_skip_rd[1] = skip_rd[1]; - } - if (cpi->sf.winner_mode_sf.motion_mode_for_winner_cand) { - // Add this mode to motion mode candidate list for motion mode - // search if using motion_mode_for_winner_cand speed feature - handle_winner_cand(mbmi, &best_motion_mode_cands, - max_winner_motion_mode_cand, this_rd, - &motion_mode_cand, args.skip_motion_mode); - } + assert(IMPLIES(comp_pred, + cm->current_frame.reference_mode != SINGLE_REFERENCE)); + update_search_state(&search_state, rd_cost, ctx, &rd_stats, &rd_stats_y, + &rd_stats_uv, this_mode, x, do_tx_search, cm); + if (do_tx_search) search_state.best_skip_rd[0] = skip_rd[0]; + search_state.best_skip_rd[1] = skip_rd[1]; + } + if (motion_mode_winner) { + handle_winner_cand(mbmi, &best_motion_mode_cands, + max_winner_motion_mode_cand, this_rd, + &motion_mode_cand, args.skip_motion_mode); + } - /* keep record of best compound/single-only prediction */ - record_best_compound(cm->current_frame.reference_mode, &rd_stats, - comp_pred, x->rdmult, &search_state, - compmode_cost); - } // end of use_amvd mode loop - } // end of ref1 loop - } // end of ref0 loop - } // end of mode loop + /* keep record of best compound/single-only prediction */ + record_best_compound(cm->current_frame.reference_mode, &rd_stats, + comp_pred, x->rdmult, &search_state, compmode_cost); + } // end of use_amvd mode loop + } // end of LUT entry loop - if (cpi->sf.winner_mode_sf.motion_mode_for_winner_cand) { + if (motion_mode_winner) { // For the single ref winner candidates, evaluate other motion modes (non // simple translation). evaluate_motion_mode_for_winner_candidates( diff --git a/av2/encoder/rdopt.h b/av2/encoder/rdopt.h index 4607390495..d514bc40e3 100644 --- a/av2/encoder/rdopt.h +++ b/av2/encoder/rdopt.h @@ -31,7 +31,7 @@ extern "C" { #define COMP_TYPE_RD_THRESH_SCALE 11 #define COMP_TYPE_RD_THRESH_SHIFT 4 #define MAX_WINNER_MOTION_MODES 10 -#define TOP_MOTION_MODE_MODEL_COUNT 10 +#define TOP_MOTION_MODE_MODEL_COUNT 11 struct TileInfo; struct macroblock; diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 48aa08ba50..0b1a2131d2 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -302,7 +302,6 @@ static void set_good_speed_features_framesize_independent( sf->inter_sf.inter_mode_rd_model_estimation = 0; sf->inter_sf.model_based_post_interp_filter_breakout = 1; - sf->inter_sf.prune_compound_using_single_ref = 1; sf->inter_sf.prune_mode_search_simple_translation = 1; sf->inter_sf.prune_motion_mode_level = 1; sf->inter_sf.prune_ref_frames = 0; @@ -336,6 +335,7 @@ static void set_good_speed_features_framesize_independent( sf->rd_sf.perform_coeff_opt = 1; if (speed >= 1) { sf->inter_sf.selective_ref_frame = 2; + sf->inter_sf.share_motion_mode_prune_pool = 1; sf->tx_sf.adaptive_tx_type_search_idx = 4; sf->tx_sf.adaptive_tx_partition_type_search_idx = 4; @@ -685,6 +685,7 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->reduce_inter_modes = 0; inter_sf->alt_ref_search_fp = 0; inter_sf->selective_ref_frame = 0; + inter_sf->share_motion_mode_prune_pool = 0; inter_sf->prune_ref_frames = 0; inter_sf->disable_wedge_search_var_thresh = 0; inter_sf->fast_wedge_sign_estimate = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 8ea2d293b4..e0186b73ed 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -527,6 +527,13 @@ typedef struct INTER_MODE_SPEED_FEATURES { // aggressively than lower ones. (0 means no pruning). int selective_ref_frame; + // When 1, the top_motion_mode_model_rd[] pool used by + // prune_motion_mode() is shared across all prediction modes for the + // block (more aggressive pruning, faster, slight coding loss). When 0, + // each prediction mode keeps its own pool (slower, no coding loss). + // Enabled at speed >= 1. + int share_motion_mode_prune_pool; + // Prune reference frames. // 0 implies no pruning // 1 implies prune for extended partition From 63157f9fe063ae6ef7dd98591e11c79ba3231050 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Tue, 14 Jul 2026 17:24:46 -0700 Subject: [PATCH 06/51] Remove FSC path from intra joint UV function (#5111) The intra chroma component will not use FSC mode. Simplify the encoding functions therein. --- av2/encoder/encodemb.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/av2/encoder/encodemb.c b/av2/encoder/encodemb.c index 76c53730a9..9a704371ae 100644 --- a/av2/encoder/encodemb.c +++ b/av2/encoder/encodemb.c @@ -1767,11 +1767,7 @@ void av2_encode_block_intra_joint_uv(int block, int blk_row, int blk_col, &quant_param); av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param, &quant_param); - const uint8_t fsc_mode = - ((cm->seq_params.enable_fsc && - xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] && - plane == PLANE_TYPE_Y) || - use_inter_fsc(cm, plane, tx_type, 0 /*is_inter*/)); + if (quant_param.use_optimize_b && do_trellis) { const ENTROPY_CONTEXT *a = &args->ta[blk_col + (plane - AVM_PLANE_U) * MAX_MIB_SIZE]; @@ -1781,12 +1777,8 @@ void av2_encode_block_intra_joint_uv(int block, int blk_row, int blk_col, get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx, xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] && cm->seq_params.enable_fsc); - if (fsc_mode) - av2_optimize_fsc(args->cpi, x, plane, block, tx_size, tx_type, &txb_ctx, - &dummy_rate_cost); - else - av2_optimize_b(args->cpi, x, plane, block, tx_size, tx_type, cctx_type, - &txb_ctx, &dummy_rate_cost); + av2_optimize_b(args->cpi, x, plane, block, tx_size, tx_type, cctx_type, + &txb_ctx, &dummy_rate_cost); } if (do_dropout) { av2_dropout_qcoeff(x, plane, block, tx_size, tx_type, @@ -1810,12 +1802,8 @@ void av2_encode_block_intra_joint_uv(int block, int blk_row, int blk_col, get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx, xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] && cm->seq_params.enable_fsc); - if (fsc_mode) - av2_optimize_fsc(args->cpi, x, plane, block, tx_size, tx_type, - &txb_ctx, &dummy_rate_cost); - else - av2_optimize_b(args->cpi, x, plane, block, tx_size, tx_type, - cctx_type, &txb_ctx, &dummy_rate_cost); + av2_optimize_b(args->cpi, x, plane, block, tx_size, tx_type, cctx_type, + &txb_ctx, &dummy_rate_cost); } if (do_dropout) { av2_dropout_qcoeff(x, plane, block, tx_size, tx_type, From da0896f78ef456ace20492fcd56d444e812807f4 Mon Sep 17 00:00:00 2001 From: yeqing-wu Date: Tue, 14 Jul 2026 22:43:23 -0700 Subject: [PATCH 07/51] Rework single-ref to compound pruning (#5099) Revive prune_compound_using_single_ref: refresh the per-ref RD snapshot every iteration and prune compound (refs[0], refs[1]) pairs via the single-ref RD cutoff. Enabled at speed >= 1. STATS_CHANGED Anchor: commit https://github.com/AOMediaCodec/avm/commit/165345bf9efbf3a2eb6876c53acbc1b9f9c312d8 Speed 1 (cpu-used=1): FG16 CTC (33 frames, class A1 and A2, RA) ``` +------------+------+-------+-------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+-------+-------+------+------+------+ | A1 | 0.10 | -0.15 | -0.27 | 0.07 | 92 | 101 | | A2 | 0.09 | 0.28 | -0.12 | 0.08 | 93 | 101 | | Avg w/o B2 | 0.09 | 0.15 | -0.17 | 0.08 | 93 | 101 | +------------+------+-------+-------+------+------+------+ ``` --- av2/encoder/rdopt.c | 94 +++++++++++++----------------------- av2/encoder/speed_features.c | 6 +++ av2/encoder/speed_features.h | 9 ++++ 3 files changed, 49 insertions(+), 60 deletions(-) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index ede65e2e9f..fc0dedbb48 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -7721,18 +7721,6 @@ static INLINE int skip_compound_using_best_single_mode_ref( return 1; } -static int compare_int64(const void *a, const void *b) { - int64_t a64 = *((int64_t *)a); - int64_t b64 = *((int64_t *)b); - if (a64 < b64) { - return -1; - } else if (a64 == b64) { - return 0; - } else { - return 1; - } -} - static INLINE void update_search_state( InterModeSearchState *search_state, RD_STATS *best_rd_stats_dst, PICK_MODE_CONTEXT *ctx, const RD_STATS *new_best_rd_stats, @@ -7777,31 +7765,21 @@ static INLINE void update_search_state( ctx->num_4x4_blk_chroma); } -// Find the best RD for a reference frame (among single reference modes) -// and store +10% of it in the 0-th (or last for NRS) element in ref_frame_rd. -static AVM_INLINE void find_top_ref(int64_t *ref_frame_rd) { - int64_t ref_copy[MAX_COMPOUND_REF_INDEX - 1]; - assert(ref_frame_rd[INTRA_FRAME_INDEX] == INT64_MAX); - memcpy(ref_copy, ref_frame_rd, - sizeof(ref_frame_rd[0]) * (MAX_COMPOUND_REF_INDEX - 1)); - qsort(ref_copy, MAX_COMPOUND_REF_INDEX - 1, sizeof(int64_t), compare_int64); - - int64_t cutoff = AVMMIN(ref_copy[0], ref_frame_rd[TIP_FRAME_INDEX]); - // The cut-off is within 10% of the best. +// Check if either ref frame is within a ~10% cutoff of the best single-ref-mode +// RD seen so far. best_single_mode_rd is INT64_MAX until any single-ref mode +// has completed, in which case both refs pass. +static INLINE bool in_single_ref_cutoff(const int64_t *ref_frame_rd, + int64_t best_single_mode_rd, + MV_REFERENCE_FRAME frame1, + MV_REFERENCE_FRAME frame2) { + assert(is_inter_ref_frame(frame2)); + int64_t cutoff = best_single_mode_rd; + // Keep the cut-off within 10% of the best. if (cutoff != INT64_MAX) { assert(cutoff < INT64_MAX / 200); cutoff = (110 * cutoff) / 100; } - ref_frame_rd[INTRA_FRAME_INDEX] = cutoff; -} - -// Check if either frame is within the cutoff. -static INLINE bool in_single_ref_cutoff(int64_t *ref_frame_rd, - MV_REFERENCE_FRAME frame1, - MV_REFERENCE_FRAME frame2) { - assert(is_inter_ref_frame(frame2)); - return ref_frame_rd[frame1] <= ref_frame_rd[INTRA_FRAME_INDEX] || - ref_frame_rd[frame2] <= ref_frame_rd[INTRA_FRAME_INDEX]; + return ref_frame_rd[frame1] <= cutoff || ref_frame_rd[frame2] <= cutoff; } static AVM_INLINE void evaluate_motion_mode_for_winner_candidates( @@ -7890,12 +7868,12 @@ typedef struct { uint64_t skip_ref_frame_mask; int reach_first_comp_mode; int mode_thresh_mul_fact; - int *num_single_modes_processed; - int prune_cpd_using_sr_stats_ready; } InterModeSFArgs; /*!\endcond */ -static int skip_inter_mode(AV2_COMP *cpi, MACROBLOCK *x, int64_t *ref_frame_rd, +static int skip_inter_mode(AV2_COMP *cpi, MACROBLOCK *x, + const int64_t *ref_frame_rd, + int64_t best_single_mode_rd, PREDICTION_MODE this_mode, const MV_REFERENCE_FRAME *ref_frames, InterModeSFArgs *args) { @@ -7944,18 +7922,13 @@ static int skip_inter_mode(AV2_COMP *cpi, MACROBLOCK *x, int64_t *ref_frame_rd, } if (sf->inter_sf.prune_compound_using_single_ref) { - // After we done with single reference modes, find the 2nd best RD - // for a reference frame. Only search compound modes that have a reference - // frame at least as good as 110% the best one. - if (!args->prune_cpd_using_sr_stats_ready && - *args->num_single_modes_processed == - cpi->common.ref_frames_info.num_total_refs * - SINGLE_INTER_MODE_NUM) { - find_top_ref(ref_frame_rd); - args->prune_cpd_using_sr_stats_ready = 1; - } - if (args->prune_cpd_using_sr_stats_ready && - !in_single_ref_cutoff(ref_frame_rd, ref_frame, second_ref_frame)) + // Prune compound modes whose refs are not within the ~10% cutoff of the + // best single-ref-mode RD seen so far. + if (!(ref_frame < sf->inter_sf.skip_compound_prune_top_refs_num_ref0 && + second_ref_frame < + sf->inter_sf.skip_compound_prune_top_refs_num_ref1) && + !in_single_ref_cutoff(ref_frame_rd, best_single_mode_rd, ref_frame, + second_ref_frame)) return 1; } @@ -8663,18 +8636,19 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, InterModesInfo *inter_modes_info = x->inter_modes_info; inter_modes_info->num = 0; - int num_single_modes_processed = 0; - // Temporary buffers used by handle_inter_mode(). uint16_t *const tmp_buf = x->tmp_pred_bufs[0]; // The best RD found for the reference frame, among single reference modes. - // Note that the 0-th element will contain a cut-off that is later used - // to determine if we should skip a compound mode. + // Read by in_single_ref_cutoff() to check whether either ref of a compound + // trial is within ~10% of the best single-ref-mode RD. int64_t ref_frame_rd[SINGLE_REF_FRAMES] = { INT64_MAX, INT64_MAX, INT64_MAX, INT64_MAX, INT64_MAX, INT64_MAX, INT64_MAX, INT64_MAX, INT64_MAX }; + // Running minimum RD across all single-ref inter modes evaluated so far. + // Used as the anchor for the single-ref cutoff in in_single_ref_cutoff(). + int64_t best_single_mode_rd = INT64_MAX; // Prepared stats used later to check if we could skip intra mode eval. int64_t inter_cost = -1; @@ -8759,9 +8733,7 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, &search_state, skip_ref_frame_mask, 0, - mode_thresh_mul_fact, - &num_single_modes_processed, - 0 }; + mode_thresh_mul_fact }; const uint8_t enable_tx_prune = do_tx_search; // Pool of top model RDs used by prune_motion_mode(). When @@ -8904,7 +8876,8 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, set_ref_ptrs(cm, xd, ref_frame, second_ref_frame); - if (skip_inter_mode(cpi, x, ref_frame_rd, this_mode, ref_frames, &sf_args)) + if (skip_inter_mode(cpi, x, ref_frame_rd, best_single_mode_rd, this_mode, + ref_frames, &sf_args)) continue; // Select prediction reference frames. @@ -8936,7 +8909,6 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, continue; } - num_single_modes_processed += is_single_pred; txfm_info->skip_txfm = 0; const int64_t ref_best_rd = search_state.best_rd; @@ -8967,9 +8939,11 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, if (is_single_pred) { if (prune_comp_best_single) update_best_single_mode(&search_state, this_mode, ref_frame, this_rd); - if (prune_comp_using_single_ref && - this_rd < ref_frame_rd[ref_frame_index]) - ref_frame_rd[ref_frame_index] = this_rd; + if (prune_comp_using_single_ref) { + if (this_rd < ref_frame_rd[ref_frame_index]) + ref_frame_rd[ref_frame_index] = this_rd; + if (this_rd < best_single_mode_rd) best_single_mode_rd = this_rd; + } } if (mbmi->skip_txfm[xd->tree_type == CHROMA_PART]) { diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 0b1a2131d2..477824c170 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -336,6 +336,10 @@ static void set_good_speed_features_framesize_independent( if (speed >= 1) { sf->inter_sf.selective_ref_frame = 2; sf->inter_sf.share_motion_mode_prune_pool = 1; + sf->inter_sf.prune_compound_using_single_ref = 1; + // TODO (Yeqing Wu): need to be tuned for speed > 1. + sf->inter_sf.skip_compound_prune_top_refs_num_ref0 = 1; + sf->inter_sf.skip_compound_prune_top_refs_num_ref1 = 2; sf->tx_sf.adaptive_tx_type_search_idx = 4; sf->tx_sf.adaptive_tx_partition_type_search_idx = 4; @@ -701,6 +705,8 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->skip_repeated_full_newmv = 0; inter_sf->inter_mode_rd_model_estimation = 0; inter_sf->prune_compound_using_single_ref = 0; + inter_sf->skip_compound_prune_top_refs_num_ref0 = 0; + inter_sf->skip_compound_prune_top_refs_num_ref1 = 0; inter_sf->prune_comp_using_best_single_mode_ref = 0; inter_sf->prune_mode_search_simple_translation = 0; inter_sf->prune_comp_type_by_comp_avg = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index e0186b73ed..e2d9fed1b5 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -604,6 +604,15 @@ typedef struct INTER_MODE_SPEED_FEATURES { // the single reference modes, it is one of the two best performers. int prune_compound_using_single_ref; + // Top-ref0 / top-ref1 cutoffs used inside the prune_compound_using_single_ref + // pruning. Compound pairs with refs[0] < + // skip_compound_prune_top_refs_num_ref0 AND refs[1] < + // skip_compound_prune_top_refs_num_ref1 are exempt from the single-ref-cutoff + // pruning. Enabled at speed >= 1. + // TODO (Yeqing Wu): need to be tuned for speed > 1. + int skip_compound_prune_top_refs_num_ref0; + int skip_compound_prune_top_refs_num_ref1; + // Skip extended compound mode when ref frame corresponding to NEWMV does not // have NEWMV as single mode winner. // 0 : no pruning From 1501bc290d22b1dc41c3452c4cea484095332717 Mon Sep 17 00:00:00 2001 From: yeqing-wu Date: Wed, 15 Jul 2026 09:31:09 -0700 Subject: [PATCH 08/51] Fix latent assert in handle_newmv MV-precision cache lookup (#5114) Tighten the loop lower bound to pb_mv_precision + 1 so the found cache precision is strictly greater than the current pb_mv_precision, matching the assert's intent. --- av2/encoder/rdopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index fc0dedbb48..39461f416a 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -1392,7 +1392,7 @@ static int64_t handle_newmv(const AV2_COMP *const cpi, MACROBLOCK *const x, is_pb_mv_precision_active(&cpi->common, mbmi, bsize); if (do_refine_ms) { int valid_mv0_found = 0; - for (int prev_mv_precision = pb_mv_precision; + for (int prev_mv_precision = pb_mv_precision + 1; prev_mv_precision <= mbmi->max_mv_precision; prev_mv_precision++) { assert(get_ref_mv_idx(mbmi, 1) == get_ref_mv_idx(mbmi, 0)); if (args->single_newmv_valid[prev_mv_precision][get_ref_mv_idx(mbmi, 0)] From 39711558bba1aebc8d0927c18693f78c5b16254a Mon Sep 17 00:00:00 2001 From: yeqing-wu Date: Wed, 15 Jul 2026 11:33:30 -0700 Subject: [PATCH 09/51] Add per-ref RD-based pruning for single-ref NEWMV / WARP_NEWMV (#5100) Prune single-ref NEWMV / WARP_NEWMV trials whose prior-mode RD for the current ref frame is far from the best across all refs. Gated by prune_newmv_modes_using_prior_rd, enabled at speed >= 1. STATS_CHANGED Anchor: commit https://github.com/AOMediaCodec/avm/commit/165345bf9efbf3a2eb6876c53acbc1b9f9c312d8 Speed 1 (cpu-used=1): FG16 CTC (33 frames, class A1 and A2, RA) ``` +------------+------+-------+-------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+-------+-------+------+------+------+ | A1 | 0.14 | -0.04 | -0.14 | 0.11 | 88 | 101 | | A2 | 0.17 | 0.66 | 0.10 | 0.18 | 88 | 101 | | Avg w/o B2 | 0.16 | 0.45 | 0.03 | 0.16 | 88 | 101 | +------------+------+-------+-------+------+------+------+ ``` --- av2/encoder/interp_search.h | 22 +++++ av2/encoder/rdopt.c | 172 ++++++++++++++++++++++++++++++++++- av2/encoder/speed_features.c | 2 + av2/encoder/speed_features.h | 6 ++ 4 files changed, 200 insertions(+), 2 deletions(-) diff --git a/av2/encoder/interp_search.h b/av2/encoder/interp_search.h index f28bcfb03f..1baa33e5de 100644 --- a/av2/encoder/interp_search.h +++ b/av2/encoder/interp_search.h @@ -32,6 +32,18 @@ typedef struct { int64_t rd; unsigned int pred_sse; } INTERPOLATION_FILTER_STATS; + +// Holds the best fast (model-based, pre-tx) and full (post-tx) RD seen for a +// given (mode, refs) tuple across all motion modes, ref_mv_idx, MV precisions, +// jmvd, bawp and refinemv variants. Used as input to mode-pruning heuristics. +typedef struct InterModeRdPair { + int64_t fast_rd; + int64_t full_rd; +} InterModeRdPair; + +// Number of slots in the use_amvd dimension of the inter-mode RD tables. +// mbmi->use_amvd is 0 or 1, so this dimension has size 2. +#define NUM_USE_AMVD_OPTIONS 2 /*!\endcond */ /*!\brief Miscellaneous arguments for inter mode search. @@ -89,6 +101,16 @@ typedef struct { */ int64_t (*simple_rd)[MAX_REF_MV_SEARCH][SINGLE_REF_FRAMES]; + /*! + * Pointer to a 3D array storing the best fast/full RD per single-ref inter + * mode, use_amvd option, and reference frame. The aggregation is the + * minimum across all motion modes, ref_mv_idx, MV precisions, bawp, + * refinemv and jmvd tuples for a given (mode, use_amvd, ref). Indexed by + * [mode_idx][use_amvd][ref_frame_idx] where + * mode_idx = mode - SINGLE_INTER_MODE_START. + */ + InterModeRdPair (*single_inter_rd)[NUM_USE_AMVD_OPTIONS][SINGLE_REF_FRAMES]; + /*! * An integer value 0 or 1 which indicates whether or not to skip the motion * mode search and default to SIMPLE_TRANSLATION as a speed feature. diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 39461f416a..fa3fd7d2eb 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -110,6 +110,12 @@ typedef struct SingleInterModeState { int valid; } SingleInterModeState; +// Returns the index into single_inter_rd[] for a single-ref inter mode. +static INLINE int single_inter_mode_idx(PREDICTION_MODE mode) { + assert(mode >= SINGLE_INTER_MODE_START && mode < SINGLE_INTER_MODE_END); + return mode - SINGLE_INTER_MODE_START; +} + typedef struct InterModeSearchState { int64_t best_rd; int64_t best_skip_rd[2]; @@ -134,6 +140,12 @@ typedef struct InterModeSearchState { int64_t modelled_rd[MB_MODE_COUNT][MAX_REF_MV_SEARCH][SINGLE_REF_FRAMES]; // The rd of simple translation in single inter modes int64_t simple_rd[MB_MODE_COUNT][MAX_REF_MV_SEARCH][SINGLE_REF_FRAMES]; + // Best fast/full RD per single-ref inter mode, use_amvd option, and + // reference frame. Aggregated as the minimum across all motion modes, + // ref_mv_idx, MV precisions, bawp, refinemv and jmvd tuples for a given + // (mode, use_amvd, ref). + InterModeRdPair single_inter_rd[SINGLE_INTER_MODE_NUM][NUM_USE_AMVD_OPTIONS] + [SINGLE_REF_FRAMES]; int64_t best_single_rd[SINGLE_REF_FRAMES]; PREDICTION_MODE best_single_mode[SINGLE_REF_FRAMES]; @@ -2160,6 +2172,135 @@ static int prune_motion_mode(int64_t this_model_rd, top_motion_mode_model_rd[TOP_MOTION_MODE_MODEL_COUNT - 1]; } +// Records the best fast/full RD for a given (mode, refs) into the +// single_inter_rd table in args. is_fast == 1 selects the fast (model-based, +// pre-transform) slot; is_fast == 0 selects the full (post av2_txfm_search) +// slot. True compound modes (refs[1] is an inter ref) are not tracked. +// Interintra (refs[1] == INTRA_FRAME) is folded into the single-ref table +// via refs[0]. +static AVM_INLINE void update_inter_mode_rd(HandleInterModeArgs *args, + const MB_MODE_INFO *mbmi, + int64_t rd, int is_fast) { + // Fast path when the consuming speed feature + // (prune_newmv_modes_using_prior_rd) is off: caller wires this pointer to + // NULL, so the whole tracker collapses to one pointer load + branch. + if (args->single_inter_rd == NULL) return; + const PREDICTION_MODE this_mode = mbmi->mode; + if (has_second_ref(mbmi) && mbmi->ref_frame[1] != INTRA_FRAME) return; + if (!is_inter_singleref_mode(this_mode)) return; + const int use_amvd = mbmi->use_amvd; + assert(use_amvd == 0 || use_amvd == 1); + const int rf0 = COMPACT_INDEX0_NRS(mbmi->ref_frame[0]); + assert(rf0 >= 0 && rf0 < SINGLE_REF_FRAMES); + InterModeRdPair *slot = + &args->single_inter_rd[single_inter_mode_idx(this_mode)][use_amvd][rf0]; + int64_t *p = is_fast ? &slot->fast_rd : &slot->full_rd; + if (rd < *p) *p = rd; +} + +// Returns 1 if a single-ref mode (e.g. NEWMV or GLOBALMV) for this ref frame +// should be skipped because the matching reference RD is not within +// (1 / slack_denom) of the best reference RD across all ref frames. Decision +// rule: keep when EITHER full_rd OR fast_rd is within slack of its respective +// best; prune when neither is (this includes the no-reference-data case). +// slack_denom = 10 means 10% slack; slack_denom = 4 means 25% slack; lower +// values are looser. +static AVM_INLINE int prune_single_by_reference_rd( + const InterModeRdPair reference_rd[SINGLE_REF_FRAMES], int this_ref_idx, + int slack_denom) { + if (this_ref_idx < 0 || this_ref_idx >= SINGLE_REF_FRAMES) return 0; + if (slack_denom <= 0) return 0; + if (reference_rd[this_ref_idx].full_rd != INT64_MAX) { + int64_t best_full = INT64_MAX; + for (int r = 0; r < SINGLE_REF_FRAMES; ++r) { + if (reference_rd[r].full_rd < best_full) + best_full = reference_rd[r].full_rd; + } + if (reference_rd[this_ref_idx].full_rd <= + best_full + best_full / slack_denom) { + return 0; + } + } + if (reference_rd[this_ref_idx].fast_rd != INT64_MAX) { + int64_t best_fast = INT64_MAX; + for (int r = 0; r < SINGLE_REF_FRAMES; ++r) { + if (reference_rd[r].fast_rd < best_fast) + best_fast = reference_rd[r].fast_rd; + } + if (reference_rd[this_ref_idx].fast_rd <= + best_fast + best_fast / slack_denom) { + return 0; + } + } + return 1; +} + +// Returns 1 if a single-ref NEWMV / WARP_NEWMV trial for this +// (this_mode, ref_frame, use_amvd) should be skipped because the best RD +// seen so far for this ref in a prior mode is far from the best +// prior-mode RD across all refs. Returns 0 to keep evaluating, including +// for any mode other than NEWMV / WARP_NEWMV and when the speed feature +// is off. +// +// Exemptions: +// - speed feature prune_newmv_modes_using_prior_rd is off. +// - NEWMV with ref_frame <= 2 (top refs) or TIP. +// - WARP_NEWMV when lag_in_frames == 0. +// +// Prior-mode source selection (single_inter_rd is populated by earlier +// outer-mode-loop iterations of NEARMV / NEWMV / WARPMV): +// - NEWMV with use_amvd == 1: prefer NEWMV[*][use_amvd=0] when +// populated (use_amvd=0 is searched first in the outer use_amvd +// loop), else fall back to NEARMV[*][0]. +// - NEWMV with use_amvd == 0: NEARMV[*][0]. +// - WARP_NEWMV: first populated of {NEWMV[*][0], WARPMV[*][0], +// NEWMV[*][1], NEARMV[*][0]}. WARP_NEWMV does not support AMVD, +// so use_amvd is always 0 here. +// +// NEARMV / WARPMV / WARP_NEWMV do not support AMVD, so they are +// always written to the use_amvd=0 slot. +static AVM_INLINE int prune_newmv_modes_by_prior_rd( + const AV2_COMP *cpi, const InterModeSearchState *search_state, + PREDICTION_MODE this_mode, int ref_frame, int use_amvd) { + if (!cpi->sf.inter_sf.prune_newmv_modes_using_prior_rd) return 0; + if (this_mode != NEWMV && this_mode != WARP_NEWMV) return 0; + if (this_mode == NEWMV && (ref_frame <= 2 || is_tip_ref_frame(ref_frame))) { + return 0; + } + if (this_mode == WARP_NEWMV && cpi->oxcf.gf_cfg.lag_in_frames == 0) return 0; + + const int slack_denom = 10; + const int rf_idx = COMPACT_INDEX0_NRS(ref_frame); + const InterModeRdPair *prior = + search_state->single_inter_rd[single_inter_mode_idx(NEARMV)][0]; + if (this_mode == NEWMV) { + if (use_amvd == 1) { + const InterModeRdPair *newmv_amvd0 = + search_state->single_inter_rd[single_inter_mode_idx(NEWMV)][0]; + if (newmv_amvd0[rf_idx].full_rd != INT64_MAX || + newmv_amvd0[rf_idx].fast_rd != INT64_MAX) { + prior = newmv_amvd0; + } + } + return prune_single_by_reference_rd(prior, rf_idx, slack_denom); + } + + // WARP_NEWMV + const InterModeRdPair *const candidates[3] = { + search_state->single_inter_rd[single_inter_mode_idx(NEWMV)][0], + search_state->single_inter_rd[single_inter_mode_idx(WARPMV)][0], + search_state->single_inter_rd[single_inter_mode_idx(NEWMV)][1], + }; + for (int cand = 0; cand < 3; ++cand) { + if (candidates[cand][rf_idx].full_rd != INT64_MAX || + candidates[cand][rf_idx].fast_rd != INT64_MAX) { + prior = candidates[cand]; + break; + } + } + return prune_single_by_reference_rd(prior, rf_idx, slack_denom); +} + // Handle SIMPLE_TRANSLATION motion mode: adjust MVD sign if needed. // Returns -1 to skip this motion mode iteration, 0 on success. static AVM_INLINE int handle_simple_translation_mode( @@ -2816,6 +2957,7 @@ static AVM_INLINE int evaluate_motion_mode_trial( rd_stats->rate += est_residue_cost; rd_stats->dist = est_dist; rd_stats->rdcost = est_rd; + update_inter_mode_rd(args, mbmi, est_rd, 1); if (rd_stats->rdcost < *best_est_rd) { *best_est_rd = rd_stats->rdcost; assert(sse_y >= 0); @@ -2858,6 +3000,7 @@ static AVM_INLINE int evaluate_motion_mode_trial( NULL, &curr_sse, NULL, NULL, NULL); int64_t est_rd = RDCOST(x->rdmult, rd_stats->rate + est_residue_cost, est_dist); + update_inter_mode_rd(args, mbmi, est_rd, 1); if (prune_motion_mode(est_rd, top_motion_mode_model_rd, cm, xd, bsize)) return -1; } @@ -2872,6 +3015,7 @@ static AVM_INLINE int evaluate_motion_mode_trial( return -1; } const int64_t curr_rd = RDCOST(x->rdmult, rd_stats->rate, rd_stats->dist); + update_inter_mode_rd(args, mbmi, curr_rd, 0); if (curr_rd < *ref_best_rd) { *ref_best_rd = curr_rd; ref_skip_rd[0] = skip_rd; @@ -7146,6 +7290,17 @@ static AVM_INLINE void init_inter_mode_search_state( } } + if (cpi->sf.inter_sf.prune_newmv_modes_using_prior_rd) { + for (int m = 0; m < SINGLE_INTER_MODE_NUM; ++m) { + for (int u = 0; u < NUM_USE_AMVD_OPTIONS; ++u) { + for (int r = 0; r < SINGLE_REF_FRAMES; ++r) { + search_state->single_inter_rd[m][u][r].fast_rd = INT64_MAX; + search_state->single_inter_rd[m][u][r].full_rd = INT64_MAX; + } + } + } + } + for (int dir = 0; dir < 2; ++dir) { for (int mode = 0; mode < SINGLE_INTER_MODE_NUM; ++mode) { for (int ref_frame = 0; ref_frame < SINGLE_REF_FRAMES; ++ref_frame) { @@ -7984,7 +8139,7 @@ static void tx_search_best_inter_candidates( int64_t best_rd_so_far, BLOCK_SIZE bsize, struct buf_2d yv12_mb[SINGLE_REF_FRAMES][MAX_MB_PLANE], int mi_row, int mi_col, InterModeSearchState *search_state, RD_STATS *rd_cost, - PICK_MODE_CONTEXT *ctx) { + PICK_MODE_CONTEXT *ctx, HandleInterModeArgs *args) { AV2_COMMON *const cm = &cpi->common; MACROBLOCKD *const xd = &x->e_mbd; TxfmSearchInfo *txfm_info = &x->txfm_search_info; @@ -8074,6 +8229,7 @@ static void tx_search_best_inter_candidates( [skip_ctx][mbmi->skip_txfm[xd->tree_type == CHROMA_PART]]); } rd_stats.rdcost = RDCOST(x->rdmult, rd_stats.rate, rd_stats.dist); + update_inter_mode_rd(args, mbmi, rd_stats.rdcost, 0); const MV_REFERENCE_FRAME refs[2] = { mbmi->ref_frame[0], mbmi->ref_frame[1] }; @@ -8488,6 +8644,9 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, INT_MAX, INT_MAX, search_state.simple_rd, + cpi->sf.inter_sf.prune_newmv_modes_using_prior_rd + ? search_state.single_inter_rd + : NULL, 0, interintra_modes, { { 0, { { 0 } }, { 0 }, 0, 0, 0 } }, @@ -8909,6 +9068,15 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, continue; } + // Skip single-ref NEWMV / WARP_NEWMV when prior-mode RD for this + // ref frame is far from the best across all refs. See + // prune_newmv_modes_by_prior_rd() for source selection and + // exemptions. + if (prune_newmv_modes_by_prior_rd(cpi, &search_state, this_mode, + ref_frame, mbmi->use_amvd)) { + continue; + } + txfm_info->skip_txfm = 0; const int64_t ref_best_rd = search_state.best_rd; @@ -8994,7 +9162,7 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, // top mode candidates tx_search_best_inter_candidates(cpi, tile_data, x, best_rd_so_far, bsize, yv12_mb, mi_row, mi_col, &search_state, - rd_cost, ctx); + rd_cost, ctx, &args); } #if CONFIG_COLLECT_COMPONENT_TIMING end_timing(cpi, do_tx_search_time); diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 477824c170..e3cbe00f7f 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -335,6 +335,7 @@ static void set_good_speed_features_framesize_independent( sf->rd_sf.perform_coeff_opt = 1; if (speed >= 1) { sf->inter_sf.selective_ref_frame = 2; + sf->inter_sf.prune_newmv_modes_using_prior_rd = 1; sf->inter_sf.share_motion_mode_prune_pool = 1; sf->inter_sf.prune_compound_using_single_ref = 1; // TODO (Yeqing Wu): need to be tuned for speed > 1. @@ -689,6 +690,7 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->reduce_inter_modes = 0; inter_sf->alt_ref_search_fp = 0; inter_sf->selective_ref_frame = 0; + inter_sf->prune_newmv_modes_using_prior_rd = 0; inter_sf->share_motion_mode_prune_pool = 0; inter_sf->prune_ref_frames = 0; inter_sf->disable_wedge_search_var_thresh = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index e2d9fed1b5..240939eb8d 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -527,6 +527,12 @@ typedef struct INTER_MODE_SPEED_FEATURES { // aggressively than lower ones. (0 means no pruning). int selective_ref_frame; + // When 1, prune single-ref NEWMV / WARP_NEWMV for a given ref frame + // when the best RD seen so far for that ref (taken from a prior mode + // such as NEARMV, NEWMV[amvd=0], or WARPMV) is far from the best RD + // across all refs. 0 disables this pruning. Enabled at speed >= 1. + int prune_newmv_modes_using_prior_rd; + // When 1, the top_motion_mode_model_rd[] pool used by // prune_motion_mode() is shared across all prediction modes for the // block (more aggressive pruning, faster, slight coding loss). When 0, From bd03298633af02eea9c034568f15c20aa3a12df9 Mon Sep 17 00:00:00 2001 From: yeqing-wu Date: Wed, 15 Jul 2026 15:36:51 -0700 Subject: [PATCH 10/51] Single-ref NEWMV DRL search speed features (#5101) Adds three single-ref NEWMV DRL search speed features, enabled at speed >= 1: * mv_sf.skip_second_best_subpel: the subpel search normally refines both the best and the second-best full-pel candidate and keeps the lower-variance result; with this feature set, only the best full-pel candidate is refined. * mv_sf.predict_repeated_newmv: when a previously searched ref_mv_idx has a reference MV within one full pel of the current one, reuse the cached NEWMV result and only recompute the MV rate, avoiding the full-pel and subpel search entirely. * mv_sf.newmv_drl_search_limit: once ref_mv_idx reaches the limit, reuse the nearest already-searched result regardless of ref-MV distance instead of running a fresh search. Enabled with a cap of 2. Shares the same search-loop pass as the predict_repeated_newmv reuse. STATS_CHANGED Anchor: commit 165345b Speed 1 (cpu-used=1): FG16 CTC (33 frames, class A1 and A2, RA) Speed 4 (cpu-used=4): FG16 CTC (33 frames, class A1 and A2, RA) ``` 1) Speed 1 a) Overall performance (all three features combined) +------------+------+-------+-------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+-------+-------+------+------+------+ | A1 | 0.04 | -0.08 | -0.36 | 0.00 | 99 | 101 | | A2 | 0.04 | -0.04 | -0.18 | 0.03 | 98 | 100 | | Avg w/o B2 | 0.04 | -0.05 | -0.23 | 0.02 | 98 | 100 | +------------+------+-------+-------+------+------+------+ b) Performance of skip_second_best_subpel only +------------+-------+-------+-------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+-------+-------+-------+-------+------+------+ | A1 | -0.10 | -0.32 | 0.09 | -0.11 | 99.5 | 101 | | A2 | -0.01 | -0.09 | -0.34 | -0.02 | 99.5 | 100 | | Avg w/o B2 | -0.04 | -0.16 | -0.21 | -0.05 | 99.5 | 100 | +------------+-------+-------+-------+-------+------+------+ c) Performance of predict_repeated_newmv only +------------+-------+-------+-------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+-------+-------+-------+-------+------+------+ | A1 | 0.00 | -0.08 | 0.08 | 0.00 | 100 | 100 | | A2 | -0.03 | -0.04 | -0.04 | -0.03 | 100 | 100 | | Avg w/o B2 | -0.02 | -0.05 | -0.00 | -0.02 | 100 | 100 | +------------+-------+-------+-------+-------+------+------+ d) Performance of newmv_drl_search_limit only +------------+------+-------+------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+-------+------+------+------+------+ | A1 | 0.05 | -0.17 | 0.09 | 0.03 | 99 | 101 | | A2 | 0.00 | 0.36 | 0.01 | 0.02 | 99 | 100 | | Avg w/o B2 | 0.01 | 0.20 | 0.03 | 0.02 | 99 | 100 | +------------+------+-------+------+------+------+------+ 2) Speed 4 Overall performance (all three features combined) +------------+------+-------+-------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+-------+-------+------+------+------+ | A1 | 0.01 | -0.13 | 0.07 | 0.00 | 96 | 101 | | A2 | 0.05 | -0.13 | -0.25 | 0.03 | 96 | 100 | | Avg w/o B2 | 0.04 | -0.13 | -0.15 | 0.02 | 96 | 100 | +------------+------+-------+-------+------+------+------+ ``` --- av2/encoder/motion_search_facade.c | 3 +- av2/encoder/rdopt.c | 66 ++++++++++++++++++++++++++++++ av2/encoder/speed_features.c | 14 +++++++ av2/encoder/speed_features.h | 15 +++++++ 4 files changed, 97 insertions(+), 1 deletion(-) diff --git a/av2/encoder/motion_search_facade.c b/av2/encoder/motion_search_facade.c index 087631bcfb..905a06f261 100644 --- a/av2/encoder/motion_search_facade.c +++ b/av2/encoder/motion_search_facade.c @@ -382,7 +382,8 @@ void av2_single_motion_search(const AV2_COMP *const cpi, MACROBLOCK *x, switch (mbmi->motion_mode) { case SIMPLE_TRANSLATION: if (cpi->sf.mv_sf.subpel_search_type) { - const int try_second = second_best_mv.as_int != INVALID_MV && + const int try_second = !cpi->sf.mv_sf.skip_second_best_subpel && + second_best_mv.as_int != INVALID_MV && second_best_mv.as_int != best_mv->as_int; const int best_mv_var = mv_search_params->find_fractional_mv_step( xd, cm, &ms_params, subpel_start_mv, &best_mv->as_mv, &dis, diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index fa3fd7d2eb..899ac81ae6 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -1432,6 +1432,72 @@ static int64_t handle_newmv(const AV2_COMP *const cpi, MACROBLOCK *const x, mode_info, &start_mv, &best_mv); } else { + // Predictive NEWMV reuse across the DRL. Two triggers select a match: + // Tier 1 (predict_repeated_newmv): match when reference MVs are + // within one full pel. + // Tier 2 (newmv_drl_search_limit): once ref_mv_idx reaches the limit, + // reuse the nearest searched result regardless of distance. + const int t1_active = cpi->sf.mv_sf.predict_repeated_newmv != 0; + const int drl_limit = cpi->sf.mv_sf.newmv_drl_search_limit; + const int t2_active = + drl_limit > 0 && mbmi->ref_mv_idx[ref_idx] >= drl_limit; + if ((t1_active || t2_active) && !mbmi->use_amvd && + mbmi->ref_mv_idx[ref_idx] > 0) { + const MV ref_mv = av2_get_ref_mv(x, ref_idx).as_mv; + int near_diff = INT_MAX; + int near_idx = -1; + for (int idx = 0; idx < mbmi->ref_mv_idx[ref_idx]; ++idx) { + if (!args->single_newmv_valid[pb_mv_precision][idx][refs[0]]) + continue; + const MV prev_ref_mv = + av2_get_ref_mv_from_stack(ref_idx, mbmi->ref_frame, idx, + x->mbmi_ext, mbmi) + .as_mv; + const int ref_mv_diff = AVMMAX(abs(ref_mv.row - prev_ref_mv.row), + abs(ref_mv.col - prev_ref_mv.col)); + if (ref_mv_diff < near_diff) { + near_diff = ref_mv_diff; + near_idx = idx; + } + } + int best_match = -1; + // Reuse the nearest previously-searched ref-mv when Tier 1 (within + // one full pel -- (1 << 3) in 1/8-pel units) or Tier 2 (no distance + // cap) fires. + if (near_idx >= 0 && + ((t1_active && near_diff <= (1 << 3)) || t2_active)) { + best_match = near_idx; + } + if (best_match >= 0) { + const int_mv reuse_mv = + args->single_newmv[pb_mv_precision][best_match][refs[0]]; + SubpelMvLimits mv_limits; + av2_set_subpel_mv_search_range(&mv_limits, &x->mv_limits, &ref_mv, + pb_mv_precision); + const int is_adaptive_mvd = enable_adaptive_mvd_resolution(cm, mbmi); + // The reused MV was searched against a different reference MV, so + // check that its MVD relative to the *current* reference MV is + // representable at pb_mv_precision (otherwise the decoder would + // reconstruct a different MV -- bitstream mismatch). + MV reuse_mvd; + get_mvd_from_ref_mv(reuse_mv.as_mv, ref_mv, is_adaptive_mvd, + pb_mv_precision, &reuse_mvd); + if (av2_is_subpelmv_in_range(&mv_limits, reuse_mv.as_mv) && + is_this_mv_precision_compliant(reuse_mvd, pb_mv_precision)) { + *rate_mv = + av2_mv_bit_cost(&reuse_mv.as_mv, &ref_mv, pb_mv_precision, + &x->mv_costs, MV_COST_WEIGHT, is_adaptive_mvd); + const int cur_idx = get_ref_mv_idx(mbmi, 0); + args->single_newmv[pb_mv_precision][cur_idx][refs[0]] = reuse_mv; + args->single_newmv_rate[pb_mv_precision][cur_idx][refs[0]] = + *rate_mv; + args->single_newmv_valid[pb_mv_precision][cur_idx][refs[0]] = 1; + cur_mv[0].as_int = reuse_mv.as_int; + return 0; + } + } + } + int search_range = INT_MAX; if (cpi->sf.mv_sf.reduce_search_range && mbmi->ref_mv_idx[0] > 0) { const MV ref_mv = av2_get_ref_mv(x, ref_idx).as_mv; diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index e3cbe00f7f..fcc046e88a 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -346,6 +346,17 @@ static void set_good_speed_features_framesize_independent( sf->tx_sf.adaptive_tx_partition_type_search_idx = 4; sf->inter_sf.prune_comp_search_by_single_result = boosted ? 2 : 1; + + // Skip the second-best full-pel candidate's subpel refinement in the + // single-ref NEWMV search. + sf->mv_sf.skip_second_best_subpel = 1; + + // Predictive single-ref NEWMV reuse across the DRL. + sf->mv_sf.predict_repeated_newmv = 1; + + // Cap the DRL depth for a fresh single-ref NEWMV search; reuse the + // nearest searched result beyond the cap. + sf->mv_sf.newmv_drl_search_limit = 2; } if (speed >= 2) { @@ -657,6 +668,9 @@ static AVM_INLINE void init_mv_sf(MV_SPEED_FEATURES *mv_sf) { mv_sf->exhaustive_searches_thresh = 0; mv_sf->prune_mesh_search = 0; mv_sf->reduce_search_range = 0; + mv_sf->skip_second_best_subpel = 0; + mv_sf->predict_repeated_newmv = 0; + mv_sf->newmv_drl_search_limit = 0; mv_sf->search_method = NSTEP; mv_sf->simple_motion_subpel_force_stop = EIGHTH_PEL; mv_sf->subpel_force_stop = EIGHTH_PEL; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 240939eb8d..1bcbbaf9d2 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -477,6 +477,21 @@ typedef struct MV_SPEED_FEATURES { // Reduce single motion search range based on MV result of prior ref_mv_idx. int reduce_search_range; + // When set, skip the second-best full-pel candidate's subpel refinement in + // the single-ref NEWMV search. + int skip_second_best_subpel; + + // Predictively reuse single-ref NEWMV results across the DRL. + // 0: off + // 1: reuse when reference MVs are within one full pel. + int predict_repeated_newmv; + + // Cap the DRL depth that runs a fresh single-ref NEWMV motion search; + // beyond the cap, reuse the nearest searched result. + // 0: off (no cap). + // K: search ref_mv_idx 0..K-1, reuse for ref_mv_idx >= K. + int newmv_drl_search_limit; + // Prune mesh search. int prune_mesh_search; From 220e1f97c5d67576fbf5833bb0335482b7d2b698 Mon Sep 17 00:00:00 2001 From: yeqing-wu Date: Thu, 16 Jul 2026 09:25:03 -0700 Subject: [PATCH 11/51] Add pruning for refinemv, INTERINTRA, and WARP_DELTA (#5102) Enables three ref-index based pruning speed features at speed >= 1: - prune_refinemv_by_ref_idx: skip refinemv_loop == 1 for ref-pairs other than (0, 1). - prune_interintra_by_ref_idx: skip INTERINTRA motion mode when ref_frame[0] > 1. - prune_warp_delta_by_ref_idx: skip WARP_DELTA motion mode when ref_frame[0] > 2. STATS_CHANGED Anchor: commit 165345b Speed 1 (cpu-used=1): FG16 CTC (33 frames, class A1 and A2, RA) Speed 4 (cpu-used=4): FG16 CTC (33 frames, class A1 and A2, RA) ``` 1) Speed 1 a) Overall performance (all three features combined) +------------+------+-------+-------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+-------+-------+------+------+------+ | A1 | 0.02 | -0.15 | 0.05 | 0.01 | 93 | 101 | | A2 | 0.12 | 0.36 | -0.03 | 0.12 | 93 | 100 | | Avg w/o B2 | 0.09 | 0.21 | -0.00 | 0.09 | 93 | 100 | +------------+------+-------+-------+------+------+------+ b) Performance of prune_refinemv_by_ref_idx only +------------+-------+-------+-------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+-------+-------+-------+-------+------+------+ | A1 | -0.01 | -0.14 | -0.34 | -0.04 | 99 | 101 | | A2 | 0.04 | 0.06 | -0.25 | 0.02 | 99 | 100 | | Avg w/o B2 | 0.02 | 0.00 | -0.28 | 0.00 | 99 | 100 | +------------+-------+-------+-------+-------+------+------+ c) Performance of prune_interintra_by_ref_idx only +------------+------+-------+------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+-------+------+------+------+------+ | A1 | 0.04 | -0.02 | 0.04 | 0.04 | 98 | 100 | | A2 | 0.02 | 0.27 | 0.08 | 0.03 | 98 | 100 | | Avg w/o B2 | 0.03 | 0.18 | 0.07 | 0.03 | 98 | 100 | +------------+------+-------+------+------+------+------+ d) Performance of prune_warp_delta_by_ref_idx only +------------+------+------+-------+------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+------+------+-------+------+------+------+ | A1 | 0.03 | 0.00 | 0.12 | 0.03 | 95 | 101 | | A2 | 0.07 | 0.11 | -0.07 | 0.07 | 96 | 100 | | Avg w/o B2 | 0.06 | 0.08 | -0.01 | 0.06 | 96 | 100 | +------------+------+------+-------+------+------+------+ 2) Speed 4 Overall performance (all three features combined) +------------+-------+-------+-------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+-------+-------+-------+-------+------+------+ | A1 | -0.01 | -0.09 | -0.01 | -0.02 | 90 | 101 | | A2 | 0.14 | 0.33 | 0.18 | 0.14 | 89 | 101 | | Avg w/o B2 | 0.09 | 0.20 | 0.12 | 0.09 | 89 | 101 | +------------+------+-------+-------+-------+------+------+ ``` --- av2/encoder/rdopt.c | 15 +++++++++++++++ av2/encoder/speed_features.c | 6 ++++++ av2/encoder/speed_features.h | 12 ++++++++++++ 3 files changed, 33 insertions(+) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 899ac81ae6..d5a03f60c3 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -2964,11 +2964,15 @@ static AVM_INLINE int evaluate_motion_mode_trial( &tmp_rate2) < 0) return -1; } else if (mbmi->motion_mode == INTERINTRA) { + if (cpi->sf.inter_sf.prune_interintra_by_ref_idx && mbmi->ref_frame[0] > 1) + return -1; if (av2_handle_inter_intra_mode(cpi, x, bsize, mbmi, args, *ref_best_rd, &tmp_rate_mv, &tmp_rate2, orig_dst) < 0) return -1; assert(mbmi->motion_mode == INTERINTRA); } else if (mbmi->motion_mode == WARP_DELTA) { + if (cpi->sf.inter_sf.prune_warp_delta_by_ref_idx && mbmi->ref_frame[0] > 2) + return -1; if (handle_warp_delta_mode( cpi, x, bsize, mbmi, mbmi_ext, args, *ref_best_rd, orig_dst, ctx->previous_mvs, ctx->prev_best_models, org_warp_inter_intra, @@ -5025,6 +5029,12 @@ static void evaluate_inter_predictor(AV2_COMP *const cpi, } } restore_dst_buf(xd, *env->orig_dst, num_planes); + // motion_mode_rd() may leave mbmi->motion_mode set to a non-SIMPLE + // winner. The winning value has already been captured into + // search_state->best_mbmi and winner_mode_stats above. Restore here so + // the outer caller (handle_inter_mode) sees SIMPLE_TRANSLATION at the + // top of its next per-precision iteration. + mbmi->motion_mode = SIMPLE_TRANSLATION; } /*!\brief AV2 inter mode RD computation @@ -5634,6 +5644,11 @@ static int64_t handle_inter_mode( &base_mbmi, 0, num_planes, args->skip_motion_mode); for (int refinemv_loop = 0; refinemv_loop < REFINEMV_NUM_MODES; refinemv_loop++) { + if (refinemv_loop == 1 && + cpi->sf.inter_sf.prune_refinemv_by_ref_idx && + !(base_mbmi.ref_frame[0] == 0 && + base_mbmi.ref_frame[1] == 1)) + continue; it_ctx.refinemv_loop = refinemv_loop; evaluate_inter_predictor( cpi, tile_data, x, &env, &it_ctx, &search_state, diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index fcc046e88a..04a13bed52 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -341,6 +341,9 @@ static void set_good_speed_features_framesize_independent( // TODO (Yeqing Wu): need to be tuned for speed > 1. sf->inter_sf.skip_compound_prune_top_refs_num_ref0 = 1; sf->inter_sf.skip_compound_prune_top_refs_num_ref1 = 2; + sf->inter_sf.prune_refinemv_by_ref_idx = 1; + sf->inter_sf.prune_interintra_by_ref_idx = 1; + sf->inter_sf.prune_warp_delta_by_ref_idx = 1; sf->tx_sf.adaptive_tx_type_search_idx = 4; sf->tx_sf.adaptive_tx_partition_type_search_idx = 4; @@ -723,6 +726,9 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->prune_compound_using_single_ref = 0; inter_sf->skip_compound_prune_top_refs_num_ref0 = 0; inter_sf->skip_compound_prune_top_refs_num_ref1 = 0; + inter_sf->prune_refinemv_by_ref_idx = 0; + inter_sf->prune_interintra_by_ref_idx = 0; + inter_sf->prune_warp_delta_by_ref_idx = 0; inter_sf->prune_comp_using_best_single_mode_ref = 0; inter_sf->prune_mode_search_simple_translation = 0; inter_sf->prune_comp_type_by_comp_avg = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 1bcbbaf9d2..208a59dd1a 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -634,6 +634,18 @@ typedef struct INTER_MODE_SPEED_FEATURES { int skip_compound_prune_top_refs_num_ref0; int skip_compound_prune_top_refs_num_ref1; + // Skip refinemv_loop == 1 for ref-pairs other than (0, 1). Enabled at + // speed >= 1. + int prune_refinemv_by_ref_idx; + + // Skip INTERINTRA motion mode when ref_frame[0] > 1. Enabled at + // speed >= 1. + int prune_interintra_by_ref_idx; + + // Skip WARP_DELTA motion mode when ref_frame[0] > 2. Enabled at + // speed >= 1. + int prune_warp_delta_by_ref_idx; + // Skip extended compound mode when ref frame corresponding to NEWMV does not // have NEWMV as single mode winner. // 0 : no pruning From 3d31d48c260c526c61ca7d3972586d16352d2a38 Mon Sep 17 00:00:00 2001 From: yeqing-wu Date: Thu, 16 Jul 2026 13:33:34 -0700 Subject: [PATCH 12/51] Skip IST/STX cascade for intra-luma zero-quant primary (#5103) Extend the intra-luma IST/STX pre-skip and post-trellis gates to cover eob == 0 in addition to the existing eob == 1 (DC-only) case. The eob == 0 branch kills candidates only when stx > 0, so a non-DCT primary with stx == 0 that quantizes to all-zero can still win via skip coding. Add a pre-quant L-infinity gate that predicts primary FP-quant eob = 0 directly from the post-primary coefficients (max |coeff| below the FP quantizer kill threshold min(dq0, dq1) >> (4 + log_scale)). When fired, av2_quant + av2_optimize_b + cost_coeffs are skipped and the same eob_found / DCT_DCT propagation as the post-quant gate is applied. Scoped to intra Y, stx == 0, non-DC-only, IST-enabled, non-QM blocks. Gated behind a new tx_sf.prune_intra_ist_stx_by_zero_eob flag, off by default and enabled at speed >= 1. Encoding at speed 0 is unchanged from the baseline. STATS_CHANGED Anchor: commit dd84ac96d1 Speed 1 (cpu-used=1): FG16 CTC (33 frames, RA) ``` +------------+-------+-------+-------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | Dec% | +------------+-------+-------+-------+-------+------+------+ | A1 | 0.06 | -0.20 | -0.34 | 0.02 | 98 | 100 | | A2 | 0.09 | -0.18 | -0.12 | 0.07 | 97 | 100 | | A3 | 0.05 | 0.58 | 0.48 | 0.07 | 96 | 99 | | A4 | 0.09 | 0.22 | -3.02 | -0.01 | 97 | 99 | | A5 | -0.12 | -2.35 | 2.22 | -0.12 | 97 | 101 | | B1 | 0.14 | -0.94 | -0.28 | 0.09 | 97 | 101 | | B2 | -0.48 | -0.71 | 0.30 | -0.46 | 97 | 97 | | Avg w/o B2 | 0.07 | -0.32 | -0.24 | 0.04 | 97 | 100 | +------------+-------+-------+-------+-------+------+------+ ``` --- av2/encoder/speed_features.c | 2 + av2/encoder/speed_features.h | 8 ++++ av2/encoder/tx_search.c | 75 ++++++++++++++++++++++++++++++++++-- 3 files changed, 82 insertions(+), 3 deletions(-) diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 04a13bed52..85b71a2abc 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -347,6 +347,7 @@ static void set_good_speed_features_framesize_independent( sf->tx_sf.adaptive_tx_type_search_idx = 4; sf->tx_sf.adaptive_tx_partition_type_search_idx = 4; + sf->tx_sf.prune_intra_ist_stx_by_zero_eob = true; sf->inter_sf.prune_comp_search_by_single_result = boosted ? 2 : 1; @@ -788,6 +789,7 @@ static AVM_INLINE void init_tx_sf(TX_SPEED_FEATURES *tx_sf) { tx_sf->restrict_tx_partition_type_search = 0; tx_sf->prune_inter_tx_part_rd_eval = false; tx_sf->enable_tx_partition = true; + tx_sf->prune_intra_ist_stx_by_zero_eob = false; } static AVM_INLINE void init_rd_sf(RD_CALC_SPEED_FEATURES *rd_sf, diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 208a59dd1a..7cccf56326 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -814,6 +814,14 @@ typedef struct TX_SPEED_FEATURES { // Enable txfm partition search bool enable_tx_partition; + + // Skip IST/STX cascade for intra-luma candidates whose primary transform + // quantizes to zero. Extends the intra-luma pre-skip / post-trellis gates + // from eob == 1 to also cover eob == 0 (stx > 0 only, so skip-coded + // non-DCT winners survive) and adds a pre-quant L-infinity gate that + // predicts eob == 0 from the post-primary coefficients to skip + // av2_quant + trellis + cost_coeffs. + bool prune_intra_ist_stx_by_zero_eob; } TX_SPEED_FEATURES; typedef struct RD_CALC_SPEED_FEATURES { diff --git a/av2/encoder/tx_search.c b/av2/encoder/tx_search.c index 23e0a989c8..373a194f89 100644 --- a/av2/encoder/tx_search.c +++ b/av2/encoder/tx_search.c @@ -2094,6 +2094,29 @@ static bool prune_sec_txfm_rd_eval(int64_t sec_tx_sse_to_be_coded, // Encoder-only variable to reudce the search complexity of IST #define IST_REDUCED_SEARCH_SET_SIZE 4 +// Return 1 if primary FP-quant is guaranteed to produce eob = 0 across the +// IST window, 0 otherwise. Uses an L-infinity scan of the post-primary +// coefficients against the FP quantizer's kill threshold +// abs(coeff) < min(dequant[0], dequant[1]) >> (4 + log_scale) +// which upper-bounds the per-position quantizer kill rule +// (av2_highbd_quantize_fp_facade in av2_quantize.c). +static INLINE int check_primary_quant_all_zero(const tran_low_t *coeff, + const int32_t dequant_QTX[2], + int width, int height, + int log_scale) { + const int shift = 4 + log_scale; + const int32_t deq_min = AVMMIN(dequant_QTX[0], dequant_QTX[1]); + const int32_t thr = deq_min >> shift; + if (thr <= 0) return 0; + const uint32_t uthr = (uint32_t)thr; + const int n = width * height; + for (int i = 0; i < n; ++i) { + const int32_t a = (coeff[i] < 0) ? -coeff[i] : coeff[i]; + if ((uint32_t)a >= uthr) return 0; + } + return 1; +} + // Search for the best transform type for a given transform block. // This function can be used for both inter and intra, both luma and chroma. static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, @@ -2399,6 +2422,30 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, } *coeffs_available = 1; + // Pre-IST quant-zero gate. Predict primary FP-quant eob = 0 from the + // post-primary coefficients and, if so, skip av2_quant / trellis / + // cost_coeffs and propagate the same eob_found / DCT_DCT handling as + // the post-quant eob == 1 gate below. Scoped to intra Y, stx == 0, + // non-DC-only, IST-enabled, non-QM blocks. + if (cpi->sf.tx_sf.prune_intra_ist_stx_by_zero_eob && + plane == PLANE_TYPE_Y && !is_inter && stx == 0 && !dc_only_blk && + xd->enable_ist && + !av2_use_qmatrix(&cm->quant_params, xd, mbmi->segment_id)) { + const int tr_w = AVMMIN(tx_size_wide[tx_size], 32); + const int tr_h = AVMMIN(tx_size_high[tx_size], 32); + const int log_scale = av2_get_tx_scale(tx_size); + if (check_primary_quant_all_zero(p->coeff + BLOCK_OFFSET(block), + x->plane[plane].dequant_QTX, tr_w, + tr_h, log_scale)) { + p->eobs[block] = 0; + if (tx_type1 == DCT_DCT) eob_found = 1; + if (tx_type1 != DCT_DCT || (stx && primary_tx_type)) { + update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); + continue; + } + } + } + const TX_CLASS tx_class = tx_type_to_class[get_primary_tx_type(tx_type)]; if (tcq_enable(cm->features.tcq_mode, @@ -2424,11 +2471,22 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, } } - // pre-skip DC only case to make things faster + // Pre-skip the all-zero (eob == 0) and DC-only (eob == 1) cases on + // intra luma. The eob == 1 branch kills the candidate when the + // primary is non-DCT or stx > 0. The eob == 0 branch is narrower: + // it only kills stx > 0 candidates, so a non-DCT primary with + // stx == 0 that quantized to all-zero can still win via skip + // coding (bitstream signals the tx_type and elides the + // coefficients). uint16_t *const eob = &p->eobs[block]; - if (*eob == 1 && plane == PLANE_TYPE_Y && !is_inter) { + if (plane == PLANE_TYPE_Y && !is_inter && + (*eob == 1 || + (cpi->sf.tx_sf.prune_intra_ist_stx_by_zero_eob && *eob == 0))) { if (tx_type1 == DCT_DCT) eob_found = 1; - if (tx_type1 != DCT_DCT || (stx && primary_tx_type)) { + const int kill = + (*eob == 1) ? (tx_type1 != DCT_DCT || (stx && primary_tx_type)) + : (stx > 0); + if (kill) { update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); continue; } @@ -2456,6 +2514,9 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, cost_coeffs(cm, x, plane, block, tx_size, tx_type, CCTX_NONE, txb_ctx, cm->features.reduced_tx_set_used); } + // Post-trellis safety net: re-apply the same eob == 0 / eob == 1 + // pre-skip logic in case trellis (RDOQ) adjusted the eob across + // the threshold. if (*eob == 1 && plane == PLANE_TYPE_Y && !is_inter) { if (tx_type1 == DCT_DCT) eob_found = 1; if (tx_type1 != DCT_DCT || (stx && primary_tx_type)) { @@ -2465,6 +2526,14 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, if (get_secondary_tx_type(tx_type) > 0) continue; if (txfm_param.sec_tx_type > 0) continue; } + if (cpi->sf.tx_sf.prune_intra_ist_stx_by_zero_eob && *eob == 0 && + plane == PLANE_TYPE_Y && !is_inter) { + if (tx_type1 == DCT_DCT) eob_found = 1; + if (stx > 0) { + update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); + continue; + } + } if (*eob <= 3 && plane == PLANE_TYPE_Y && is_inter && stx) { update_txk_array(xd, blk_row, blk_col, tx_size, primary_tx_type); continue; From d7db1f7dffd1447619f0646417614aaf118951c2 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Thu, 16 Jul 2026 14:51:50 -0700 Subject: [PATCH 13/51] Rework av2_encode_block_intra_joint_uv (#5118) Make it properly handle cctx cases. Take out coeff dropout to be consistent with what's used in RD search stage. Re-do u plane if its eob is different from that's in RD search to avoid potential mismatch issues due to the change of cctx_type. Tested for A2 and A4 in speed 1 with 33 frames. No coding stats change observed. --- av2/encoder/encodemb.c | 107 +++++++++-------------------------------- 1 file changed, 23 insertions(+), 84 deletions(-) diff --git a/av2/encoder/encodemb.c b/av2/encoder/encodemb.c index 9a704371ae..3598d97247 100644 --- a/av2/encoder/encodemb.c +++ b/av2/encoder/encodemb.c @@ -1708,67 +1708,36 @@ void av2_encode_block_intra_joint_uv(int block, int blk_row, int blk_col, av2_setup_quant(tx_size, use_trellis, quant_idx, cpi->oxcf.q_cfg.quant_b_adapt, &quant_param); - // Settings for optimization type. NOTE: To set optimization type for all - // intra frames, both `KEY_BLOCK_OPT_TYPE` and `INTRA_BLOCK_OPT_TYPE` should - // be set. - // TODO(yjshen): These settings are hard-coded and look okay for now. They - // should be made configurable later. - // Blocks of key frames ONLY. - OPT_TYPE KEY_BLOCK_OPT_TYPE = TRELLIS_DROPOUT_OPT; - // Blocks of intra frames (key frames EXCLUSIVE). - OPT_TYPE INTRA_BLOCK_OPT_TYPE = TRELLIS_DROPOUT_OPT; - - int use_tcq = cm->features.tcq_mode != 0; - if (use_tcq) { - // Dropout setting should be disabled when Trellis Coded Quant is - // enabled. - KEY_BLOCK_OPT_TYPE = TRELLIS_OPT; - // Blocks of intra frames (key frames EXCLUSIVE). - INTRA_BLOCK_OPT_TYPE = TRELLIS_OPT; - } - - // Whether trellis or dropout optimization is required for key frames and - // intra frames. - const bool do_trellis = (frame_is_intra_only(cm) && - (KEY_BLOCK_OPT_TYPE == TRELLIS_OPT || - KEY_BLOCK_OPT_TYPE == TRELLIS_DROPOUT_OPT)) || - (!frame_is_intra_only(cm) && - (INTRA_BLOCK_OPT_TYPE == TRELLIS_OPT || - INTRA_BLOCK_OPT_TYPE == TRELLIS_DROPOUT_OPT)); - const bool do_dropout = (frame_is_intra_only(cm) && - (KEY_BLOCK_OPT_TYPE == DROPOUT_OPT || - KEY_BLOCK_OPT_TYPE == TRELLIS_DROPOUT_OPT)) || - (!frame_is_intra_only(cm) && - (INTRA_BLOCK_OPT_TYPE == DROPOUT_OPT || - INTRA_BLOCK_OPT_TYPE == TRELLIS_DROPOUT_OPT)); for (int plane = AVM_PLANE_U; plane <= AVM_PLANE_V; plane++) { - if (plane == AVM_PLANE_V && !is_inter_block(xd->mi[0], xd->tree_type) && - *eob_c1 == 1) { - update_cctx_array(xd, blk_row, blk_col, 0, 0, - args->dry_run ? TX_4X4 : tx_size, CCTX_NONE); - cctx_type = av2_get_cctx_type(xd, blk_row, blk_col); - } - // Since eob can be updated here, make sure cctx_type is always CCTX_NONE - // when eob of U is 0. - if (plane == AVM_PLANE_V && *eob_c1 == 0) { - // In dry run, cctx type will not be referenced by neighboring blocks, - // so there is no need to fill in the whole chroma region. In addition, - // ctx->cctx_type_map size in dry run may not be aligned with actual - // chroma coding region for some partition types. - update_cctx_array(xd, blk_row, blk_col, 0, 0, - args->dry_run ? TX_4X4 : tx_size, CCTX_NONE); - } - if (plane == AVM_PLANE_V && *eob_c1 == 0 && cctx_type > CCTX_NONE) { - av2_quantize_skip(av2_get_max_eob(tx_size), - p_c2->qcoeff + BLOCK_OFFSET(block), dqcoeff_c2, eob_c2); - break; + if (plane == AVM_PLANE_V && (*eob_c1 == 0 || *eob_c1 == 1) && + cctx_type != CCTX_NONE) { + cctx_type = CCTX_NONE; + // If the encoding stage uses a different cctx_type from the one + // used in the rd stage, re-do the u plane with the updated cctx_type. + av2_setup_xform(cm, x, AVM_PLANE_U, tx_size, tx_type, cctx_type, + &txfm_param); + av2_setup_qmatrix(&cm->quant_params, xd, AVM_PLANE_U, tx_size, tx_type, + &quant_param); + av2_xform_quant(cm, x, AVM_PLANE_U, block, blk_row, blk_col, plane_bsize, + &txfm_param, &quant_param); + if (quant_param.use_optimize_b) { + const ENTROPY_CONTEXT *a = &args->ta[blk_col]; + const ENTROPY_CONTEXT *l = &args->tl[blk_row]; + TXB_CTX txb_ctx; + get_txb_ctx(plane_bsize, tx_size, AVM_PLANE_U, a, l, &txb_ctx, + xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] && + cm->seq_params.enable_fsc); + av2_optimize_b(args->cpi, x, AVM_PLANE_U, block, tx_size, tx_type, + cctx_type, &txb_ctx, &dummy_rate_cost); + } } + av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type, &quant_param); av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param, &quant_param); - if (quant_param.use_optimize_b && do_trellis) { + if (quant_param.use_optimize_b) { const ENTROPY_CONTEXT *a = &args->ta[blk_col + (plane - AVM_PLANE_U) * MAX_MIB_SIZE]; const ENTROPY_CONTEXT *l = @@ -1780,36 +1749,6 @@ void av2_encode_block_intra_joint_uv(int block, int blk_row, int blk_col, av2_optimize_b(args->cpi, x, plane, block, tx_size, tx_type, cctx_type, &txb_ctx, &dummy_rate_cost); } - if (do_dropout) { - av2_dropout_qcoeff(x, plane, block, tx_size, tx_type, - cm->quant_params.base_qindex); - } - if (plane == AVM_PLANE_V && !is_inter_block(xd->mi[0], xd->tree_type) && - *eob_c1 == 1) { - update_cctx_array(xd, blk_row, blk_col, 0, 0, - args->dry_run ? TX_4X4 : tx_size, CCTX_NONE); - cctx_type = av2_get_cctx_type(xd, blk_row, blk_col); - av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type, - &quant_param); - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, - &txfm_param, &quant_param); - if (quant_param.use_optimize_b && do_trellis) { - const ENTROPY_CONTEXT *a = - &args->ta[blk_col + (plane - AVM_PLANE_U) * MAX_MIB_SIZE]; - const ENTROPY_CONTEXT *l = - &args->tl[blk_row + (plane - AVM_PLANE_U) * MAX_MIB_SIZE]; - TXB_CTX txb_ctx; - get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx, - xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] && - cm->seq_params.enable_fsc); - av2_optimize_b(args->cpi, x, plane, block, tx_size, tx_type, cctx_type, - &txb_ctx, &dummy_rate_cost); - } - if (do_dropout) { - av2_dropout_qcoeff(x, plane, block, tx_size, tx_type, - cm->quant_params.base_qindex); - } - } } if (*eob_c1 || *eob_c2) { From 5c1d92d180bb05e506ffc2772c1cdd688c47c256 Mon Sep 17 00:00:00 2001 From: yeqing-wu Date: Fri, 17 Jul 2026 13:23:37 -0700 Subject: [PATCH 14/51] Remove mlayer/implicit-ref-map TIP suppression (#5119) The unit tests that exercised base-only implicit-ref-map decode of a multi-layer bitstream (the only path where a TIP-winning base-layer block would fail to reconstruct) were removed in 9f0dfe5 (Fix setting in multi_layers tests, #5116), so this encoder-side workaround is no longer needed. --- av2/encoder/rdopt.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index d5a03f60c3..56bdf5e348 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -9012,17 +9012,7 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, cm->current_frame.reference_mode == REFERENCE_MODE_SELECT; const int num_total_refs = cm->ref_frames_info.num_total_refs; - // Suppress TIP on frames that must decode correctly under base-only - // implicit-ref-map decode: base-layer frames (mlayer_id == 0) of a - // multi-layer sequence (number_mlayers > 1) using implicit ref-map - // signalling. TIP's virtual reference is derived from frames that may - // be absent under such decode, so a TIP-winning block on these frames - // would not be correctly decodable. - const int must_avoid_tip_for_base_only_decode = - cm->number_mlayers > 1 && cm->mlayer_id == 0 && - !cm->seq_params.enable_explicit_ref_frame_map; - const int tip_allowed = - is_tip_allowed(cm, xd) && !must_avoid_tip_for_base_only_decode; + const int tip_allowed = is_tip_allowed(cm, xd); const int comp_ref_allowed = cm->current_frame.reference_mode != SINGLE_REFERENCE && is_comp_ref_allowed(bsize); From d36c5381281cd33b5f5dbb371b06e9540bf0dfea Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Sat, 18 Jul 2026 08:58:49 -0700 Subject: [PATCH 15/51] Add cctx type array update back (#5123) Fixed issue #5122 --- av2/encoder/encodemb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/av2/encoder/encodemb.c b/av2/encoder/encodemb.c index 3598d97247..ebf9416215 100644 --- a/av2/encoder/encodemb.c +++ b/av2/encoder/encodemb.c @@ -1712,6 +1712,8 @@ void av2_encode_block_intra_joint_uv(int block, int blk_row, int blk_col, if (plane == AVM_PLANE_V && (*eob_c1 == 0 || *eob_c1 == 1) && cctx_type != CCTX_NONE) { cctx_type = CCTX_NONE; + update_cctx_array(xd, blk_row, blk_col, 0, 0, + args->dry_run ? TX_4X4 : tx_size, CCTX_NONE); // If the encoding stage uses a different cctx_type from the one // used in the rd stage, re-do the u plane with the updated cctx_type. av2_setup_xform(cm, x, AVM_PLANE_U, tx_size, tx_type, cctx_type, From 08a9b57c8b539cf8c4ee7283ac175b0fa5700c49 Mon Sep 17 00:00:00 2001 From: jadhuran Date: Tue, 21 Jul 2026 15:26:06 -0500 Subject: [PATCH 16/51] Skip temporary prediction for opfl modes. (#5126) Skip process_compound_inter() function for opfl modes. Tests - cpu-used =1 Anchor: https://github.com/AOMediaCodec/avm/commit/6e71b0c85924e61d9403b6222921cd4bb8cf870e Results (RA): A1 - 17 frames A2 - 33 frames MR7 --- av2/encoder/rdopt.c | 18 ++++++++++++------ av2/encoder/speed_features.c | 2 ++ av2/encoder/speed_features.h | 3 +++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 56bdf5e348..625128ebe0 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -4891,10 +4891,15 @@ static void evaluate_inter_predictor(AV2_COMP *const cpi, } int compmode_interinter_cost = 0; - + int is_opfl_mode = + (cpi->sf.inter_sf.skip_temporary_pred_for_opfl && + mbmi->mode >= NEAR_NEARMV_OPTFLOW && mbmi->mode < COMP_INTER_MODE_END) + ? 1 + : 0; // Handle a compound predictor, continue if it is determined // this cannot be the best compound mode - if (is_comp_pred && !is_joint_amvd_coding_mode(mbmi->mode, mbmi->use_amvd) && + if (!is_opfl_mode && is_comp_pred && + !is_joint_amvd_coding_mode(mbmi->mode, mbmi->use_amvd) && (!mbmi->refinemv_flag || !switchable_refinemv_flag(cm, mbmi))) { const int not_best_mode = process_compound_inter_mode( cpi, x, env->args, *search_state->ref_best_rd, tmp_cur_mv, bsize, @@ -4916,9 +4921,10 @@ static void evaluate_inter_predictor(AV2_COMP *const cpi, int64_t ret_val; // Determine the interpolation filter for this mode - ret_val = av2_interpolation_filter_search( - x, cpi, tile_data, bsize, env->tmp_dst, env->orig_dst, &rd, &rs, - &skip_build_pred, env->args, *search_state->ref_best_rd); + if (!is_opfl_mode) + ret_val = av2_interpolation_filter_search( + x, cpi, tile_data, bsize, env->tmp_dst, env->orig_dst, &rd, &rs, + &skip_build_pred, env->args, *search_state->ref_best_rd); assert(check_mv_precision(cm, mbmi, x)); @@ -4926,7 +4932,7 @@ static void evaluate_inter_predictor(AV2_COMP *const cpi, env->args->modelled_rd[eval_mode][ref_mv_idx_type][refs[0]] = rd; } - if (mbmi->mode != WARPMV) { + if (mbmi->mode != WARPMV && !is_opfl_mode) { if (ret_val != 0) { restore_dst_buf(xd, *env->orig_dst, num_planes); return; diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 85b71a2abc..e239569354 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -361,6 +361,7 @@ static void set_good_speed_features_framesize_independent( // Cap the DRL depth for a fresh single-ref NEWMV search; reuse the // nearest searched result beyond the cap. sf->mv_sf.newmv_drl_search_limit = 2; + sf->inter_sf.skip_temporary_pred_for_opfl = 1; } if (speed >= 2) { @@ -705,6 +706,7 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->comp_inter_joint_search_thresh = BLOCK_4X4; inter_sf->adaptive_rd_thresh = 0; inter_sf->model_based_post_interp_filter_breakout = 0; + inter_sf->skip_temporary_pred_for_opfl = 0; inter_sf->reduce_inter_modes = 0; inter_sf->alt_ref_search_fp = 0; inter_sf->selective_ref_frame = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 7cccf56326..722485c968 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -708,6 +708,9 @@ typedef struct INTER_MODE_SPEED_FEATURES { // 1: use model based rd breakout int model_based_post_interp_filter_breakout; + // skip temporary predictions for opfl modes + int skip_temporary_pred_for_opfl; + // Reuse compound type rd decision when exact match is found // 0: No reuse // 1: Reuse the compound type rd data From 40e5a98d8646b06d940cdb160022efc0527b382f Mon Sep 17 00:00:00 2001 From: jadhuran Date: Tue, 21 Jul 2026 17:46:25 -0500 Subject: [PATCH 17/51] Hybrid search of multi way transform in rough search and winner mode search (#5125) Enable winner transform search Add small fix for winner transform Disable 4 way and 5 way transform in rough search and enable in winner Set winner transform candidates to three Disable existing winner transform speed features. Tests - cpu-used =1 Anchor: 6e71b0c85924e61d9403b6222921cd4bb8cf870e Results (RA): A1 - 17 frames A2 - 33 frames
+---------+-------+--------+-------+-------+----------+----------+
| Summary |   Y   |   U    |   V   |  YUV  | Enc-time | Dec-time |
+---------+-------+--------+-------+-------+----------+----------+
| A1      | 0.13% | 0.01%  | 0.20% | 0.13% | 93.6%    | 100%   |
| A2      | 0.17% | -0.15% | 0.06% | 0.15% | 92.3%    | 100%   |
+---------+-------+--------+-------+-------+----------+----------+
--- av2/encoder/block.h | 10 ++++++- av2/encoder/rdopt.c | 51 ++++++++++++++++++++++++++-------- av2/encoder/rdopt_utils.h | 9 ++++-- av2/encoder/speed_features.c | 24 ++++++++++++++++ av2/encoder/speed_features.h | 3 ++ av2/encoder/tx_search.c | 54 ++++++++++++++++++++++++++++++++++-- 6 files changed, 133 insertions(+), 18 deletions(-) diff --git a/av2/encoder/block.h b/av2/encoder/block.h index 30752e4f39..8d75f4e5e2 100644 --- a/av2/encoder/block.h +++ b/av2/encoder/block.h @@ -37,7 +37,8 @@ extern "C" { //! Number of intra winner modes kept #define MAX_WINNER_MODE_COUNT_INTRA 3 //! Number of inter winner modes kept -#define MAX_WINNER_MODE_COUNT_INTER 1 +#define MAX_WINNER_MODE_COUNT_INTER 3 + //! Number of txfm hash records kept for the partition block. #define RD_RECORD_BUFFER_LEN 8 //! Number of txfm hash records kept for the txfm block. @@ -772,6 +773,13 @@ typedef struct { * Flag to enable/disable DC block prediction. */ unsigned int predict_dc_level; + /*! \brief Flag to enable/disable multi-way partition for transform. + * + * 0 means mode default. + * 1 means mode eval + * 2 means mode winner + */ + int eval_mode_type; } TxfmSearchParams; /*!\cond */ diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 625128ebe0..ccfb287aab 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -6855,7 +6855,8 @@ static AVM_INLINE MB_MODE_INFO *get_winner_mode_stats( MACROBLOCK *x, MB_MODE_INFO *best_mbmode, RD_STATS *best_rd_cost, int best_rate_y, int best_rate_uv, RD_STATS **winner_rd_cost, int *winner_rate_y, int *winner_rate_uv, PREDICTION_MODE *winner_mode, - MULTI_WINNER_MODE_TYPE multi_winner_mode_type, int mode_idx) { + MULTI_WINNER_MODE_TYPE multi_winner_mode_type, int mode_idx, + const AV2_COMMON *const cm, BLOCK_SIZE bsize) { MB_MODE_INFO *winner_mbmi; if (multi_winner_mode_type) { assert(mode_idx >= 0 && mode_idx < x->winner_mode_count); @@ -6866,12 +6867,30 @@ static AVM_INLINE MB_MODE_INFO *get_winner_mode_stats( *winner_rate_y = winner_mode_stat->rate_y; *winner_rate_uv = winner_mode_stat->rate_uv; *winner_mode = winner_mode_stat->mode; + MACROBLOCKD *xd = &x->e_mbd; + if (is_warp_mode(winner_mbmi->motion_mode)) { + if (!winner_mbmi->wm_params[0].invalid) + assign_warpmv(cm, xd->submi, bsize, &winner_mbmi->wm_params[0], + xd->mi_row, xd->mi_col, 0); + if (!winner_mbmi->wm_params[1].invalid) + assign_warpmv(cm, xd->submi, bsize, &winner_mbmi->wm_params[1], + xd->mi_row, xd->mi_col, 1); + } } else { winner_mbmi = best_mbmode; *winner_rd_cost = best_rd_cost; *winner_rate_y = best_rate_y; *winner_rate_uv = best_rate_uv; *winner_mode = best_mbmode->mode; + MACROBLOCKD *xd = &x->e_mbd; + if (is_warp_mode(winner_mbmi->motion_mode)) { + if (!winner_mbmi->wm_params[0].invalid) + assign_warpmv(cm, xd->submi, bsize, &winner_mbmi->wm_params[0], + xd->mi_row, xd->mi_col, 0); + if (!winner_mbmi->wm_params[1].invalid) + assign_warpmv(cm, xd->submi, bsize, &winner_mbmi->wm_params[1], + xd->mi_row, xd->mi_col, 1); + } } return winner_mbmi; } @@ -6914,7 +6933,7 @@ static AVM_INLINE void refine_winner_mode_tx( MB_MODE_INFO *winner_mbmi = get_winner_mode_stats( x, best_mbmode, rd_cost, best_rate_y, best_rate_uv, &winner_rd_stats, &winner_rate_y, &winner_rate_uv, &winner_mode, - cpi->sf.winner_mode_sf.multi_winner_mode_type, mode_idx); + cpi->sf.winner_mode_sf.multi_winner_mode_type, mode_idx, cm, bsize); if (xd->lossless[winner_mbmi->segment_id] == 0 && winner_mode != MODE_INVALID && @@ -6926,6 +6945,11 @@ static AVM_INLINE void refine_winner_mode_tx( const int skip_ctx = av2_get_skip_txfm_context(xd); *mbmi = *winner_mbmi; + struct macroblockd_plane *p = xd->plane; + const BUFFER_SET orig_dst = { + { p[0].dst.buf, p[1].dst.buf, p[2].dst.buf }, + { p[0].dst.stride, p[1].dst.stride, p[2].dst.stride }, + }; set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]); @@ -6941,15 +6965,14 @@ static AVM_INLINE void refine_winner_mode_tx( if (is_inter_mode(mbmi->mode)) { const int mi_row = xd->mi_row; const int mi_col = xd->mi_col; - av2_enc_build_inter_predictor(cm, xd, mi_row, mi_col, NULL, bsize, 0, - av2_num_planes(cm) - 1); + av2_enc_build_inter_predictor(cm, xd, mi_row, mi_col, &orig_dst, bsize, + 0, av2_num_planes(cm) - 1); av2_subtract_plane(x, bsize, 0, cm->width, cm->height); if (txfm_params->tx_mode_search_type == TX_MODE_SELECT && !xd->lossless[mbmi->segment_id]) { av2_pick_recursive_tx_size_type_yrd(cpi, x, &rd_stats_y, bsize, 1, INT64_MAX); - assert(rd_stats_y.rate != INT_MAX); } else { av2_pick_uniform_tx_size_type_yrd(cpi, x, &rd_stats_y, bsize, INT64_MAX); @@ -8025,7 +8048,7 @@ static INLINE bool in_single_ref_cutoff(const int64_t *ref_frame_rd, } static AVM_INLINE void evaluate_motion_mode_for_winner_candidates( - const AV2_COMP *const cpi, MACROBLOCK *const x, RD_STATS *const rd_cost, + AV2_COMP *const cpi, MACROBLOCK *const x, RD_STATS *const rd_cost, HandleInterModeArgs *const args, TileDataEnc *const tile_data, PICK_MODE_CONTEXT *const ctx, struct buf_2d yv12_mb[SINGLE_REF_FRAMES][MAX_MB_PLANE], @@ -9266,12 +9289,18 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, int winner_mode_count = cpi->sf.winner_mode_sf.multi_winner_mode_type ? x->winner_mode_count : 1; - // In effect only when fast tx search speed features are enabled. - refine_winner_mode_tx(cpi, x, rd_cost, bsize, ctx, &search_state.best_mbmode, - yv12_mb, search_state.best_rate_y, - search_state.best_rate_uv, &search_state.best_skip2, - winner_mode_count); + if (!(winner_mode_count == 1 && search_state.best_mode_skippable)) { + // In effect only when fast tx search speed features are enabled. + refine_winner_mode_tx(cpi, x, rd_cost, bsize, ctx, + &search_state.best_mbmode, yv12_mb, + search_state.best_rate_y, search_state.best_rate_uv, + &search_state.best_skip2, winner_mode_count); + } + + if (search_state.best_rd != rd_cost->rdcost) { + search_state.best_rd = rd_cost->rdcost; + } // Initialize default mode evaluation params set_mode_eval_params(cpi, x, DEFAULT_EVAL); diff --git a/av2/encoder/rdopt_utils.h b/av2/encoder/rdopt_utils.h index ff31f0eb76..8711ccadea 100644 --- a/av2/encoder/rdopt_utils.h +++ b/av2/encoder/rdopt_utils.h @@ -207,6 +207,9 @@ static INLINE int is_winner_mode_processing_enabled( cpi->optimize_seg_arr[mbmi->segment_id] != FINAL_PASS_TRELLIS_OPT) return 1; if (sf->winner_mode_sf.enable_winner_mode_for_tx_size_srch) return 1; + if (sf->winner_mode_sf.disable_multiway_tx_part_in_rough_mode && + mbmi->region_type == MIXED_INTER_INTRA_REGION) + return 1; return 0; } @@ -301,7 +304,7 @@ static INLINE void set_mode_eval_params(const struct AV2_COMP *cpi, winner_mode_params->coeff_opt_dist_threshold, 0, 0); txfm_params->coeff_opt_satd_threshold = get_rd_opt_coeff_thresh( winner_mode_params->coeff_opt_satd_threshold, 0, 0); - + txfm_params->eval_mode_type = DEFAULT_EVAL; // Set default transform size search method set_tx_size_search_method(cm, winner_mode_params, txfm_params, 0, 0, x, sf->tx_sf.use_largest_tx_size_for_small_bsize); @@ -330,7 +333,7 @@ static INLINE void set_mode_eval_params(const struct AV2_COMP *cpi, txfm_params->coeff_opt_satd_threshold = get_rd_opt_coeff_thresh( winner_mode_params->coeff_opt_satd_threshold, sf->winner_mode_sf.enable_winner_mode_for_coeff_opt, 0); - + txfm_params->eval_mode_type = MODE_EVAL; // Set the transform size search method for mode evaluation set_tx_size_search_method( cm, winner_mode_params, txfm_params, @@ -348,7 +351,7 @@ static INLINE void set_mode_eval_params(const struct AV2_COMP *cpi, winner_mode_params->skip_txfm_level[WINNER_MODE_EVAL]; txfm_params->predict_dc_level = winner_mode_params->predict_dc_level[WINNER_MODE_EVAL]; - + txfm_params->eval_mode_type = WINNER_MODE_EVAL; // Set transform domain distortion type for winner mode evaluation set_tx_domain_dist_params( winner_mode_params, txfm_params, diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index e239569354..0bad05c6e7 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -351,6 +351,20 @@ static void set_good_speed_features_framesize_independent( sf->inter_sf.prune_comp_search_by_single_result = boosted ? 2 : 1; + sf->winner_mode_sf.disable_multiway_tx_part_in_rough_mode = 1; + if (!frame_is_intra_only(cm) && + sf->winner_mode_sf.disable_multiway_tx_part_in_rough_mode) { + sf->winner_mode_sf.multi_winner_mode_type = MULTI_WINNER_MODE_DEFAULT; + + sf->tx_sf.tx_type_search.winner_mode_tx_type_pruning = 0; + sf->winner_mode_sf.tx_size_search_level = 0; + sf->winner_mode_sf.enable_winner_mode_for_tx_size_srch = 0; + + sf->tx_sf.tx_type_search.fast_inter_tx_type_search = 0; + sf->inter_sf.prune_warpmv_prob_thresh = 0; + sf->rd_sf.perform_coeff_opt = 0; + } + // Skip the second-best full-pel candidate's subpel refinement in the // single-ref NEWMV search. sf->mv_sf.skip_second_best_subpel = 1; @@ -831,6 +845,7 @@ static AVM_INLINE void init_winner_mode_sf( // Set this at the appropriate speed levels winner_mode_sf->tx_size_search_level = USE_FULL_RD; winner_mode_sf->enable_winner_mode_for_coeff_opt = 0; + winner_mode_sf->disable_multiway_tx_part_in_rough_mode = 0; winner_mode_sf->enable_winner_mode_for_tx_size_srch = 0; winner_mode_sf->enable_winner_mode_for_use_tx_domain_dist = 0; winner_mode_sf->multi_winner_mode_type = 0; @@ -1231,8 +1246,10 @@ void av2_set_speed_features_qindex_dependent(AV2_COMP *cpi, int speed) { const int boosted = frame_is_boosted(cpi); const int is_720p_or_larger = AVMMIN(cm->width, cm->height) >= 720; const int is_1080p_or_larger = AVMMIN(cm->width, cm->height) >= 1080; + const int is_2160p_or_larger = AVMMIN(cm->width, cm->height) >= 2160; const int qindex_offset = MAXQ_OFFSET * (cm->seq_params.bit_depth - 8); + const int qindex_thresh3 = 195 + qindex_offset; if (cpi->oxcf.mode == GOOD && speed == 0) { const int qindex_thresh = 124 + qindex_offset; @@ -1295,6 +1312,13 @@ void av2_set_speed_features_qindex_dependent(AV2_COMP *cpi, int speed) { } } + if (is_2160p_or_larger && cm->quant_params.base_qindex >= qindex_thresh3 && + speed >= 1) { + sf->winner_mode_sf.disable_multiway_tx_part_in_rough_mode = 0; + if (!frame_is_intra_only(cm)) + sf->winner_mode_sf.multi_winner_mode_type = MULTI_WINNER_MODE_OFF; + } + set_erp_speed_features(cpi); set_erp_speed_features_framesize_dependent(cpi); set_erp_speed_features_qindex_dependent(cpi); diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 722485c968..f4fddc9c92 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -865,6 +865,9 @@ typedef struct WINNER_MODE_SPEED_FEATURES { // Flag used to control the winner mode processing for better R-D optimization // of quantized coeffs int enable_winner_mode_for_coeff_opt; + // Disable multiway 4, 5 way transform partition in rough mode + // and enable them in winner mode + int disable_multiway_tx_part_in_rough_mode; // Flag used to control the winner mode processing for transform size // search method diff --git a/av2/encoder/tx_search.c b/av2/encoder/tx_search.c index 373a194f89..c9975fc30e 100644 --- a/av2/encoder/tx_search.c +++ b/av2/encoder/tx_search.c @@ -3074,6 +3074,22 @@ static INLINE bool prune_tx_part_eval_using_none_rd( return false; } +static AVM_INLINE int skip_tx_partition_by_eval_type( + TX_PARTITION_TYPE type, int eval_mode_type, REGION_TYPE region_type, + int disable_multiway_tx_part_in_rough_mode) { + if (!disable_multiway_tx_part_in_rough_mode) return 0; + + if (eval_mode_type == MODE_EVAL && region_type == MIXED_INTER_INTRA_REGION && + type > TX_PARTITION_VERT) + return 1; + + if (eval_mode_type == WINNER_MODE_EVAL && + region_type == MIXED_INTER_INTRA_REGION && type <= TX_PARTITION_VERT) + return 1; + + return 0; +} + // Search for the best tx partition type for a given luma block. static void select_tx_partition_type( const AV2_COMP *cpi, MACROBLOCK *x, int blk_row, int blk_col, int block, @@ -3105,7 +3121,18 @@ static void select_tx_partition_type( TX_SIZE sub_txs[MAX_TX_PARTITIONS] = { 0 }; int64_t best_rd = INT64_MAX; - TX_PARTITION_TYPE best_tx_partition = TX_PARTITION_INVALID; + + const TxfmSearchParams *txfm_params = &x->txfm_search_params; + const int txb_size_index = + is_inter_block(mbmi, xd->tree_type) + ? av2_get_txb_size_index(plane_bsize, blk_row, blk_col) + : 0; + TX_PARTITION_TYPE best_tx_partition = + txfm_params->eval_mode_type == WINNER_MODE_EVAL && + mbmi->region_type == MIXED_INTER_INTRA_REGION && + cpi->sf.winner_mode_sf.disable_multiway_tx_part_in_rough_mode + ? mbmi->tx_partition_type[txb_size_index] + : TX_PARTITION_INVALID; uint8_t best_partition_entropy_ctxs[MAX_TX_PARTITIONS] = { 0 }; TX_TYPE best_partition_tx_types[MAX_TX_PARTITIONS] = { 0 }; uint8_t full_blk_skip[MAX_TX_PARTITIONS] = { 0 }; @@ -3114,6 +3141,12 @@ static void select_tx_partition_type( if (cpi->oxcf.txfm_cfg.reduced_tx_part_set && type > TX_PARTITION_VERT) { break; } + + if (skip_tx_partition_by_eval_type( + type, txfm_params->eval_mode_type, mbmi->region_type, + cpi->sf.winner_mode_sf.disable_multiway_tx_part_in_rough_mode)) + continue; + // Skip any illegal partitions for this block size if (!use_tx_partition(type, plane_bsize, max_tx_size)) continue; if (cpi->sf.tx_sf.enable_tx_partition == false && type) continue; @@ -3418,7 +3451,13 @@ static void choose_tx_size_type_from_rd(const AV2_COMP *const cpi, TX_SIZE best_tx_size = max_tx_size; int is_wide_angle_mapped[MAX_TX_PARTITIONS] = { 0 }; int mapped_wide_angle[MAX_TX_PARTITIONS] = { 0 }; - TX_PARTITION_TYPE best_tx_partition_type = TX_PARTITION_NONE; + assert(!is_inter_block(mbmi, xd->tree_type)); + TX_PARTITION_TYPE best_tx_partition_type = + txfm_params->eval_mode_type == WINNER_MODE_EVAL && + mbmi->region_type == MIXED_INTER_INTRA_REGION && + cpi->sf.winner_mode_sf.disable_multiway_tx_part_in_rough_mode + ? mbmi->tx_partition_type[0] + : TX_PARTITION_NONE; int64_t best_rd = INT64_MAX; x->rd_model = FULL_TXFM_RD; int64_t cur_rd = INT64_MAX; @@ -3427,6 +3466,12 @@ static void choose_tx_size_type_from_rd(const AV2_COMP *const cpi, if (cpi->oxcf.txfm_cfg.reduced_tx_part_set && type > TX_PARTITION_VERT) { break; } + + if (skip_tx_partition_by_eval_type( + type, txfm_params->eval_mode_type, mbmi->region_type, + cpi->sf.winner_mode_sf.disable_multiway_tx_part_in_rough_mode)) + continue; + // Skip any illegal partitions for this block size if (!use_tx_partition(type, bs, max_tx_size)) continue; if (cpi->sf.tx_sf.enable_tx_partition == false && type) continue; @@ -3990,7 +4035,10 @@ void av2_pick_recursive_tx_size_type_yrd(const AV2_COMP *cpi, MACROBLOCK *x, // We should always find at least one candidate unless ref_best_rd is less // than INT64_MAX (in which case, all the calls to select_tx_size_fix_type // might have failed to find something better) - assert(ref_best_rd != INT64_MAX); + assert(IMPLIES(txfm_params->eval_mode_type != WINNER_MODE_EVAL, + ref_best_rd != INT64_MAX)); + + // In winner ref_best_rd is INT64_MAX to avoid any early termination by cost av2_invalid_rd_stats(rd_stats); return; } From b48a78c68e3afedf4fa29dac71b6db450028e8d3 Mon Sep 17 00:00:00 2001 From: leolzhao Date: Tue, 21 Jul 2026 18:38:39 -0700 Subject: [PATCH 18/51] Add a speed level for intra region in inter frames (#5130) Squash merge branch 'leo/inter-sdp-mr' into 'avm-encoder-development' Add a speed level for inter sdp fast method: 1) Early terminate inter-sdp when there is no intra coded blocks in the this region after searching mixed intra and inter region; 2) Early terminate inter-sdp when more than half of the blocks are inter -coded; 3) Early terminate inter-sdp when the best block partitioning is partition-none STATS_CHANGED cpu-use-1 is at commit 6e71b0c859 is used as anchor. A1 - 17 frames (0.02% loss with 95.3% run-time) A2 - 33 frames (0.09% loss with 94.6% run-time) ``` +---------+-------+--------+-------+-------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+-------+--------+-------+-------+----------+----------+ | A1 | 0.01% | 0.17% | 0.11% | 0.02% | 95.3% | 100% | | A2 | 0.07% | 0.14% | 0.42% | 0.09% | 94.6% | 100% | +---------+-------+--------+-------+-------+----------+----------+ ``` --- av2/encoder/partition_search.c | 30 +++++++++++++++++++++--------- av2/encoder/speed_features.c | 6 ++++++ av2/encoder/speed_features.h | 9 +++++++++ 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index 1cc4754703..00dd0293ae 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -4589,8 +4589,8 @@ static AVM_INLINE void prune_ext_partitions_3way( // Early termination of SDP for intra blocks in inter frames static INLINE void early_termination_inter_sdp(PC_TREE *pc_tree, - float *total_count, - float *inter_mode_count) { + unsigned int *total_count, + unsigned int *inter_mode_count) { REGION_TYPE cur_region_type = pc_tree->region_type; if (pc_tree->partitioning == PARTITION_NONE) { if (pc_tree->none[cur_region_type] == NULL) return; @@ -4692,17 +4692,29 @@ static INLINE void search_intra_region_partitioning( MACROBLOCKD *const xd = &x->e_mbd; assert(pc_tree != NULL); + // store the current best partitioning + PARTITION_TYPE cur_best_partitioning = pc_tree->partitioning; + // Add one encoder fast method for early terminating inter-sdp - float total_count = 0; - float inter_mode_count = 0; + unsigned int total_count = 0; + unsigned int inter_mode_count = 0; early_termination_inter_sdp(pc_tree, &total_count, &inter_mode_count); - // if over 60% of the coded blocks under this region are inter coded blocks, - // skip the rdo for inter-sdp - if (total_count * 0.7 < inter_mode_count) return; + if (cpi->sf.part_sf.inter_sdp_fast_method_level >= 1) { + // Optimized fast method (enabled at cpu-used >= 1): + // Check whether there are at least 1 intra coded blocks under this region + if (total_count - inter_mode_count < 1) return; + if (inter_mode_count * 2 > total_count) return; + // if current best partitioning is partition_none, early skip + if (cur_best_partitioning == PARTITION_NONE) return; + } else { + // Original fast method (used at cpu-used == 0): + // if over 70% of the coded blocks under this region are inter coded blocks, + // skip the rdo for inter-sdp + if (total_count * 7 / 10 < inter_mode_count) return; + } pc_tree->region_type = INTRA_REGION; - // store the current best partitioning - PARTITION_TYPE cur_best_partitioning = pc_tree->partitioning; + pc_tree->partitioning = PARTITION_NONE; RD_STATS *sum_rdc = &part_search_state->sum_rdc; diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 0bad05c6e7..2f3ae6ae21 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -376,6 +376,11 @@ static void set_good_speed_features_framesize_independent( // nearest searched result beyond the cap. sf->mv_sf.newmv_drl_search_limit = 2; sf->inter_sf.skip_temporary_pred_for_opfl = 1; + + // Enable the optimized inter-SDP fast method (requires >=1 intra coded + // block, prunes when inter-mode ratio exceeds 50%, and early skips when + // the current best partitioning is PARTITION_NONE). + sf->part_sf.inter_sdp_fast_method_level = 1; } if (speed >= 2) { @@ -671,6 +676,7 @@ static AVM_INLINE void init_part_sf(PARTITION_SPEED_FEATURES *part_sf) { part_sf->ext_recur_depth_level = 0; part_sf->prune_rect_with_split_depth = 0; part_sf->prune_part_h_with_partition_boundary = 0; + part_sf->inter_sdp_fast_method_level = 0; #if CONFIG_ML_PART_SPLIT part_sf->prune_split_with_ml = 0; part_sf->prune_none_with_ml = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index f4fddc9c92..01852deea1 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -422,6 +422,15 @@ typedef struct PARTITION_SPEED_FEATURES { // the current best partition's boundary after searching NONE, HORZ, VERT, and // H-parts. int prune_part_4_with_partition_boundary; + + // Controls the early termination fast method for inter-SDP (search of intra + // region partitioning in inter frames). + // 0: Use the original fast method that early-terminates inter-SDP when more + // than 70% of the coded blocks under this region are inter coded. + // 1: Use the optimized fast method that additionally requires at least one + // intra coded block, prunes when inter ratio exceeds 50%, and early skips + // when current best partitioning is PARTITION_NONE. + int inter_sdp_fast_method_level; #if CONFIG_ML_PART_SPLIT int prune_split_with_ml; int prune_split_ml_level; From d3de6b2d0d0dc0a8b01d9bfd4a77c61e28e666a6 Mon Sep 17 00:00:00 2001 From: jadhuran Date: Wed, 22 Jul 2026 14:46:52 -0500 Subject: [PATCH 19/51] Add 6 param warp search in winner mode by tid (#5129) Enable winner motion mode. Based on tid threshold, choose to perform six parameter warp searches in either winner mode or rough mode. Tests - cpu-used =1 Anchor: https://github.com/AOMediaCodec/avm/commit/6e71b0c85924e61d9403b6222921cd4bb8cf870e Results (RA): A1 - 17 frames A2 - 33 frames ``` +---------+--------+--------+--------+--------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+--------+--------+--------+--------+----------+----------+ | A1 | -0.01% | 0.02% | 0.08% | -0.01% | 98.2% | 100% | | A2 | 0.01% | -0.07% | -0.01% | 0.01% | 98.4% | 101% | +---------+--------+--------+--------+--------+----------+----------+ ``` --- av2/encoder/rdopt.c | 61 +++++++++++++++++++++++++----------- av2/encoder/speed_features.c | 9 ++++++ av2/encoder/speed_features.h | 6 +++- 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index ccfb287aab..0aca26ea1c 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -1655,7 +1655,7 @@ static INLINE int select_modes_to_search(const AV2_COMP *const cpi, // the motion_mode_for_winner_cand speed feature, avoid searching it again. if (cpi->sf.winner_mode_sf.motion_mode_for_winner_cand) { if (!eval_motion_mode) { - modes_to_search = (1 << SIMPLE_TRANSLATION); + modes_to_search |= (1 << SIMPLE_TRANSLATION); } else { // Skip translation, as will have already been evaluated modes_to_search &= ~(1 << SIMPLE_TRANSLATION); @@ -2537,7 +2537,8 @@ static AVM_INLINE int handle_warp_delta_mode( MB_MODE_INFO_EXT *mbmi_ext, HandleInterModeArgs *args, int64_t ref_best_rd, const BUFFER_SET *orig_dst, int_mv *previous_mvs, warp_mode_info_array *prev_best_models, int org_warp_inter_intra, - int rate2_nocoeff, int rate_mv0, int *tmp_rate_mv, int *tmp_rate2) { + int rate2_nocoeff, int rate_mv0, int *tmp_rate_mv, int *tmp_rate2, + int eval_motion_mode) { const AV2_COMMON *cm = &cpi->common; MACROBLOCKD *xd = &x->e_mbd; const int mi_row = xd->mi_row; @@ -2599,14 +2600,23 @@ static AVM_INLINE int handle_warp_delta_mode( mbmi->mv[0].as_int = previous_mvs[mbmi->warp_ref_idx].as_int; } } - valid = av2_refine_mv_for_base_param_warp_model( - cm, xd, mbmi, mbmi_ext, &ms_params, cpi->sf.mv_sf.warp_search_method, - cpi->sf.mv_sf.warp_search_iters); + if (!cpi->sf.inter_sf.enable_six_param_warp_in_winner_mode || + !eval_motion_mode) + valid = av2_refine_mv_for_base_param_warp_model( + cm, xd, mbmi, mbmi_ext, &ms_params, cpi->sf.mv_sf.warp_search_method, + cpi->sf.mv_sf.warp_search_iters); } else { mbmi->six_param_warp_model_flag = get_default_six_param_flag(cm, mbmi); - valid = av2_pick_warp_delta( - cm, xd, mbmi, &ms_params, &x->mode_costs, prev_best_models, - mbmi_ext->warp_param_stack[av2_ref_frame_type(mbmi->ref_frame)]); + const int six_param_enabled_by_tid = + mbmi->six_param_warp_model_flag && + cpi->sf.inter_sf.enable_six_param_warp_in_winner_mode_by_tid; + const bool use_six_param_in_winner = + (eval_motion_mode == six_param_enabled_by_tid); + if (use_six_param_in_winner || + !cpi->sf.inter_sf.enable_six_param_warp_in_winner_mode) + valid = av2_pick_warp_delta( + cm, xd, mbmi, &ms_params, &x->mode_costs, prev_best_models, + mbmi_ext->warp_param_stack[av2_ref_frame_type(mbmi->ref_frame)]); } if (!valid) return -1; @@ -2917,7 +2927,7 @@ static AVM_INLINE int evaluate_motion_mode_trial( int do_tx_search, InterModesInfo *inter_modes_info, int64_t top_motion_mode_model_rd[], const MB_MODE_INFO *base_mbmi, const MotionModeTrialParams *trial, const MotionModeTrialCtx *ctx, - MotionModeBestState *best) { + MotionModeBestState *best, int eval_motion_mode) { const AV2_COMMON *const cm = &cpi->common; TxfmSearchInfo *txfm_info = &x->txfm_search_info; const int num_planes = av2_num_planes(cm); @@ -2973,10 +2983,11 @@ static AVM_INLINE int evaluate_motion_mode_trial( } else if (mbmi->motion_mode == WARP_DELTA) { if (cpi->sf.inter_sf.prune_warp_delta_by_ref_idx && mbmi->ref_frame[0] > 2) return -1; - if (handle_warp_delta_mode( - cpi, x, bsize, mbmi, mbmi_ext, args, *ref_best_rd, orig_dst, - ctx->previous_mvs, ctx->prev_best_models, org_warp_inter_intra, - ctx->rate2_nocoeff, ctx->rate_mv0, &tmp_rate_mv, &tmp_rate2) < 0) + if (handle_warp_delta_mode(cpi, x, bsize, mbmi, mbmi_ext, args, + *ref_best_rd, orig_dst, ctx->previous_mvs, + ctx->prev_best_models, org_warp_inter_intra, + ctx->rate2_nocoeff, ctx->rate_mv0, &tmp_rate_mv, + &tmp_rate2, eval_motion_mode) < 0) return -1; } else if (mbmi->motion_mode == WARP_EXTEND) { if (handle_warp_extend_mode(cpi, x, bsize, mbmi, mbmi_ext, @@ -3269,7 +3280,10 @@ static int64_t motion_mode_rd( for (int mode_index = SIMPLE_TRANSLATION; mode_index < mode_index_end; mode_index++) { if ((modes_to_search & (1 << mode_index)) == 0) continue; - + if (cpi->sf.inter_sf.enable_six_param_warp_in_winner_mode && + eval_motion_mode && + (mode_index == WARP_CAUSAL || mode_index == WARP_EXTEND)) + continue; const int warp_ref_idx_limit = get_warp_ref_idx_limit(xd, &base_mbmi, mbmi_ext, mode_index); @@ -3282,7 +3296,7 @@ static int64_t motion_mode_rd( cpi, tile_data, x, bsize, rd_stats, rd_stats_y, rd_stats_uv, args, &ref_best_rd, ref_skip_rd, orig_dst, best_est_rd, do_tx_search, inter_modes_info, top_motion_mode_model_rd, &base_mbmi, &trial, &ctx, - &best); + &best, eval_motion_mode); if (ret > 0) return INT64_MAX; } else if (base_mbmi.mode == WARPMV) { // WARP_DELTA + WARPMV: iterate warp_inter_intra × ref_idx × mvd_flag @@ -3308,7 +3322,7 @@ static int64_t motion_mode_rd( cpi, tile_data, x, bsize, rd_stats, rd_stats_y, rd_stats_uv, args, &ref_best_rd, ref_skip_rd, orig_dst, best_est_rd, do_tx_search, inter_modes_info, top_motion_mode_model_rd, - &base_mbmi, &trial, &ctx, &best); + &base_mbmi, &trial, &ctx, &best, eval_motion_mode); if (ret > 0) return INT64_MAX; } } @@ -3333,7 +3347,7 @@ static int64_t motion_mode_rd( cpi, tile_data, x, bsize, rd_stats, rd_stats_y, rd_stats_uv, args, &ref_best_rd, ref_skip_rd, orig_dst, best_est_rd, do_tx_search, inter_modes_info, top_motion_mode_model_rd, &base_mbmi, &trial, - &ctx, &best); + &ctx, &best, eval_motion_mode); if (ret > 0) return INT64_MAX; } } @@ -8360,8 +8374,17 @@ static void tx_search_best_inter_candidates( } // Indicates number of winner simple translation modes to be used -static const unsigned int num_winner_motion_modes[3] = { 0, 10, 3 }; +static const unsigned int num_winner_motion_modes[3] = { 0, 10, 6 }; + +// Returns true if a mode is added to the winner mode check. +static AVM_INLINE int is_check_in_winner(const AV2_COMP *cpi, + const MB_MODE_INFO *const mbmi) { + if (!cpi->sf.inter_sf.enable_six_param_warp_in_winner_mode) return 0; + PREDICTION_MODE this_mode = mbmi->mode; + if (this_mode == WARP_NEWMV) return 1; + return 0; +} // Adds a motion mode to the candidate list for motion_mode_for_winner_cand // speed feature. This list consists of modes that have only searched // SIMPLE_TRANSLATION. The final list will be used to search other motion @@ -9233,7 +9256,7 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, if (do_tx_search) search_state.best_skip_rd[0] = skip_rd[0]; search_state.best_skip_rd[1] = skip_rd[1]; } - if (motion_mode_winner) { + if (motion_mode_winner && is_check_in_winner(cpi, mbmi)) { handle_winner_cand(mbmi, &best_motion_mode_cands, max_winner_motion_mode_cand, this_rd, &motion_mode_cand, args.skip_motion_mode); diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 2f3ae6ae21..8b9e0621fe 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -371,6 +371,7 @@ static void set_good_speed_features_framesize_independent( // Predictive single-ref NEWMV reuse across the DRL. sf->mv_sf.predict_repeated_newmv = 1; + sf->inter_sf.enable_six_param_warp_in_winner_mode = 1; // Cap the DRL depth for a fresh single-ref NEWMV search; reuse the // nearest searched result beyond the cap. @@ -605,6 +606,12 @@ static void set_good_speed_features_framesize_independent( sf->winner_mode_sf.dc_blk_pred_level = 2; sf->winner_mode_sf.multi_winner_mode_type = MULTI_WINNER_MODE_OFF; } + + if (sf->inter_sf.enable_six_param_warp_in_winner_mode) { + sf->winner_mode_sf.motion_mode_for_winner_cand = 2; + sf->inter_sf.enable_six_param_warp_in_winner_mode_by_tid = + cm->current_frame.pyramid_level >= 3 ? 1 : 0; + } } static AVM_INLINE void init_hl_sf(HIGH_LEVEL_SPEED_FEATURES *hl_sf) { @@ -723,6 +730,8 @@ static AVM_INLINE void init_flexmv_sf( } static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { + inter_sf->enable_six_param_warp_in_winner_mode = 0; + inter_sf->enable_six_param_warp_in_winner_mode_by_tid = 0; inter_sf->comp_inter_joint_search_thresh = BLOCK_4X4; inter_sf->adaptive_rd_thresh = 0; inter_sf->model_based_post_interp_filter_breakout = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 01852deea1..c07035d59e 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -545,7 +545,11 @@ typedef struct INTER_MODE_SPEED_FEATURES { // Aggressively prune inter modes when best mode is skippable. int prune_inter_modes_if_skippable; - + // Enable six param warp in winner mode + int enable_six_param_warp_in_winner_mode; + // Enable six parameter warp in winner mode by tid. If set to 1, enable six + // parameter warp in winner mode by tid threshold. + int enable_six_param_warp_in_winner_mode_by_tid; // Drop less likely to be picked reference frames in the RD search. // Has five levels for now: 0, 1, 2, 3 and 4, where higher levels prune more // aggressively than lower ones. (0 means no pruning). From 57894a658704a8e68364ad06d9cea7289e295e65 Mon Sep 17 00:00:00 2001 From: kslu-aom Date: Wed, 22 Jul 2026 13:01:14 -0700 Subject: [PATCH 20/51] Disable switchable SMVR at speed >= 1 and rename DMVR as SMVR or refinemv (#5134) Tested on 962f1c4f99 at speed 1, RA 33 frames +------------+-------+-------+-------+-------+-------+ | Class | Y | Cb | Cr | wAvg | Enc% | +------------+-------+-------+-------+-------+-------+ | A1 | +0.06 | +0.01 | +0.07 | +0.06 | 97.06 | | A2 | +0.08 | -0.08 | +0.03 | +0.07 | 96.94 | | Avg | +0.07 | -0.05 | +0.04 | +0.06 | 96.98 | +------------+-------+-------+-------+-------+-------+ --- av2/common/blockd.h | 8 ++++---- av2/common/enums.h | 4 ++-- av2/common/reconinter.c | 26 +++++++++++++------------- av2/common/reconinter.h | 4 ++-- av2/common/tip.c | 10 +++++----- av2/decoder/decodeframe.c | 10 +++++----- av2/decoder/decoder.h | 2 +- av2/encoder/block.h | 2 +- av2/encoder/compound_type.c | 2 +- av2/encoder/encoder.c | 4 ++-- av2/encoder/encoder.h | 2 +- av2/encoder/encoder_alloc.h | 2 +- av2/encoder/ethread.c | 6 +++--- av2/encoder/rdopt.c | 8 ++++++-- av2/encoder/reconinter_enc.c | 20 ++++++++++---------- av2/encoder/speed_features.c | 4 +++- av2/encoder/speed_features.h | 3 +++ 17 files changed, 63 insertions(+), 54 deletions(-) diff --git a/av2/common/blockd.h b/av2/common/blockd.h index 67bd4c293a..c6b5476b69 100644 --- a/av2/common/blockd.h +++ b/av2/common/blockd.h @@ -330,11 +330,11 @@ typedef struct { #define REF_BUFFER_WIDTH \ (REFINEMV_SUBBLOCK_WIDTH + (AVM_INTERP_EXTEND - 1) + AVM_INTERP_EXTEND + \ - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES)) + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES)) #define REF_BUFFER_HEIGHT \ (REFINEMV_SUBBLOCK_HEIGHT + (AVM_INTERP_EXTEND - 1) + AVM_INTERP_EXTEND + \ - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES)) + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES)) typedef struct PadOffset { int left; @@ -476,7 +476,7 @@ typedef struct MB_MODE_INFO { */ uint8_t mb_precision_set; - /*! \brief The flag to signal if DMVR is used for the inter prediction. */ + /*! \brief The flag to signal if SMVR is used for the inter prediction. */ uint8_t refinemv_flag; /*! \brief The motion mode used by the inter prediction. */ @@ -2298,7 +2298,7 @@ typedef struct macroblockd { int16_t *opfl_gxy_bufs; /*! * Temporary buffers used to store intermediate prediction data calculated - * during the OPFL/DMVR. + * during the OPFL/SMVR. */ uint16_t *opfl_dst_bufs; diff --git a/av2/common/enums.h b/av2/common/enums.h index 7aaee8f46a..3dc219a8c4 100644 --- a/av2/common/enums.h +++ b/av2/common/enums.h @@ -73,7 +73,7 @@ extern "C" { #define SUBBLK_REF_EXT_LINES 2 -#define DMVR_SEARCH_EXT_LINES 2 +#define SMVR_SEARCH_EXT_LINES 2 #define WARP_STATS_BUFFER_SIZE \ (MAX_WARP_REF_CANDIDATES * NUM_WARP_PRECISION_MODES) @@ -261,7 +261,7 @@ enum { #define IBC_RIGHT_INTERP_BORDER 1 #define IBC_BOTTOM_INTERP_BORDER 1 -#define DMVR_SEARCH_NUM_NEIGHBORS 24 +#define SMVR_SEARCH_NUM_NEIGHBORS 24 #define MULTI_SEQ_CONFIG_BITS 6 #define PROFILE_BITS 5 #define CONFIG_BITS 6 diff --git a/av2/common/reconinter.c b/av2/common/reconinter.c index 2fa0d8de3a..71742fcb11 100644 --- a/av2/common/reconinter.c +++ b/av2/common/reconinter.c @@ -2742,9 +2742,9 @@ void apply_mv_refinement(const AV2_COMMON *cm, MACROBLOCKD *xd, int plane, bh += 2 * SUBBLK_REF_EXT_LINES; const int dsts_offset = (REFINEMV_SUBBLOCK_WIDTH + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES)) * + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES)) * (REFINEMV_SUBBLOCK_HEIGHT + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES)); + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES)); uint16_t *dsts0[2] = { dst_ref0, dst_ref0 + dsts_offset }; uint16_t *dsts1[2] = { dst_ref1, dst_ref1 + dsts_offset }; int dsts_cur = 0; @@ -2797,7 +2797,7 @@ void apply_mv_refinement(const AV2_COMMON *cm, MACROBLOCKD *xd, int plane, // select sad0 Set sad0 a large value so // that it does not be selected const int dst_stride = REFINEMV_SUBBLOCK_WIDTH + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES); + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES); int sad0 = INT32_MAX >> 1; if (!switchable_refinemv_flags) { av2_refinemv_build_predictors( @@ -2830,7 +2830,7 @@ void apply_mv_refinement(const AV2_COMMON *cm, MACROBLOCKD *xd, int plane, refined_mv[0] = center_mvs[0]; refined_mv[1] = center_mvs[1]; - static const MV neighbors[DMVR_SEARCH_NUM_NEIGHBORS] = { + static const MV neighbors[SMVR_SEARCH_NUM_NEIGHBORS] = { { -2, -2 }, { -2, -1 }, { -2, 0 }, { -2, 1 }, { -2, 2 }, { -1, -2 }, { -1, -1 }, { -1, 0 }, { -1, 1 }, { -1, 2 }, { 0, -2 }, { 0, -1 }, { 0, 1 }, { 0, 2 }, { 1, -2 }, { 1, -1 }, { 1, 0 }, { 1, 1 }, @@ -2853,15 +2853,15 @@ void apply_mv_refinement(const AV2_COMMON *cm, MACROBLOCKD *xd, int plane, inter_pred_params[ref].block_height = ext_bh; inter_pred_params[ref].original_pu_width = pu_width + 4; inter_pred_params[ref].original_pu_height = pu_height + 4; - refined_mv[ref].row -= 8 * DMVR_SEARCH_EXT_LINES; - refined_mv[ref].col -= 8 * DMVR_SEARCH_EXT_LINES; + refined_mv[ref].row -= 8 * SMVR_SEARCH_EXT_LINES; + refined_mv[ref].col -= 8 * SMVR_SEARCH_EXT_LINES; } av2_refinemv_build_predictors(xd, mi_x, mi_y, mc_buf, calc_subpel_params_func, dst_ref0, dst_ref1, dst_stride, refined_mv[0], refined_mv[1], inter_pred_params); - for (int idx = 0; idx < DMVR_SEARCH_NUM_NEIGHBORS; ++idx) { + for (int idx = 0; idx < SMVR_SEARCH_NUM_NEIGHBORS; ++idx) { const MV offset = { neighbors[idx].row, neighbors[idx].col }; uint16_t *dst_ref0_offset = @@ -3030,7 +3030,7 @@ static void build_inter_predictors_8x8_and_bigger_refinemv( dst_ref1, &refinemv_ref0, &refinemv_ref1, best_mv_ref, pu_width, pu_height, ref_area); if (sb_refined_mv) { - // store the DMVR refined MV so that + // store the SMVR refined MV so that // chroma can use it sb_refined_mv[0] = best_mv_ref[0]; sb_refined_mv[1] = best_mv_ref[1]; @@ -3120,7 +3120,7 @@ static void build_inter_predictors_8x8_and_bigger_refinemv( dst0 = refinemv_ref0; dst1 = refinemv_ref1; opfl_dst_stride = REFINEMV_SUBBLOCK_WIDTH + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES); + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES); do_pred = 0; } @@ -3310,15 +3310,15 @@ static void build_inter_predictors_8x8_and_bigger( uint16_t dst0_16_refinemv[2 * (REFINEMV_SUBBLOCK_WIDTH + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES)) * + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES)) * (REFINEMV_SUBBLOCK_HEIGHT + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES))]; + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES))]; uint16_t dst1_16_refinemv[2 * (REFINEMV_SUBBLOCK_WIDTH + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES)) * + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES)) * (REFINEMV_SUBBLOCK_HEIGHT + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES))]; + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES))]; ReferenceArea ref_area[2]; CONV_BUF_TYPE *tmp_conv_dst = xd->tmp_conv_dst; diff --git a/av2/common/reconinter.h b/av2/common/reconinter.h index 245ce08770..cf3591101d 100644 --- a/av2/common/reconinter.h +++ b/av2/common/reconinter.h @@ -691,7 +691,7 @@ static INLINE int is_refinemv_allowed_reference(const AV2_COMMON *cm, int d0, d1; int is_tip = (mbmi->ref_frame[0] == TIP_FRAME); // In error resilient mode, whether a frame is scaled may be unknown, and the - // following logic for parsing is not reliable, so DMVR is disabled. + // following logic for parsing is not reliable, so SMVR is disabled. if (frame_is_sframe(cm)) return 0; if ((get_ref_frame_buf(cm, mbmi->ref_frame[0]) != NULL && @@ -725,7 +725,7 @@ static INLINE int is_refinemv_allowed_reference(const AV2_COMMON *cm, ref1->display_order_hint); } - // reference frame has to be both sides to apply dmvr + // reference frame has to be both sides to apply refinemv if (!((d0 <= 0) ^ (d1 <= 0))) return 0; // Current implementation only supports when both has the same distance diff --git a/av2/common/tip.c b/av2/common/tip.c index a46176bf84..fe3e2d098a 100644 --- a/av2/common/tip.c +++ b/av2/common/tip.c @@ -490,7 +490,7 @@ static AVM_INLINE void tip_build_inter_predictors_8x8( dst0 = refinemv_ref0; dst1 = refinemv_ref1; opfl_dst_stride = REFINEMV_SUBBLOCK_WIDTH + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES); + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES); do_pred = 0; } @@ -627,15 +627,15 @@ static AVM_INLINE void tip_build_inter_predictors_8x8_and_bigger( uint16_t dst0_16_refinemv[2 * (REFINEMV_SUBBLOCK_WIDTH + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES)) * + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES)) * (REFINEMV_SUBBLOCK_HEIGHT + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES))]; + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES))]; uint16_t dst1_16_refinemv[2 * (REFINEMV_SUBBLOCK_WIDTH + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES)) * + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES)) * (REFINEMV_SUBBLOCK_HEIGHT + - 2 * (SUBBLK_REF_EXT_LINES + DMVR_SEARCH_EXT_LINES))]; + 2 * (SUBBLK_REF_EXT_LINES + SMVR_SEARCH_EXT_LINES))]; const int apply_refinemv = (cm->seq_params.enable_refinemv && cm->seq_params.enable_tip_refinemv && diff --git a/av2/decoder/decodeframe.c b/av2/decoder/decodeframe.c index a2103d945c..fcbf89c997 100644 --- a/av2/decoder/decodeframe.c +++ b/av2/decoder/decodeframe.c @@ -630,7 +630,7 @@ static void copy_tip_worker_data(AV2Decoder *pbi, AV2_COMMON *cm) { tip_worker_data->mc_buf[0] = thread_data->td->mc_buf[0]; tip_worker_data->mc_buf[1] = thread_data->td->mc_buf[1]; tip_worker_data->tmp_conv_dst = thread_data->td->tmp_conv_dst; - // Temporary buffers used during the DMVR and OPFL processing. + // Temporary buffers used during the SMVR and OPFL processing. tip_worker_data->xd.opfl_vxy_bufs = thread_data->td->opfl_vxy_bufs; tip_worker_data->xd.opfl_gxy_bufs = thread_data->td->opfl_gxy_bufs; tip_worker_data->xd.opfl_dst_bufs = thread_data->td->opfl_dst_bufs; @@ -4762,7 +4762,7 @@ static const uint8_t *decode_tiles(AV2Decoder *pbi, const uint8_t *data, td->dcb.mc_buf[1] = td->mc_buf[1]; td->dcb.xd.tmp_conv_dst = td->tmp_conv_dst; - // Temporary buffers used during the DMVR and OPFL processing. + // Temporary buffers used during the SMVR and OPFL processing. td->dcb.xd.opfl_vxy_bufs = td->opfl_vxy_bufs; td->dcb.xd.opfl_gxy_bufs = td->opfl_gxy_bufs; td->dcb.xd.opfl_dst_bufs = td->opfl_dst_bufs; @@ -5321,7 +5321,7 @@ void av2_free_mc_tmp_buf(ThreadData *thread_data) { thread_data->tmp_conv_dst = NULL; } -// Free-up the temporary buffers created for DMVR and OPFL processing. +// Free-up the temporary buffers created for SMVR and OPFL processing. void av2_free_opfl_tmp_bufs(ThreadData *thread_data) { avm_free(thread_data->opfl_vxy_bufs); thread_data->opfl_vxy_bufs = NULL; @@ -5333,7 +5333,7 @@ void av2_free_opfl_tmp_bufs(ThreadData *thread_data) { thread_data->opfl_dst_bufs = NULL; } -// Allocate memory for temporary buffers used during the DMVR and OPFL +// Allocate memory for temporary buffers used during the SMVR and OPFL // processing. static AVM_INLINE void allocate_opfl_tmp_bufs(AV2_COMMON *const cm, ThreadData *thread_data) { @@ -5385,7 +5385,7 @@ static AVM_INLINE void reset_dec_workers(AV2Decoder *pbi, thread_data->td->dcb.mc_buf[0] = thread_data->td->mc_buf[0]; thread_data->td->dcb.mc_buf[1] = thread_data->td->mc_buf[1]; thread_data->td->dcb.xd.tmp_conv_dst = thread_data->td->tmp_conv_dst; - // Temporary buffers used during the DMVR and OPFL processing. + // Temporary buffers used during the SMVR and OPFL processing. thread_data->td->dcb.xd.opfl_vxy_bufs = thread_data->td->opfl_vxy_bufs; thread_data->td->dcb.xd.opfl_gxy_bufs = thread_data->td->opfl_gxy_bufs; thread_data->td->dcb.xd.opfl_dst_bufs = thread_data->td->opfl_dst_bufs; diff --git a/av2/decoder/decoder.h b/av2/decoder/decoder.h index 5672354c17..656fc12468 100644 --- a/av2/decoder/decoder.h +++ b/av2/decoder/decoder.h @@ -134,7 +134,7 @@ typedef struct ThreadData { // Temporary buffers used to store the OPFL gradient information. int16_t *opfl_gxy_bufs; // Temporary buffers used to store intermediate prediction data calculated - // during the OPFL/DMVR. + // during the OPFL/SMVR. uint16_t *opfl_dst_bufs; decode_block_visitor_fn_t read_coeffs_tx_intra_block_visit; diff --git a/av2/encoder/block.h b/av2/encoder/block.h index 8d75f4e5e2..e17322d3ca 100644 --- a/av2/encoder/block.h +++ b/av2/encoder/block.h @@ -1374,7 +1374,7 @@ typedef struct macroblock { //! Temporary buffers used to store the OPFL gradient information. int16_t *opfl_gxy_bufs; //! Temporary buffers used to store intermediate prediction data calculated - //! during the OPFL/DMVR. + //! during the OPFL/SMVR. uint16_t *opfl_dst_bufs; /*! \brief Temporary buffer to hold prediction. * diff --git a/av2/encoder/compound_type.c b/av2/encoder/compound_type.c index d636ded207..e9b35f7425 100644 --- a/av2/encoder/compound_type.c +++ b/av2/encoder/compound_type.c @@ -51,7 +51,7 @@ static INLINE int is_comp_rd_match(const AV2_COMP *const cpi, if (is_global_mv_block(mi, wm->wmtype) != st->is_global[i]) return 0; } - // TODO(any): Consider tools like OPFL, DMVR in the match criteria. + // TODO(any): Consider tools like OPFL, SMVR in the match criteria. // Store the stats for COMPOUND_AVERAGE and COMPOUND_DISTWTD for (int comp_type = COMPOUND_AVERAGE; comp_type < COMPOUND_WEDGE; diff --git a/av2/encoder/encoder.c b/av2/encoder/encoder.c index 78d765ae4e..3ef8d1adf9 100644 --- a/av2/encoder/encoder.c +++ b/av2/encoder/encoder.c @@ -1325,7 +1325,7 @@ void av2_change_config(struct AV2_COMP *cpi, const AV2EncoderConfig *oxcf) { avm_malloc(MAX_TX_SQUARE * sizeof(*x->coef_info))); } - // Temporary buffers used during the DMVR and OPFL processing. + // Temporary buffers used during the SMVR and OPFL processing. if (x->opfl_vxy_bufs == NULL) { CHECK_MEM_ERROR( cm, x->opfl_vxy_bufs, @@ -1809,7 +1809,7 @@ static AVM_INLINE void free_thread_data(AV2_COMP *cpi) { avm_free(thread_data->td->upsample_pred); avm_free(thread_data->td->coef_info); - // Temporary buffers used during the DMVR and OPFL processing. + // Temporary buffers used during the SMVR and OPFL processing. avm_free(thread_data->td->opfl_vxy_bufs); avm_free(thread_data->td->opfl_gxy_bufs); avm_free(thread_data->td->opfl_dst_bufs); diff --git a/av2/encoder/encoder.h b/av2/encoder/encoder.h index a0b03ae661..33f1dc87b0 100644 --- a/av2/encoder/encoder.h +++ b/av2/encoder/encoder.h @@ -1647,7 +1647,7 @@ typedef struct ThreadData { // Temporary buffers used to store the OPFL gradient information. int16_t *opfl_gxy_bufs; // Temporary buffers used to store intermediate prediction data calculated - // during the OPFL/DMVR. + // during the OPFL/SMVR. uint16_t *opfl_dst_bufs; uint16_t *tmp_pred_bufs[2]; // Buffer used for upsampled prediction. diff --git a/av2/encoder/encoder_alloc.h b/av2/encoder/encoder_alloc.h index a55cd13f18..1d8ac29469 100644 --- a/av2/encoder/encoder_alloc.h +++ b/av2/encoder/encoder_alloc.h @@ -247,7 +247,7 @@ static AVM_INLINE void dealloc_compressor_data(AV2_COMP *cpi) { avm_free(cpi->td.mb.upsample_pred); avm_free(cpi->td.mb.coef_info); - // Temporary buffers used during the DMVR and OPFL processing. + // Temporary buffers used during the SMVR and OPFL processing. avm_free(cpi->td.mb.opfl_vxy_bufs); avm_free(cpi->td.mb.opfl_gxy_bufs); avm_free(cpi->td.mb.opfl_dst_bufs); diff --git a/av2/encoder/ethread.c b/av2/encoder/ethread.c index 5a19f5723f..ecf87c570b 100644 --- a/av2/encoder/ethread.c +++ b/av2/encoder/ethread.c @@ -602,7 +602,7 @@ static AVM_INLINE void create_enc_workers(AV2_COMP *cpi, int num_workers) { cm, thread_data->td->coef_info, avm_malloc(MAX_TX_SQUARE * sizeof(*thread_data->td->coef_info))); - // Temporary buffers used during the DMVR and OPFL processing. + // Temporary buffers used during the SMVR and OPFL processing. CHECK_MEM_ERROR( cm, thread_data->td->opfl_vxy_bufs, avm_memalign( @@ -846,7 +846,7 @@ static AVM_INLINE void prepare_enc_workers(AV2_COMP *cpi, AVxWorkerHook hook, thread_data->td->mb.tmp_conv_dst = thread_data->td->tmp_conv_dst; thread_data->td->mb.upsample_pred = thread_data->td->upsample_pred; thread_data->td->mb.coef_info = thread_data->td->coef_info; - // Temporary buffers used during the DMVR and OPFL processing. + // Temporary buffers used during the SMVR and OPFL processing. thread_data->td->mb.opfl_vxy_bufs = thread_data->td->opfl_vxy_bufs; thread_data->td->mb.opfl_gxy_bufs = thread_data->td->opfl_gxy_bufs; thread_data->td->mb.opfl_dst_bufs = thread_data->td->opfl_dst_bufs; @@ -859,7 +859,7 @@ static AVM_INLINE void prepare_enc_workers(AV2_COMP *cpi, AVxWorkerHook hook, thread_data->td->mb.e_mbd.tmp_conv_dst = thread_data->td->mb.tmp_conv_dst; thread_data->td->mb.e_mbd.tmp_upsample_pred = thread_data->td->mb.upsample_pred; - // Temporary buffers used during the DMVR and OPFL processing. + // Temporary buffers used during the SMVR and OPFL processing. thread_data->td->mb.e_mbd.opfl_vxy_bufs = thread_data->td->mb.opfl_vxy_bufs; thread_data->td->mb.e_mbd.opfl_gxy_bufs = diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 0aca26ea1c..dcec51060e 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -4852,7 +4852,6 @@ static void evaluate_inter_predictor(AV2_COMP *const cpi, rd_stats->rate += drl_cost; rd_stats->rate += jmvd_scale_mode_cost; - if (refinemv_loop && !switchable_refinemv_flag(cm, mbmi)) return; mbmi->refinemv_flag = switchable_refinemv_flag(cm, mbmi) ? refinemv_loop : get_default_refinemv_flag(cm, mbmi); @@ -5493,7 +5492,7 @@ static int64_t handle_inter_mode( } } - // Get the default value of DMVR flag based on mode + // Get the default value of SMVR flag based on mode assert(mbmi->motion_mode == SIMPLE_TRANSLATION); mbmi->refinemv_flag = get_default_refinemv_flag(cm, mbmi); @@ -5662,8 +5661,13 @@ static int64_t handle_inter_mode( this_mode, refs, flex_mv_cost, drl_cost, jmvd_scale_mode_cost, base_rate, cur_mv, rate_mv, &base_mbmi, 0, num_planes, args->skip_motion_mode); + for (int refinemv_loop = 0; refinemv_loop < REFINEMV_NUM_MODES; refinemv_loop++) { + if (refinemv_loop == 1 && + (!switchable_refinemv_flag(cm, mbmi) || + cpi->sf.inter_sf.disable_switchable_refinemv)) + continue; if (refinemv_loop == 1 && cpi->sf.inter_sf.prune_refinemv_by_ref_idx && !(base_mbmi.ref_frame[0] == 0 && diff --git a/av2/encoder/reconinter_enc.c b/av2/encoder/reconinter_enc.c index f7e529bb74..cf9a2ffe2c 100644 --- a/av2/encoder/reconinter_enc.c +++ b/av2/encoder/reconinter_enc.c @@ -200,27 +200,27 @@ void av2_enc_build_inter_predictor(const AV2_COMMON *cm, MACROBLOCKD *xd, int is_refinemv_supported = mbmi->refinemv_flag && !is_intrabc_block(mbmi, xd->tree_type); - int need_chroma_dmvr = xd->is_chroma_ref && - (plane_from != 0 || plane_to != 0) && - is_refinemv_supported; - assert(IMPLIES(need_chroma_dmvr, !is_interintra_pred(mbmi))); - - if (need_chroma_dmvr && default_refinemv_modes(mbmi)) - need_chroma_dmvr &= (mbmi->comp_group_idx == 0 && - mbmi->interinter_comp.type == COMPOUND_AVERAGE); + int need_chroma_refinemv = xd->is_chroma_ref && + (plane_from != 0 || plane_to != 0) && + is_refinemv_supported; + assert(IMPLIES(need_chroma_refinemv, !is_interintra_pred(mbmi))); + + if (need_chroma_refinemv && default_refinemv_modes(mbmi)) + need_chroma_refinemv &= (mbmi->comp_group_idx == 0 && + mbmi->interinter_comp.type == COMPOUND_AVERAGE); // Set the prediction buffer as reference frames of TIP_FRAME if (is_tip_ref_frame(mbmi->ref_frame[0])) { setup_pred_planes_for_tip(&cm->tip_ref, xd, plane_from, plane_to + 1, mi_col, mi_row); } - if (need_chroma_dmvr) { + if (need_chroma_refinemv) { fill_subblock_refine_mv(xd->refinemv_subinfo, xd->plane[0].width, xd->plane[0].height, mbmi->mv[0].as_mv, mbmi->mv[1].as_mv); // if luma build is not available, we need to get refinemv based on luma - // need to search DMVR here based on luma plane + // need to search SMVR here based on luma plane if (plane_from != 0) { enc_build_inter_predictors(cm, xd, 0, xd->mi[0], ctx, 1, xd->plane[0].width, xd->plane[0].height, diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 8b9e0621fe..47a75418ee 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -341,6 +341,7 @@ static void set_good_speed_features_framesize_independent( // TODO (Yeqing Wu): need to be tuned for speed > 1. sf->inter_sf.skip_compound_prune_top_refs_num_ref0 = 1; sf->inter_sf.skip_compound_prune_top_refs_num_ref1 = 2; + sf->inter_sf.disable_switchable_refinemv = 1; sf->inter_sf.prune_refinemv_by_ref_idx = 1; sf->inter_sf.prune_interintra_by_ref_idx = 1; sf->inter_sf.prune_warp_delta_by_ref_idx = 1; @@ -482,7 +483,7 @@ static void set_good_speed_features_framesize_independent( sf->inter_sf.skip_repeated_ref_mv = 1; sf->inter_sf.skip_repeated_full_newmv = 1; // TODO(any): Set this speed feature to 2 after correcting the match - // criteria by considering tools like OPFL, DMVR. + // criteria by considering tools like OPFL, SMVR. sf->inter_sf.reuse_compound_type_data = 0; sf->inter_sf.txfm_rd_gate_level = boosted ? 0 : (is_boosted_arf2_bwd_type ? 1 : 2); @@ -738,6 +739,7 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->skip_temporary_pred_for_opfl = 0; inter_sf->reduce_inter_modes = 0; inter_sf->alt_ref_search_fp = 0; + inter_sf->disable_switchable_refinemv = 0; inter_sf->selective_ref_frame = 0; inter_sf->prune_newmv_modes_using_prior_rd = 0; inter_sf->share_motion_mode_prune_pool = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index c07035d59e..3c4ea7a863 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -577,6 +577,9 @@ typedef struct INTER_MODE_SPEED_FEATURES { // Prune reference frames for ALTREF int alt_ref_search_fp; + // Disable switchable subblock refine MV at the block level + int disable_switchable_refinemv; + // flag to skip NEWMV mode in drl if the motion search result is the same int skip_repeated_newmv; From e6fa3db2a832d096630ac1e761584c56fc3cd60a Mon Sep 17 00:00:00 2001 From: leolzhao Date: Wed, 22 Jul 2026 14:43:33 -0700 Subject: [PATCH 21/51] Enhanced inter mode cache reuse (#5133) Reuse model RD when one of the following conditions are met. - Current mode is the same as the cached mode and at least one of the reference frame is the same as the cached one - All the reference frames is the same as the reference frame of the cached mode Otherwise, skip processing current mode or reference frame STATS_CHANGED Results are tested on top of 6e71b0c85924e61d9 with cpu-used = 1. ``` +---------+-------+--------+-------+-------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+-------+--------+-------+-------+----------+----------+ | A1 | 0.03% | -0.05% | 0.00% | 0.03% | 97.8% | 100% | | A2 | 0.03% | 0.41% | 0.13% | 0.05% | 96.6% | 100% | +---------+-------+--------+-------+-------+----------+----------+ ``` --- av2/encoder/rdopt.c | 57 ++++++++++++++++++++++++++++-------- av2/encoder/speed_features.c | 3 ++ av2/encoder/speed_features.h | 8 +++++ 3 files changed, 55 insertions(+), 13 deletions(-) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index dcec51060e..f705d70f2a 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -7495,12 +7495,30 @@ static INLINE int is_mode_intra(PREDICTION_MODE mode) { return mode < INTRA_MODE_END; } +// Check whether one of the reference frames are the same as that of the cached +// mode +static INLINE int is_ref_frame_same_as_cache( + const MB_MODE_INFO *cached_mi2, const MV_REFERENCE_FRAME *ref_frame, + int this_mode_is_single) { + const int cached_mode_is_single = is_inter_singleref_mode(cached_mi2->mode); + if (ref_frame[0] == cached_mi2->ref_frame[0]) return 1; + if (!cached_mode_is_single && (ref_frame[0] == cached_mi2->ref_frame[1])) + return 1; + if (!this_mode_is_single) { + if (ref_frame[1] == cached_mi2->ref_frame[0]) return 1; + if (!cached_mode_is_single && (ref_frame[1] == cached_mi2->ref_frame[1])) + return 1; + } + return 0; +} + // Reuse the prediction mode in cache. // Returns 0 if no pruning is done, 1 if we are skipping the current mod // completely, 2 if we skip compound only, but still try single motion modes static INLINE int skip_inter_mode_with_cached_mode( - const AV2_COMMON *cm, const MACROBLOCK *x, PREDICTION_MODE mode, + const AV2_COMP *cpi, const MACROBLOCK *x, PREDICTION_MODE mode, const MV_REFERENCE_FRAME *ref_frame) { + const AV2_COMMON *const cm = &cpi->common; const MB_MODE_INFO *cached_mi = x->inter_mode_cache[0]; // If there is no cache, then no pruning is possible. @@ -7517,19 +7535,32 @@ static INLINE int skip_inter_mode_with_cached_mode( if (cached_mi2 && !is_mode_intra(cached_mi2->mode)) { const int cached_mode_is_single = is_inter_singleref_mode(cached_mi2->mode); - if (mode == cached_mi2->mode) return 0; - // if (mode == cached_mi2->mode) { - if (ref_frame[0] == cached_mi2->ref_frame[0]) return 0; - if (!cached_mode_is_single && - (ref_frame[0] == cached_mi2->ref_frame[1])) - return 0; - if (!this_mode_is_single) { - if (ref_frame[1] == cached_mi2->ref_frame[0]) return 0; - if (!cached_mode_is_single && - (ref_frame[1] == cached_mi2->ref_frame[1])) + if (cpi->sf.inter_sf.enable_enhanced_inter_mode_cache_reuse) { + // For single prediction mode, when reference frame is the same, + // return 0. + // For compound prediction mode, when both reference frames + // are the same, return 0. + if (cached_mode_is_single) { + if (ref_frame[0] == cached_mi2->ref_frame[0]) return 0; + } else { + if (ref_frame[0] == cached_mi2->ref_frame[0] && + ref_frame[1] == cached_mi2->ref_frame[1]) + return 0; + } + // When prediction mode is the same, if one + // of the reference frames are the same, return 0 + if (mode == cached_mi2->mode) { + if (is_ref_frame_same_as_cache(cached_mi2, ref_frame, + this_mode_is_single)) + return 0; + } + } else { + // Original cache reuse logic. + if (mode == cached_mi2->mode) return 0; + if (is_ref_frame_same_as_cache(cached_mi2, ref_frame, + this_mode_is_single)) return 0; } - //} } } } @@ -7607,7 +7638,7 @@ static int inter_mode_search_order_independent_skip( return 1; } const int cached_skip_ret = - skip_inter_mode_with_cached_mode(cm, x, mode, ref_frame); + skip_inter_mode_with_cached_mode(cpi, x, mode, ref_frame); if (cached_skip_ret > 0) { return cached_skip_ret; } diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 47a75418ee..0c220b6c96 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -377,6 +377,8 @@ static void set_good_speed_features_framesize_independent( // Cap the DRL depth for a fresh single-ref NEWMV search; reuse the // nearest searched result beyond the cap. sf->mv_sf.newmv_drl_search_limit = 2; + + sf->inter_sf.enable_enhanced_inter_mode_cache_reuse = 1; sf->inter_sf.skip_temporary_pred_for_opfl = 1; // Enable the optimized inter-SDP fast method (requires >=1 intra coded @@ -782,6 +784,7 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->skip_mode_eval_based_on_rate_cost = 0; inter_sf->reuse_erp_mode_flag = 0; inter_sf->prune_warpmv_prob_thresh = 32; + inter_sf->enable_enhanced_inter_mode_cache_reuse = 0; } static AVM_INLINE void init_interp_sf(INTERP_FILTER_SPEED_FEATURES *interp_sf) { diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 3c4ea7a863..6a6a62284a 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -743,6 +743,14 @@ typedef struct INTER_MODE_SPEED_FEATURES { // if a block with the same (mi_row, mi_col, bsize) is visited more than one // by the encoder. int reuse_erp_mode_flag; + + // When set, enable enhanced inter mode cache reuse logic in + // skip_inter_mode_with_cached_mode(). It allows additional cache hits based + // on matching reference frames against single-ref/compound cached modes, + // which can avoid skipping useful inter modes during cache-based pruning. + // 0: original cache reuse logic. + // 1: enhanced cache reuse logic (more modes are searched). + int enable_enhanced_inter_mode_cache_reuse; } INTER_MODE_SPEED_FEATURES; typedef struct INTERP_FILTER_SPEED_FEATURES { From a9c01bd2152116575485fd4c2eb4c27bf80578cf Mon Sep 17 00:00:00 2001 From: Mudassir Galaganath Date: Thu, 23 Jul 2026 04:25:11 +0530 Subject: [PATCH 22/51] Refactor search_tx_type() (#5136) This pull request refactors search_tx_type() to improve code readability, reduce search loop complexity, fix compilation errors under debug configuration (COLLECT_TX_SIZE_DATA). --- av2/encoder/tx_search.c | 398 ++++++++++++++++++++-------------------- av2/encoder/tx_search.h | 55 ++++++ 2 files changed, 249 insertions(+), 204 deletions(-) diff --git a/av2/encoder/tx_search.c b/av2/encoder/tx_search.c index c9975fc30e..f17736674a 100644 --- a/av2/encoder/tx_search.c +++ b/av2/encoder/tx_search.c @@ -2091,9 +2091,6 @@ static bool prune_sec_txfm_rd_eval(int64_t sec_tx_sse_to_be_coded, return false; } -// Encoder-only variable to reudce the search complexity of IST -#define IST_REDUCED_SEARCH_SET_SIZE 4 - // Return 1 if primary FP-quant is guaranteed to produce eob = 0 across the // IST window, 0 otherwise. Uses an L-infinity scan of the post-primary // coefficients against the FP quantizer's kill threshold @@ -2117,6 +2114,82 @@ static INLINE int check_primary_quant_all_zero(const tran_low_t *coeff, return 1; } +// Prune transform type search based on EOB count and block properties. +static AVM_INLINE bool prune_tx_search_by_eob( + MACROBLOCKD *const xd, int blk_row, int blk_col, TX_SIZE tx_size, int eob, + int plane, bool is_inter, TX_TYPE primary_tx_type, int stx, + bool *const eob_found, bool prune_intra_ist_stx_by_zero_eob) { + if (plane == AVM_PLANE_Y && !is_inter && + (eob == 1 || (prune_intra_ist_stx_by_zero_eob && eob == 0))) { + if (primary_tx_type == DCT_DCT && stx == 0) *eob_found = true; + const bool kill = + (eob == 1) ? (primary_tx_type != DCT_DCT || stx > 0) : (stx > 0); + if (kill) { + update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); + return true; + } + } + if (eob <= 3 && plane == AVM_PLANE_Y && is_inter && stx) { + update_txk_array(xd, blk_row, blk_col, tx_size, primary_tx_type); + return true; + } + return false; +} + +// Prune rectangular transform types for 32xN/Nx32 and 64xN/Nx64 blocks. +static AVM_INLINE bool prune_rectangular_tx_type( + int tx_idx, TxSetType tx_set_type, int plane, bool is_fsc, + bool is_rect_horz, uint16_t allowed_tx_mask, TX_TYPE best_tx_type, + TX_TYPE *const primary_tx_type, TX_TYPE *const best_long_side_tx_type) { + if (tx_set_type == EXT_TX_SET_LONG_SIDE_32 && plane == AVM_PLANE_Y && + !is_fsc) { + // tx_mask_32[0:is_rect_horz==false, 1: is_rect_horz==true][0: + // long_side_tx_type==DCT_DCT: 1: long_side_tx_type==Identity] + const uint16_t tx_mask_32[2][2] = { + { 0x0425 & allowed_tx_mask, 0xAA00 & allowed_tx_mask }, + { 0x0813 & allowed_tx_mask, 0x5600 & allowed_tx_mask } + }; + const TX_TYPE txk_map_rect_horz_32[TX_TYPES] = { + DCT_DCT, V_DCT, ADST_DCT, DCT_ADST, + ADST_ADST, FLIPADST_DCT, DCT_FLIPADST, FLIPADST_FLIPADST, + ADST_FLIPADST, FLIPADST_ADST, IDTX, H_DCT, + V_ADST, H_ADST, V_FLIPADST, H_FLIPADST + }; + const TX_TYPE txk_map_rect_vert_32[TX_TYPES] = { + DCT_DCT, H_DCT, ADST_DCT, DCT_ADST, + ADST_ADST, FLIPADST_DCT, DCT_FLIPADST, FLIPADST_FLIPADST, + ADST_FLIPADST, FLIPADST_ADST, IDTX, V_DCT, + V_ADST, H_ADST, V_FLIPADST, H_FLIPADST + }; + assert(tx_idx < TX_TYPES); + *primary_tx_type = is_rect_horz ? txk_map_rect_horz_32[tx_idx] + : txk_map_rect_vert_32[tx_idx]; + if (tx_idx == 2) { + *best_long_side_tx_type = get_primary_tx_type(best_tx_type); + } + if (tx_idx > 1 && + tx_mask_32[is_rect_horz][*best_long_side_tx_type != DCT_DCT] != 0 && + (!(tx_mask_32[is_rect_horz][*best_long_side_tx_type != DCT_DCT] & + (1 << *primary_tx_type)))) { + return true; + } + } + + if (tx_set_type == EXT_TX_SET_LONG_SIDE_64 || + tx_set_type == EXT_TX_SET_LONG_SIDE_32) { + if (*primary_tx_type == DCT_FLIPADST && + get_primary_tx_type(best_tx_type) == DCT_ADST) { + return true; + } + if (*primary_tx_type == FLIPADST_DCT && + get_primary_tx_type(best_tx_type) == ADST_DCT) { + return true; + } + } + + return false; +} + // Search for the best transform type for a given transform block. // This function can be used for both inter and intra, both luma and chroma. static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, @@ -2126,37 +2199,56 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, FAST_TX_SEARCH_MODE ftxs_mode, int skip_trellis, int64_t ref_best_rd, RD_STATS *best_rd_stats) { const AV2_COMMON *cm = &cpi->common; + const TX_SPEED_FEATURES *const tx_sf = &cpi->sf.tx_sf; MACROBLOCKD *xd = &x->e_mbd; MB_MODE_INFO *mbmi = xd->mi[0]; const TxfmSearchParams *txfm_params = &x->txfm_search_params; + const bool is_fsc = mbmi->fsc_mode[xd->tree_type == CHROMA_PART]; + const PREDICTION_MODE intra_mode = get_intra_mode(mbmi, plane); + const bool is_inter = is_inter_block(mbmi, xd->tree_type); + const bool is_lossless = xd->lossless[mbmi->segment_id]; int64_t best_rd = INT64_MAX; uint16_t best_eob = 0; TX_TYPE best_tx_type = DCT_DCT; int rate_cost = 0; // The buffer used to swap dqcoeff in macroblockd_plane so we can keep dqcoeff - // of the best tx_type + // of the best tx_type. DECLARE_ALIGNED(32, tran_low_t, this_dqcoeff[MAX_SB_SQUARE]); - struct macroblock_plane *const p = &x->plane[plane]; - tran_low_t *orig_dqcoeff = p->dqcoeff; + struct macroblock_plane *const mb_plane = &x->plane[plane]; + tran_low_t *orig_dqcoeff = mb_plane->dqcoeff; tran_low_t *best_dqcoeff = this_dqcoeff; const int tx_type_map_idx = plane ? 0 : blk_row * xd->tx_type_map_stride + blk_col; av2_invalid_rd_stats(best_rd_stats); - skip_trellis |= !is_trellis_used(cpi->optimize_seg_arr[xd->mi[0]->segment_id], - DRY_RUN_NORMAL); + skip_trellis |= + !is_trellis_used(cpi->optimize_seg_arr[mbmi->segment_id], DRY_RUN_NORMAL); uint8_t best_txb_ctx = 0; - // txk_allowed = TX_TYPES: >1 tx types are allowed + // txk_allowed = TX_TYPES: >1 tx types are allowed. // txk_allowed < TX_TYPES: only that specific tx type is allowed. TX_TYPE txk_allowed = TX_TYPES; - int txk_map[TX_TYPES] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - }; + int txk_map[TX_TYPES] = { DCT_DCT, + ADST_DCT, + DCT_ADST, + ADST_ADST, + FLIPADST_DCT, + DCT_FLIPADST, + FLIPADST_FLIPADST, + ADST_FLIPADST, + FLIPADST_ADST, + IDTX, + V_DCT, + H_DCT, + V_ADST, + H_ADST, + V_FLIPADST, + H_FLIPADST }; + const int dequant_shift = xd->bd - 5; const int qstep = - ROUND_POWER_OF_TWO(x->plane[plane].dequant_QTX[1], QUANT_TABLE_BITS) >> + ROUND_POWER_OF_TWO(mb_plane->dequant_QTX[1], QUANT_TABLE_BITS) >> dequant_shift; const uint8_t txw = tx_size_wide[tx_size]; @@ -2173,13 +2265,13 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, &per_px_mean, &dc_only_blk, cm); if (best_rd_stats->skip_txfm == 1) { // Ensure that xd->tx_type_map is initialized. - if (plane == 0) update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); + if (plane == AVM_PLANE_Y) + update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); return; } } else { block_sse = pixel_diff_dist(cm, x, plane, blk_row, blk_col, plane_bsize, - tx_size_wide[tx_size], tx_size_high[tx_size], - &block_mse_q8); + txw, txh, &block_mse_q8); assert(block_mse_q8 != UINT_MAX); } @@ -2204,8 +2296,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // effective. // TODO(any): Experiment with variance and mean based thresholds int perform_block_coeff_opt = 0; - if (tcq_enable(cm->features.tcq_mode, xd->lossless[xd->mi[0]->segment_id], - plane, TX_CLASS_2D)) { + if (tcq_enable(cm->features.tcq_mode, is_lossless, plane, TX_CLASS_2D)) { perform_block_coeff_opt = 1; } else { perform_block_coeff_opt = @@ -2240,7 +2331,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, (txk_allowed < TX_TYPES || allowed_tx_mask == 0x0001)) calc_pixel_domain_distortion_final = use_transform_domain_distortion = 0; - const uint16_t *eobs_ptr = x->plane[plane].eobs; + const uint16_t *eobs_ptr = mb_plane->eobs; TxfmParam txfm_param; QUANT_PARAM quant_param; @@ -2253,101 +2344,62 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, skip_trellis ? xform_quant_b : AV2_XFORM_QUANT_FP, cpi->oxcf.q_cfg.quant_b_adapt, &quant_param); - int eob_found = 0; - const int is_inter = is_inter_block(mbmi, xd->tree_type); + bool eob_found = false; const TxSetType tx_set_type = av2_get_ext_tx_set_type( tx_size, is_inter, cm->features.reduced_tx_set_used); - const int is_rect_horz = txw > txh; - - int txk_map_rect_horz_32[TX_TYPES] = { 0, 10, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 11, 12, 13, 14, 15 }; - int txk_map_rect_vert_32[TX_TYPES] = { 0, 11, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 12, 13, 14, 15 }; - // tx_mask_32[0:is_rect_horz==false, 1: is_rect_horz==true][0: - // long_side_tx_type==DCT_DCT: 1: long_side_tx_type==Identity] - const uint16_t tx_mask_32[2][2] = { - { 0x0425 & allowed_tx_mask, 0xAA00 & allowed_tx_mask }, - { 0x0813 & allowed_tx_mask, 0x5600 & allowed_tx_mask } - }; + const bool is_rect_horz = txw > txh; + TX_TYPE best_long_side_tx_type = DCT_DCT; const int is_border_block = get_visible_dimensions( xd, plane, blk_col, blk_row, txw, txh, cm->width, cm->height, NULL, NULL); + xd->enable_ist = (is_inter ? cm->seq_params.enable_inter_ist + : cm->seq_params.enable_ist) && + !is_fsc && !is_lossless; + const int max_eob = av2_get_max_eob(tx_size); // Iterate through all transform type candidates. - for (int idx = 0; idx < TX_TYPES; ++idx) { - TX_TYPE primary_tx_type = (TX_TYPE)txk_map[idx]; - if (tx_set_type == EXT_TX_SET_LONG_SIDE_32 && plane == PLANE_TYPE_Y && - !mbmi->fsc_mode[xd->tree_type == CHROMA_PART]) { - primary_tx_type = is_rect_horz ? (TX_TYPE)txk_map_rect_horz_32[idx] - : (TX_TYPE)txk_map_rect_vert_32[idx]; - if (idx == 2) { - best_long_side_tx_type = get_primary_tx_type(best_tx_type); - } - if (idx > 1 && - tx_mask_32[is_rect_horz][best_long_side_tx_type != DCT_DCT] != 0 && - (!(tx_mask_32[is_rect_horz][best_long_side_tx_type != DCT_DCT] & - (1 << primary_tx_type)))) { - continue; - } + for (int tx_idx = 0; tx_idx < TX_TYPES; ++tx_idx) { + TX_TYPE primary_tx_type = (TX_TYPE)txk_map[tx_idx]; + if (prune_rectangular_tx_type(tx_idx, tx_set_type, plane, is_fsc, + is_rect_horz, allowed_tx_mask, best_tx_type, + &primary_tx_type, &best_long_side_tx_type)) { + continue; } if (!(allowed_tx_mask & (1 << primary_tx_type))) continue; - int skip_trellis_in = skip_trellis; - av2_update_trellisq(!skip_trellis_in, - skip_trellis_in ? xform_quant_b : AV2_XFORM_QUANT_FP, - cpi->oxcf.q_cfg.quant_b_adapt, &quant_param); - if (mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && - primary_tx_type != IDTX && plane == PLANE_TYPE_Y) { + if (is_fsc && primary_tx_type != IDTX && plane == AVM_PLANE_Y) { continue; } - if (!xd->lossless[mbmi->segment_id]) { - if (!mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && - primary_tx_type == IDTX && !is_inter) { + if (!is_lossless) { + if (!is_fsc && primary_tx_type == IDTX && !is_inter) { continue; } } - if (mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && - (tx_size_wide[tx_size] > FSC_MAXWIDTH || - tx_size_high[tx_size] > FSC_MAXHEIGHT) && - plane == PLANE_TYPE_Y) { - continue; - } - if (tx_set_type == EXT_TX_SET_LONG_SIDE_64 || - tx_set_type == EXT_TX_SET_LONG_SIDE_32) { - if (primary_tx_type == DCT_FLIPADST && - get_primary_tx_type(best_tx_type) == DCT_ADST) { - continue; - } - if (primary_tx_type == FLIPADST_DCT && - get_primary_tx_type(best_tx_type) == ADST_DCT) { - continue; - } + if (is_fsc && (txw > FSC_MAXWIDTH || txh > FSC_MAXHEIGHT) && + plane == AVM_PLANE_Y) { + break; } + const int skip_trellis_in = skip_trellis; + av2_update_trellisq(!skip_trellis_in, + skip_trellis_in ? xform_quant_b : AV2_XFORM_QUANT_FP, + cpi->oxcf.q_cfg.quant_b_adapt, &quant_param); if (is_border_block) av2_subtract_txb(x, plane, plane_bsize, blk_col, blk_row, tx_size, cm->width, cm->height, primary_tx_type); - bool skip_idx = false; - xd->enable_ist = - (is_inter_block(mbmi, xd->tree_type) ? cm->seq_params.enable_inter_ist - : cm->seq_params.enable_ist) && - !mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && - !xd->lossless[mbmi->segment_id]; - const PREDICTION_MODE intra_mode = get_intra_mode(mbmi, plane); bool skip_stx = ((primary_tx_type != DCT_DCT && primary_tx_type != ADST_ADST) || - plane != 0 || - (is_inter_block(mbmi, xd->tree_type) - ? (primary_tx_type != DCT_DCT || txw < 16 || txh < 16) - : intra_mode >= PAETH_PRED) || + plane != AVM_PLANE_Y || + (is_inter ? (primary_tx_type != DCT_DCT || txw < 16 || txh < 16) + : intra_mode >= PAETH_PRED) || dc_only_blk || (eob_found) || !xd->enable_ist); int init_set_id = 0; - int max_set_id = - (skip_stx || is_inter_block(mbmi, xd->tree_type)) ? 1 : IST_SET_SIZE; + bool skip_idx = false; + int max_set_id = (skip_stx || is_inter) ? 1 : IST_SET_SIZE; int max_set_id_ptx_type[4] = { IST_REDUCED_SEARCH_SET_SIZE, 1, 1, IST_REDUCED_SET_SIZE }; if (max_set_id == IST_SET_SIZE) { @@ -2358,7 +2410,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, for (int set_idx = init_set_id; set_idx < max_set_id; ++set_idx) { txfm_param.sec_tx_set_idx = set_idx; uint8_t set_id = set_idx; - if (!is_inter_block(mbmi, xd->tree_type)) { + if (!is_inter) { const PREDICTION_MODE mode = AVMMIN(intra_mode, SMOOTH_H_PRED); int intra_stx_mode = stx_transpose_mapping[mode]; if (txw < 8 || txh < 8) { @@ -2374,10 +2426,9 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, set_id = ist_intra_stx_mapping[intra_stx_mode][set_idx]; } } - const int max_stx = xd->enable_ist && !(eob_found) ? 4 : 1; - for (int stx = 0; stx < max_stx; ++stx) { - // Skip repeated evaluation of no secondary transform. - if (set_idx && !stx) continue; + const int max_stx = xd->enable_ist && !(eob_found) ? STX_TYPES : 1; + const int init_stx = (set_idx > 0) ? 1 : 0; + for (int stx = init_stx; stx < max_stx; ++stx) { TX_TYPE tx_type = primary_tx_type; if (eob_found) skip_stx = true; uint16_t stx_set = 0; @@ -2388,7 +2439,6 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, txfm_param.tx_type = primary_tx_type; txfm_param.sec_tx_type = stx; - TX_TYPE tx_type1 = tx_type; // does not keep set info stx_set = (primary_tx_type == ADST_ADST && stx) ? set_id + IST_SET_SIZE : set_id; set_secondary_tx_set(&tx_type, stx_set); @@ -2403,13 +2453,12 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type, &quant_param); } - if (plane == 0) xd->tx_type_map[tx_type_map_idx] = tx_type; + if (plane == AVM_PLANE_Y) xd->tx_type_map[tx_type_map_idx] = tx_type; RD_STATS this_rd_stats; av2_invalid_rd_stats(&this_rd_stats); int64_t sec_tx_sse_to_be_coded = INT64_MAX; int64_t *const sec_tx_sse_ptr = - cpi->sf.tx_sf.prune_tx_rd_eval_sec_tx_sse ? &sec_tx_sse_to_be_coded - : NULL; + tx_sf->prune_tx_rd_eval_sec_tx_sse ? &sec_tx_sse_to_be_coded : NULL; if (!dc_only_blk) av2_xform(x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param, 1, sec_tx_sse_ptr); @@ -2417,7 +2466,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, av2_xform_dc_only(x, plane, block, &txfm_param, per_px_mean); if (prune_sec_txfm_rd_eval(sec_tx_sse_to_be_coded, block_sse, best_rd, x->rdmult, - cpi->sf.tx_sf.prune_tx_rd_eval_sec_tx_sse)) { + tx_sf->prune_tx_rd_eval_sec_tx_sse)) { continue; } *coeffs_available = 1; @@ -2427,19 +2476,18 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // cost_coeffs and propagate the same eob_found / DCT_DCT handling as // the post-quant eob == 1 gate below. Scoped to intra Y, stx == 0, // non-DC-only, IST-enabled, non-QM blocks. - if (cpi->sf.tx_sf.prune_intra_ist_stx_by_zero_eob && - plane == PLANE_TYPE_Y && !is_inter && stx == 0 && !dc_only_blk && - xd->enable_ist && + if (tx_sf->prune_intra_ist_stx_by_zero_eob && plane == PLANE_TYPE_Y && + !is_inter && stx == 0 && !dc_only_blk && xd->enable_ist && !av2_use_qmatrix(&cm->quant_params, xd, mbmi->segment_id)) { - const int tr_w = AVMMIN(tx_size_wide[tx_size], 32); - const int tr_h = AVMMIN(tx_size_high[tx_size], 32); + const int tr_w = AVMMIN(txw, 32); + const int tr_h = AVMMIN(txh, 32); const int log_scale = av2_get_tx_scale(tx_size); - if (check_primary_quant_all_zero(p->coeff + BLOCK_OFFSET(block), - x->plane[plane].dequant_QTX, tr_w, - tr_h, log_scale)) { - p->eobs[block] = 0; - if (tx_type1 == DCT_DCT) eob_found = 1; - if (tx_type1 != DCT_DCT || (stx && primary_tx_type)) { + if (check_primary_quant_all_zero( + mb_plane->coeff + BLOCK_OFFSET(block), + x->plane[plane].dequant_QTX, tr_w, tr_h, log_scale)) { + mb_plane->eobs[block] = 0; + if (primary_tx_type == DCT_DCT) eob_found = true; + if (primary_tx_type != DCT_DCT) { update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); continue; } @@ -2448,8 +2496,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, const TX_CLASS tx_class = tx_type_to_class[get_primary_tx_type(tx_type)]; - if (tcq_enable(cm->features.tcq_mode, - xd->lossless[xd->mi[0]->segment_id], plane, tx_class)) { + if (tcq_enable(cm->features.tcq_mode, is_lossless, plane, tx_class)) { skip_trellis_based_on_satd[txfm_param.tx_type] = skip_trellis; } else skip_trellis_based_on_satd[txfm_param.tx_type] = @@ -2459,14 +2506,13 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, txfm_params->coeff_opt_satd_threshold, skip_trellis_in, dc_only_blk); - uint8_t fsc_mode_in = ((cm->seq_params.enable_fsc && - mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && - plane == PLANE_TYPE_Y) || - use_inter_fsc(cm, plane, tx_type, is_inter)); + uint8_t fsc_mode_in = + ((cm->seq_params.enable_fsc && is_fsc && plane == AVM_PLANE_Y) || + use_inter_fsc(cm, plane, tx_type, is_inter)); av2_quant(x, plane, block, &txfm_param, &quant_param); if (fsc_mode_in) { if (primary_tx_type == IDTX) { - uint16_t *const eob = &p->eobs[block]; + uint16_t *const eob = &mb_plane->eobs[block]; if (*eob != 0) *eob = av2_get_max_eob(txfm_param.tx_size); } } @@ -2478,21 +2524,10 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // stx == 0 that quantized to all-zero can still win via skip // coding (bitstream signals the tx_type and elides the // coefficients). - uint16_t *const eob = &p->eobs[block]; - if (plane == PLANE_TYPE_Y && !is_inter && - (*eob == 1 || - (cpi->sf.tx_sf.prune_intra_ist_stx_by_zero_eob && *eob == 0))) { - if (tx_type1 == DCT_DCT) eob_found = 1; - const int kill = - (*eob == 1) ? (tx_type1 != DCT_DCT || (stx && primary_tx_type)) - : (stx > 0); - if (kill) { - update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); - continue; - } - } - if (*eob <= 3 && plane == PLANE_TYPE_Y && is_inter && stx) { - update_txk_array(xd, blk_row, blk_col, tx_size, primary_tx_type); + uint16_t *const eob = &mb_plane->eobs[block]; + if (prune_tx_search_by_eob(xd, blk_row, blk_col, tx_size, *eob, plane, + is_inter, primary_tx_type, stx, &eob_found, + tx_sf->prune_intra_ist_stx_by_zero_eob)) { continue; } if (fsc_mode_in && quant_param.use_optimize_b) { @@ -2503,10 +2538,10 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, txb_ctx, &rate_cost); } else { bool enable_parity_hiding = - cm->features.allow_parity_hiding && - !xd->lossless[xd->mi[0]->segment_id] && plane == PLANE_TYPE_Y && + cm->features.allow_parity_hiding && !is_lossless && + plane == AVM_PLANE_Y && ph_allowed_tx_types[get_primary_tx_type(tx_type)] && - (p->eobs[block] > PHTHRESH); + (mb_plane->eobs[block] > PHTHRESH); if (enable_parity_hiding) parity_hiding_trellis_off(cpi, x, plane, block, tx_size, tx_type); @@ -2517,27 +2552,12 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // Post-trellis safety net: re-apply the same eob == 0 / eob == 1 // pre-skip logic in case trellis (RDOQ) adjusted the eob across // the threshold. - if (*eob == 1 && plane == PLANE_TYPE_Y && !is_inter) { - if (tx_type1 == DCT_DCT) eob_found = 1; - if (tx_type1 != DCT_DCT || (stx && primary_tx_type)) { - update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); - continue; - } - if (get_secondary_tx_type(tx_type) > 0) continue; - if (txfm_param.sec_tx_type > 0) continue; - } - if (cpi->sf.tx_sf.prune_intra_ist_stx_by_zero_eob && *eob == 0 && - plane == PLANE_TYPE_Y && !is_inter) { - if (tx_type1 == DCT_DCT) eob_found = 1; - if (stx > 0) { - update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); - continue; - } - } - if (*eob <= 3 && plane == PLANE_TYPE_Y && is_inter && stx) { - update_txk_array(xd, blk_row, blk_col, tx_size, primary_tx_type); + if (prune_tx_search_by_eob(xd, blk_row, blk_col, tx_size, *eob, plane, + is_inter, primary_tx_type, stx, &eob_found, + tx_sf->prune_intra_ist_stx_by_zero_eob)) { continue; } + // If rd cost based on coeff rate alone is already more than best_rd, // terminate early. if (RDCOST(x->rdmult, rate_cost, 0) > best_rd) continue; @@ -2547,7 +2567,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // When eob is 0, pixel domain distortion is more efficient and // accurate. this_rd_stats.dist = this_rd_stats.sse = block_sse; - } else if (dc_only_blk || (fsc_mode_in && plane == PLANE_TYPE_Y)) { + } else if (dc_only_blk || (fsc_mode_in && plane == AVM_PLANE_Y)) { this_rd_stats.sse = block_sse; this_rd_stats.dist = dist_block_px_domain(cpi, x, plane, block, blk_row, blk_col, tx_size); @@ -2556,7 +2576,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, &this_rd_stats.sse); } else { int64_t sse_diff = INT64_MAX; - // high_energy threshold assumes that every pixel within a txfm block + // High_energy threshold assumes that every pixel within a txfm block // has a residue energy of at least 25% of the maximum, i.e. 128 * 128 // for 8 bit. const int64_t high_energy_thresh = @@ -2596,7 +2616,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, const int64_t rd = RDCOST(x->rdmult, this_rd_stats.rate, this_rd_stats.dist); - if (xd->lossless[mbmi->segment_id]) { + if (is_lossless) { assert(this_rd_stats.dist == 0); } @@ -2604,63 +2624,33 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, best_rd = rd; *best_rd_stats = this_rd_stats; best_tx_type = tx_type; - best_txb_ctx = x->plane[plane].txb_entropy_ctx[block]; - best_eob = x->plane[plane].eobs[block]; - // Swap dqcoeff buffers + best_txb_ctx = mb_plane->txb_entropy_ctx[block]; + best_eob = mb_plane->eobs[block]; + // Swap dqcoeff buffers. tran_low_t *const tmp_dqcoeff = best_dqcoeff; - best_dqcoeff = p->dqcoeff; - p->dqcoeff = tmp_dqcoeff; + best_dqcoeff = mb_plane->dqcoeff; + mb_plane->dqcoeff = tmp_dqcoeff; } #if CONFIG_COLLECT_RD_STATS == 1 - if (plane == 0) { + if (plane == AVM_PLANE_Y) { PrintTransformUnitStats(cpi, x, &this_rd_stats, blk_row, blk_col, plane_bsize, tx_size, tx_type, rd); } #endif // CONFIG_COLLECT_RD_STATS == 1 #if COLLECT_TX_SIZE_DATA - // Generate small sample to restrict output size. - static unsigned int seed = 21743; - if (lcg_rand16(&seed) % 200 == 0) { - FILE *fp = NULL; - - if (within_border) { - fp = fopen(av2_tx_size_data_output_file, "a"); - } - - if (fp) { - // Transform info and RD - const int txb_w = tx_size_wide[tx_size]; - const int txb_h = tx_size_high[tx_size]; - - // Residue signal. - const int diff_stride = block_size_wide[plane_bsize]; - struct macroblock_plane *const p = &x->plane[plane]; - const int16_t *src_diff = - &p->src_diff[(blk_row * diff_stride + blk_col) * 4]; - - for (int r = 0; r < txb_h; ++r) { - for (int c = 0; c < txb_w; ++c) { - fprintf(fp, "%d,", src_diff[c]); - } - src_diff += diff_stride; - } - - fprintf(fp, "%d,%d,%d,%" PRId64, txb_w, txb_h, tx_type, rd); - fprintf(fp, "\n"); - fclose(fp); - } - } + collect_tx_size_data(cpi, x, plane, blk_row, blk_col, plane_bsize, + tx_size, tx_type, rd); #endif // COLLECT_TX_SIZE_DATA - assert(cpi->sf.tx_sf.adaptive_tx_type_search_idx < 6); + assert(tx_sf->adaptive_tx_type_search_idx < 6); // Terminate the search early, If the best rd is higher than the // reference best rd and number of coded coefficients are smaller // than a threshold. const int search_level = - tx_type_prune_level[p->eobs[block] < max_eob / 8] - [cpi->sf.tx_sf.adaptive_tx_type_search_idx]; + tx_type_prune_level[mb_plane->eobs[block] < max_eob / 8] + [tx_sf->adaptive_tx_type_search_idx]; if (search_level && (best_rd - (best_rd >> search_level)) > ref_best_rd) { skip_idx = true; @@ -2669,7 +2659,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // Terminate transform type search if the block has been quantized to // all zero. - if (cpi->sf.tx_sf.tx_type_search.skip_tx_search && !best_eob) { + if (tx_sf->tx_type_search.skip_tx_search && !best_eob) { skip_idx = true; break; } @@ -2680,23 +2670,23 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, } if (((best_eob == 1 && get_primary_tx_type(best_tx_type) != DCT_DCT && - plane == 0) || + plane == AVM_PLANE_Y) || best_rd == INT64_MAX) && !is_inter) { best_tx_type = DCT_DCT; - if (plane == 0) update_txk_array(xd, blk_row, blk_col, tx_size, DCT_DCT); } best_rd_stats->skip_txfm = best_eob == 0; - if (plane == 0) update_txk_array(xd, blk_row, blk_col, tx_size, best_tx_type); - x->plane[plane].txb_entropy_ctx[block] = best_txb_ctx; - x->plane[plane].eobs[block] = best_eob; + if (plane == AVM_PLANE_Y) + update_txk_array(xd, blk_row, blk_col, tx_size, best_tx_type); + mb_plane->txb_entropy_ctx[block] = best_txb_ctx; + mb_plane->eobs[block] = best_eob; skip_trellis = skip_trellis_based_on_satd[get_primary_tx_type(best_tx_type)]; // Point dqcoeff to the quantized coefficients corresponding to the best // transform type, then we can skip transform and quantization, e.g. in the // final pixel domain distortion calculation and recon_intra(). - p->dqcoeff = best_dqcoeff; + mb_plane->dqcoeff = best_dqcoeff; if (calc_pixel_domain_distortion_final && best_eob) { best_rd_stats->dist = @@ -2704,7 +2694,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, best_rd_stats->sse = block_sse; } - if (plane == 0 && x->plane[plane].eobs[block] == 1 && + if (plane == AVM_PLANE_Y && best_eob == 1 && get_primary_tx_type(best_tx_type) != DCT_DCT && !is_inter) { av2_invalid_rd_stats(best_rd_stats); } @@ -2715,7 +2705,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, if (plane == AVM_PLANE_Y || !is_cctx_allowed(cm, xd)) { recon_intra(cpi, x, plane, block, blk_row, blk_col, plane_bsize, tx_size, txb_ctx, skip_trellis, best_tx_type, 0, &rate_cost, best_eob); - p->dqcoeff = orig_dqcoeff; + mb_plane->dqcoeff = orig_dqcoeff; } } diff --git a/av2/encoder/tx_search.h b/av2/encoder/tx_search.h index 1397405441..ccc316d6ba 100644 --- a/av2/encoder/tx_search.h +++ b/av2/encoder/tx_search.h @@ -19,11 +19,66 @@ extern "C" { #endif +// Encoder-only configuration to reduce the search complexity of IST. +#define IST_REDUCED_SEARCH_SET_SIZE 4 + // Set this macro as 1 to collect data about tx size selection. #define COLLECT_TX_SIZE_DATA 0 #if COLLECT_TX_SIZE_DATA +#include +#include "av2/encoder/random.h" + static const char av2_tx_size_data_output_file[] = "tx_size_data.txt"; + +static AVM_INLINE void collect_tx_size_data(const AV2_COMP *cpi, + const MACROBLOCK *x, int plane, + int blk_row, int blk_col, + BLOCK_SIZE plane_bsize, + TX_SIZE tx_size, TX_TYPE tx_type, + int64_t rd) { + // Generate small sample to restrict output size. + static unsigned int seed = 21743; + if (lcg_rand16(&seed) % 200 == 0) { + FILE *fp = NULL; + const MACROBLOCKD *xd = &x->e_mbd; + const MB_MODE_INFO *mbmi = xd->mi[0]; + const int mi_row = xd->mi_row; + const int mi_col = xd->mi_col; + const BLOCK_SIZE luma_bsize = mbmi->sb_type[PLANE_TYPE_Y]; + const int within_border = + mi_row >= xd->tile.mi_row_start && + (mi_row + mi_size_high[luma_bsize] < xd->tile.mi_row_end) && + mi_col >= xd->tile.mi_col_start && + (mi_col + mi_size_wide[luma_bsize] < xd->tile.mi_col_end); + if (within_border) { + fp = fopen(av2_tx_size_data_output_file, "a"); + } + + if (fp) { + // Transform info and RD + const int txb_w = tx_size_wide[tx_size]; + const int txb_h = tx_size_high[tx_size]; + + // Residue signal. + const int diff_stride = block_size_wide[plane_bsize]; + const struct macroblock_plane *const p = &x->plane[plane]; + const int16_t *src_diff = + &p->src_diff[(blk_row * diff_stride + blk_col) * 4]; + + for (int r = 0; r < txb_h; ++r) { + for (int c = 0; c < txb_w; ++c) { + fprintf(fp, "%d,", src_diff[c]); + } + src_diff += diff_stride; + } + + fprintf(fp, "%d,%d,%d,%" PRId64, txb_w, txb_h, tx_type, rd); + fprintf(fp, "\n"); + fclose(fp); + } + } +} #endif enum { From 90e42b3e385006d332538da32584bfcfdde72683 Mon Sep 17 00:00:00 2001 From: motongxu Date: Thu, 23 Jul 2026 10:10:20 -0700 Subject: [PATCH 23/51] Increase TCQ threshold based on base QP (#5132) Increase TCQ zero threshold to 9 * abs_coef >= 10 * dequant when base_qindex < 185. Anchor: https://github.com/AOMediaCodec/avm/commit/6e71b0c85924e61d9403b6222921cd4bb8cf870e Tests: cpu-used =1, RA A1 - 17 frames A2 - 33 frames ``` +---------+--------+--------+--------+--------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+--------+--------+--------+--------+----------+----------+ | A1 | -0.01% | -0.01% | 0.00% | -0.01% | 98.6% | 98.6% | | A2 | 0.00% | -0.06% | -0.05% | 0.00% | 98.9% | 100.1% | +---------+--------+--------+--------+--------+----------+----------+ ``` --- av2/common/av2_rtcd_defs.pl | 2 +- av2/encoder/av2_quantize.c | 78 +++++++++++++--------- av2/encoder/av2_quantize.h | 12 ++-- av2/encoder/encodemb.c | 74 +++++++++++--------- av2/encoder/encodemb.h | 13 ++-- av2/encoder/partition_ml.c | 3 +- av2/encoder/speed_features.c | 4 ++ av2/encoder/speed_features.h | 6 ++ av2/encoder/tpl_model.c | 3 +- av2/encoder/tx_search.c | 45 +++++++++---- av2/encoder/x86/av2_highbd_quantize_avx2.c | 29 +++++--- av2/encoder/x86/av2_highbd_quantize_sse4.c | 31 ++++++--- avm_dsp/avm_dsp_rtcd_defs.pl | 2 +- avm_dsp/quantize.c | 15 ++--- avm_dsp/quantize.h | 14 ++-- avm_dsp/x86/highbd_quantize_intrin_avx2.c | 5 +- avm_dsp/x86/highbd_quantize_intrin_sse2.c | 5 +- test/av2_quantize_test.cc | 68 +++++++++++-------- test/quantize_func_test.cc | 18 ++--- 19 files changed, 257 insertions(+), 170 deletions(-) diff --git a/av2/common/av2_rtcd_defs.pl b/av2/common/av2_rtcd_defs.pl index e1ff520426..95e64ca4f7 100644 --- a/av2/common/av2_rtcd_defs.pl +++ b/av2/common/av2_rtcd_defs.pl @@ -266,7 +266,7 @@ () add_proto qw/int64_t av2_highbd_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd"; specialize qw/av2_highbd_block_error sse2 avx2/; - add_proto qw/void av2_highbd_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, int log_scale"; + add_proto qw/void av2_highbd_quantize_fp/, "const int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, int log_scale"; specialize qw/av2_highbd_quantize_fp sse4_1 avx2/; add_proto qw/void av2_highbd_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride"; diff --git a/av2/encoder/av2_quantize.c b/av2/encoder/av2_quantize.c index c2b1a10073..c75ca00bf4 100644 --- a/av2/encoder/av2_quantize.c +++ b/av2/encoder/av2_quantize.c @@ -36,12 +36,12 @@ void av2_quantize_skip(intptr_t n_coeffs, tran_low_t *qcoeff_ptr, } static void highbd_quantize_fp_helper_c( - const tran_low_t *coeff_ptr, intptr_t count, const int32_t *zbin_ptr, - const int32_t *round_ptr, const int32_t *quant_ptr, - const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, - tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan, const qm_val_t *qm_ptr, - const qm_val_t *iqm_ptr, int log_scale) { + const int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, + intptr_t count, const int32_t *zbin_ptr, const int32_t *round_ptr, + const int32_t *quant_ptr, const int32_t *quant_shift_ptr, + tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, + uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, + const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr, int log_scale) { int i; int eob = -1; const int shift = 16 - log_scale + QUANT_FP_BITS; @@ -50,7 +50,12 @@ static void highbd_quantize_fp_helper_c( (void)zbin_ptr; (void)quant_shift_ptr; (void)iscan; - + int abs_coeff_scale = 1; + int dequant_ptr_scale = 1; + if (use_tcq_deadzone_boost == 1) { // 5/9 + abs_coeff_scale = 9; + dequant_ptr_scale = 10; + } if (qm_ptr || iqm_ptr) { // Quantization pass: All coefficients with index >= zero_flag are // skippable. Note: zero_flag can be zero. @@ -65,10 +70,11 @@ static void highbd_quantize_fp_helper_c( const int coeff_sign = AVMSIGN(coeff); const int64_t abs_coeff = (coeff ^ coeff_sign) - coeff_sign; int abs_qcoeff = 0; - - if ((((tran_high_t)abs_coeff * wt) << QUANT_TABLE_BITS) >= - ((tran_high_t)dequant_ptr[rc != 0] - << (AVM_QM_BITS - (1 + log_scale)))) { + // Raise deadzone threshold to 10/9 of dequant when TCQ is enabled + if (abs_coeff_scale * + (((tran_high_t)abs_coeff * wt) << QUANT_TABLE_BITS) >= + dequant_ptr_scale * ((tran_high_t)dequant_ptr[rc != 0] + << (AVM_QM_BITS - (1 + log_scale)))) { const int64_t tmp = abs_coeff + ROUND_POWER_OF_TWO(round_ptr[rc != 0], log_scale); abs_qcoeff = @@ -99,9 +105,10 @@ static void highbd_quantize_fp_helper_c( const int coeff_sign = AVMSIGN(coeff); const int abs_coeff = (coeff ^ coeff_sign) - coeff_sign; const int log_scaled_round = log_scaled_round_arr[rc01]; - - if (((tran_high_t)abs_coeff << (1 + log_scale + QUANT_TABLE_BITS)) >= - (tran_high_t)dequant_ptr[rc01]) { + // Raise deadzone threshold to 10/9 of dequant when TCQ is enabled + if (abs_coeff_scale * + ((tran_high_t)abs_coeff << (1 + log_scale + QUANT_TABLE_BITS)) >= + dequant_ptr_scale * (tran_high_t)dequant_ptr[rc01]) { const int quant = quant_ptr[rc01]; const int dequant = dequant_ptr[rc01]; const int64_t tmp = (int64_t)abs_coeff + log_scaled_round; @@ -124,7 +131,8 @@ static void highbd_quantize_fp_helper_c( *eob_ptr = eob + 1; } -void av2_highbd_quantize_fp_facade(const tran_low_t *coeff_ptr, +void av2_highbd_quantize_fp_facade(const int use_tcq_deadzone_boost, + const tran_low_t *coeff_ptr, intptr_t n_coeffs, const MACROBLOCK_PLANE *p, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, @@ -133,24 +141,28 @@ void av2_highbd_quantize_fp_facade(const tran_low_t *coeff_ptr, const qm_val_t *qm_ptr = qparam->qmatrix; const qm_val_t *iqm_ptr = qparam->iqmatrix; if (qm_ptr != NULL && iqm_ptr != NULL) { - highbd_quantize_fp_helper_c( - coeff_ptr, n_coeffs, p->zbin_QTX, p->round_fp_QTX, p->quant_fp_QTX, - p->quant_shift_QTX, qcoeff_ptr, dqcoeff_ptr, p->dequant_QTX, eob_ptr, - sc->scan, sc->iscan, qm_ptr, iqm_ptr, qparam->log_scale); + highbd_quantize_fp_helper_c(use_tcq_deadzone_boost, coeff_ptr, n_coeffs, + p->zbin_QTX, p->round_fp_QTX, p->quant_fp_QTX, + p->quant_shift_QTX, qcoeff_ptr, dqcoeff_ptr, + p->dequant_QTX, eob_ptr, sc->scan, sc->iscan, + qm_ptr, iqm_ptr, qparam->log_scale); } else { - av2_highbd_quantize_fp(coeff_ptr, n_coeffs, p->zbin_QTX, p->round_fp_QTX, - p->quant_fp_QTX, p->quant_shift_QTX, qcoeff_ptr, - dqcoeff_ptr, p->dequant_QTX, eob_ptr, sc->scan, - sc->iscan, qparam->log_scale); + av2_highbd_quantize_fp(use_tcq_deadzone_boost, coeff_ptr, n_coeffs, + p->zbin_QTX, p->round_fp_QTX, p->quant_fp_QTX, + p->quant_shift_QTX, qcoeff_ptr, dqcoeff_ptr, + p->dequant_QTX, eob_ptr, sc->scan, sc->iscan, + qparam->log_scale); } } -void av2_highbd_quantize_b_facade(const tran_low_t *coeff_ptr, +void av2_highbd_quantize_b_facade(const int use_tcq_deadzone_boost, + const tran_low_t *coeff_ptr, intptr_t n_coeffs, const MACROBLOCK_PLANE *p, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const SCAN_ORDER *sc, const QUANT_PARAM *qparam) { + (void)use_tcq_deadzone_boost; const qm_val_t *qm_ptr = qparam->qmatrix; const qm_val_t *iqm_ptr = qparam->iqmatrix; if (qparam->use_quant_b_adapt) { @@ -189,7 +201,7 @@ void av2_highbd_quantize_b_facade(const tran_low_t *coeff_ptr, p->quant_shift_QTX, qcoeff_ptr, dqcoeff_ptr, p->dequant_QTX, eob_ptr, sc->scan, sc->iscan, qm_ptr, iqm_ptr, qparam->log_scale); } else { - avm_highbd_quantize_b(coeff_ptr, n_coeffs, p->zbin_QTX, p->round_QTX, + avm_highbd_quantize_b(0, coeff_ptr, n_coeffs, p->zbin_QTX, p->round_QTX, p->quant_QTX, p->quant_shift_QTX, qcoeff_ptr, dqcoeff_ptr, p->dequant_QTX, eob_ptr, sc->scan, sc->iscan, qparam->log_scale); @@ -234,7 +246,8 @@ static INLINE void highbd_quantize_dc( *eob_ptr = eob + 1; } -void av2_highbd_quantize_dc_facade(const tran_low_t *coeff_ptr, +void av2_highbd_quantize_dc_facade(const int use_tcq_deadzone_boost, + const tran_low_t *coeff_ptr, intptr_t n_coeffs, const MACROBLOCK_PLANE *p, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, @@ -245,14 +258,15 @@ void av2_highbd_quantize_dc_facade(const tran_low_t *coeff_ptr, const qm_val_t *qm_ptr = qparam->qmatrix; const qm_val_t *iqm_ptr = qparam->iqmatrix; (void)sc; + (void)use_tcq_deadzone_boost; highbd_quantize_dc(coeff_ptr, (int)n_coeffs, skip_block, p->round_QTX, p->quant_fp_QTX[0], qcoeff_ptr, dqcoeff_ptr, p->dequant_QTX[0], eob_ptr, qm_ptr, iqm_ptr, qparam->log_scale); } - -void av2_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t count, +void av2_highbd_quantize_fp_c(const int use_tcq_deadzone_boost, + const tran_low_t *coeff_ptr, intptr_t count, const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, @@ -260,10 +274,10 @@ void av2_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t count, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, int log_scale) { - highbd_quantize_fp_helper_c(coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, - quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, - dequant_ptr, eob_ptr, scan, iscan, NULL, NULL, - log_scale); + highbd_quantize_fp_helper_c(use_tcq_deadzone_boost, coeff_ptr, count, + zbin_ptr, round_ptr, quant_ptr, quant_shift_ptr, + qcoeff_ptr, dqcoeff_ptr, dequant_ptr, eob_ptr, + scan, iscan, NULL, NULL, log_scale); } static void invert_quant(int32_t *quant, int32_t *shift, int d) { diff --git a/av2/encoder/av2_quantize.h b/av2/encoder/av2_quantize.h index ba48d00638..e5893ca74a 100644 --- a/av2/encoder/av2_quantize.h +++ b/av2/encoder/av2_quantize.h @@ -36,7 +36,8 @@ typedef struct QUANT_PARAM { int xform_quant_idx; } QUANT_PARAM; -typedef void (*AV2_QUANT_FACADE)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +typedef void (*AV2_QUANT_FACADE)(const int use_tcq_deadzone_boost, + const tran_low_t *coeff_ptr, intptr_t n_coeffs, const MACROBLOCK_PLANE *p, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, @@ -129,21 +130,24 @@ int av2_qindex_to_quantizer(int qindex, avm_bit_depth_t bit_depth); void av2_quantize_skip(intptr_t n_coeffs, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr); -void av2_highbd_quantize_fp_facade(const tran_low_t *coeff_ptr, +void av2_highbd_quantize_fp_facade(const int use_tcq_deadzone_boost, + const tran_low_t *coeff_ptr, intptr_t n_coeffs, const MACROBLOCK_PLANE *p, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const SCAN_ORDER *sc, const QUANT_PARAM *qparam); -void av2_highbd_quantize_b_facade(const tran_low_t *coeff_ptr, +void av2_highbd_quantize_b_facade(const int use_tcq_deadzone_boost, + const tran_low_t *coeff_ptr, intptr_t n_coeffs, const MACROBLOCK_PLANE *p, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const SCAN_ORDER *sc, const QUANT_PARAM *qparam); -void av2_highbd_quantize_dc_facade(const tran_low_t *coeff_ptr, +void av2_highbd_quantize_dc_facade(const int use_tcq_deadzone_boost, + const tran_low_t *coeff_ptr, intptr_t n_coeffs, const MACROBLOCK_PLANE *p, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, diff --git a/av2/encoder/encodemb.c b/av2/encoder/encodemb.c index ebf9416215..fc9e00abfc 100644 --- a/av2/encoder/encodemb.c +++ b/av2/encoder/encodemb.c @@ -593,10 +593,10 @@ void av2_xform_dc_only(MACROBLOCK *x, int plane, int block, coeff[0] = (tran_low_t)((per_px_mean * dc_coeff_scale[txfm_param->tx_size]) >> 12); } - -void av2_xform_quant(const AV2_COMMON *cm, MACROBLOCK *x, int plane, int block, - int blk_row, int blk_col, BLOCK_SIZE plane_bsize, - TxfmParam *txfm_param, QUANT_PARAM *qparam) { +void av2_xform_quant(const int use_tcq_deadzone_boost, const AV2_COMMON *cm, + MACROBLOCK *x, int plane, int block, int blk_row, + int blk_col, BLOCK_SIZE plane_bsize, TxfmParam *txfm_param, + QUANT_PARAM *qparam) { MACROBLOCKD *const xd = &x->e_mbd; MB_MODE_INFO *const mbmi = xd->mi[0]; const struct macroblock_plane *const p = &x->plane[plane]; @@ -625,7 +625,7 @@ void av2_xform_quant(const AV2_COMMON *cm, MACROBLOCK *x, int plane, int block, mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && plane == PLANE_TYPE_Y) || use_inter_fsc(cm, plane, txfm_param->tx_type, is_inter)); - av2_quant(x, plane, block, txfm_param, qparam); + av2_quant(use_tcq_deadzone_boost, x, plane, block, txfm_param, qparam); if (fsc_mode) { if (get_primary_tx_type(txfm_param->tx_type) == IDTX) { uint16_t *const eob = &p->eobs[block]; @@ -712,9 +712,8 @@ void set_bob(MACROBLOCK *x, int plane, int block, TX_SIZE tx_size, } *bob_ptr = av2_get_max_eob(tx_size) - bob; } - -void av2_quant(MACROBLOCK *x, int plane, int block, TxfmParam *txfm_param, - QUANT_PARAM *qparam) { +void av2_quant(const int use_tcq_deadzone_boost, MACROBLOCK *x, int plane, + int block, TxfmParam *txfm_param, QUANT_PARAM *qparam) { const struct macroblock_plane *const p = &x->plane[plane]; const SCAN_ORDER *const scan_order = get_scan(txfm_param->tx_size, txfm_param->tx_type); @@ -727,8 +726,9 @@ void av2_quant(MACROBLOCK *x, int plane, int block, TxfmParam *txfm_param, if (qparam->xform_quant_idx != AV2_XFORM_QUANT_SKIP_QUANT) { const int n_coeffs = av2_get_max_eob(txfm_param->tx_size); if (LIKELY(!x->seg_skip_block)) { - quant_func_list[qparam->xform_quant_idx]( - coeff, n_coeffs, p, qcoeff, dqcoeff, eob, scan_order, qparam); + quant_func_list[qparam->xform_quant_idx](use_tcq_deadzone_boost, coeff, + n_coeffs, p, qcoeff, dqcoeff, + eob, scan_order, qparam); } else { av2_quantize_skip(n_coeffs, qcoeff, dqcoeff, eob); } @@ -915,14 +915,6 @@ static void encode_block(int plane, int block, int blk_row, int blk_col, cpi->oxcf.q_cfg.quant_b_adapt, &quant_param); av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type, &quant_param); - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, - &txfm_param, &quant_param); - - bool enable_parity_hiding = - cm->features.allow_parity_hiding && !xd->lossless[mbmi->segment_id] && - plane == PLANE_TYPE_Y && - ph_allowed_tx_types[get_primary_tx_type(tx_type)] && - (p->eobs[block] > PHTHRESH); // Settings for optimization type. NOTE: To set optimization type for all // intra frames, both `KEY_BLOCK_OPT_TYPE` and `INTRA_BLOCK_OPT_TYPE` should // be set. @@ -949,6 +941,20 @@ static void encode_block(int plane, int block, int blk_row, int blk_col, INTER_BLOCK_OPT_TYPE == TRELLIS_DROPOUT_OPT; const bool do_dropout = INTER_BLOCK_OPT_TYPE == DROPOUT_OPT || INTER_BLOCK_OPT_TYPE == TRELLIS_DROPOUT_OPT; + const int use_tcq_deadzone_boost = + use_tcq && quant_param.use_optimize_b && do_trellis && !fsc_mode && + cpi->sf.tx_sf.enable_adaptive_tcq_threshold && + cm->quant_params.base_qindex < + cpi->sf.tx_sf.adaptive_tcq_threshold_qidx; + av2_xform_quant(use_tcq_deadzone_boost, cm, x, plane, block, blk_row, + blk_col, plane_bsize, &txfm_param, &quant_param); + + bool enable_parity_hiding = + cm->features.allow_parity_hiding && !xd->lossless[mbmi->segment_id] && + plane == PLANE_TYPE_Y && + ph_allowed_tx_types[get_primary_tx_type(tx_type)] && + (p->eobs[block] > PHTHRESH); + if (quant_param.use_optimize_b && do_trellis) { TXB_CTX txb_ctx; get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx, @@ -1210,9 +1216,8 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col, &quant_param); av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, DCT_DCT, &quant_param); - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, + av2_xform_quant(0, cm, x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param, &quant_param); - if (p->eobs[block] > 0) { txfm_param.eob = p->eobs[block]; av2_highbd_inv_txfm_add(dqcoeff, dst, pd->dst.stride, &txfm_param); @@ -1412,13 +1417,6 @@ void av2_encode_block_intra(int plane, int block, int blk_row, int blk_col, cpi->oxcf.q_cfg.quant_b_adapt, &quant_param); av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type, &quant_param); - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, - &txfm_param, &quant_param); - - bool enable_parity_hiding = - cm->features.allow_parity_hiding && !xd->lossless[mbmi->segment_id] && - plane == PLANE_TYPE_Y && - ph_allowed_tx_types[get_primary_tx_type(tx_type)] && (*eob > PHTHRESH); // Settings for optimization type. NOTE: To set optimization type for all // intra frames, both `KEY_BLOCK_OPT_TYPE` and `INTRA_BLOCK_OPT_TYPE` should @@ -1455,6 +1453,18 @@ void av2_encode_block_intra(int plane, int block, int blk_row, int blk_col, (!frame_is_intra_only(cm) && (INTRA_BLOCK_OPT_TYPE == DROPOUT_OPT || INTRA_BLOCK_OPT_TYPE == TRELLIS_DROPOUT_OPT)); + const int use_tcq_deadzone_boost = + use_tcq && quant_param.use_optimize_b && do_trellis && !fsc_mode && + cpi->sf.tx_sf.enable_adaptive_tcq_threshold && + cm->quant_params.base_qindex < + cpi->sf.tx_sf.adaptive_tcq_threshold_qidx; + av2_xform_quant(use_tcq_deadzone_boost, cm, x, plane, block, blk_row, + blk_col, plane_bsize, &txfm_param, &quant_param); + + bool enable_parity_hiding = + cm->features.allow_parity_hiding && !xd->lossless[mbmi->segment_id] && + plane == PLANE_TYPE_Y && + ph_allowed_tx_types[get_primary_tx_type(tx_type)] && (*eob > PHTHRESH); if (quant_param.use_optimize_b && do_trellis) { TXB_CTX txb_ctx; @@ -1485,8 +1495,8 @@ void av2_encode_block_intra(int plane, int block, int blk_row, int blk_col, cpi->oxcf.q_cfg.quant_b_adapt, &quant_param); av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type, &quant_param); - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, - &txfm_param, &quant_param); + av2_xform_quant(use_tcq_deadzone_boost, cm, x, plane, block, blk_row, + blk_col, plane_bsize, &txfm_param, &quant_param); if (quant_param.use_optimize_b && do_trellis) { TXB_CTX txb_ctx; get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx, @@ -1720,8 +1730,8 @@ void av2_encode_block_intra_joint_uv(int block, int blk_row, int blk_col, &txfm_param); av2_setup_qmatrix(&cm->quant_params, xd, AVM_PLANE_U, tx_size, tx_type, &quant_param); - av2_xform_quant(cm, x, AVM_PLANE_U, block, blk_row, blk_col, plane_bsize, - &txfm_param, &quant_param); + av2_xform_quant(0, cm, x, AVM_PLANE_U, block, blk_row, blk_col, + plane_bsize, &txfm_param, &quant_param); if (quant_param.use_optimize_b) { const ENTROPY_CONTEXT *a = &args->ta[blk_col]; const ENTROPY_CONTEXT *l = &args->tl[blk_row]; @@ -1736,7 +1746,7 @@ void av2_encode_block_intra_joint_uv(int block, int blk_row, int blk_col, av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type, &quant_param); - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, + av2_xform_quant(0, cm, x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param, &quant_param); if (quant_param.use_optimize_b) { diff --git a/av2/encoder/encodemb.h b/av2/encoder/encodemb.h index 177adaa1bf..b886c3cb52 100644 --- a/av2/encoder/encodemb.h +++ b/av2/encoder/encodemb.h @@ -89,10 +89,10 @@ void av2_setup_qmatrix(const CommonQuantParams *quant_params, void av2_xform_dc_only(MACROBLOCK *x, int plane, int block, TxfmParam *txfm_param, int64_t per_px_mean); - -void av2_xform_quant(const AV2_COMMON *cm, MACROBLOCK *x, int plane, int block, - int blk_row, int blk_col, BLOCK_SIZE plane_bsize, - TxfmParam *txfm_param, QUANT_PARAM *qparam); +void av2_xform_quant(const int use_tcq_deadzone_boost, const AV2_COMMON *cm, + MACROBLOCK *x, int plane, int block, int blk_row, + int blk_col, BLOCK_SIZE plane_bsize, TxfmParam *txfm_param, + QUANT_PARAM *qparam); void av2_xform(MACROBLOCK *x, int plane, int block, int blk_row, int blk_col, BLOCK_SIZE plane_bsize, TxfmParam *txfm_param, const int reuse, @@ -104,9 +104,8 @@ void forward_cross_chroma_transform(MACROBLOCK *x, int block, TX_SIZE tx_size, // This function sets the first position index in a TU. void set_bob(MACROBLOCK *x, int plane, int block, TX_SIZE tx_size, TX_TYPE tx_type); - -void av2_quant(MACROBLOCK *x, int plane, int block, TxfmParam *txfm_param, - QUANT_PARAM *qparam); +void av2_quant(const int use_tcq_deadzone_boost, MACROBLOCK *x, int plane, + int block, TxfmParam *txfm_param, QUANT_PARAM *qparam); int av2_optimize_fsc(const struct AV2_COMP *cpi, MACROBLOCK *mb, int plane, int block, TX_SIZE tx_size, TX_TYPE tx_type, diff --git a/av2/encoder/partition_ml.c b/av2/encoder/partition_ml.c index 621182ff82..905f8498b7 100644 --- a/av2/encoder/partition_ml.c +++ b/av2/encoder/partition_ml.c @@ -65,7 +65,8 @@ void compute_residual_stats(AV2_COMP *const cpi, ThreadData *td, MACROBLOCK *x, &quant_param); av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, DCT_DCT, &quant_param); - av2_xform_quant(cm, x, plane, block, 0, 0, bsize, &txfm_param, &quant_param); + av2_xform_quant(0, cm, x, plane, block, 0, 0, bsize, &txfm_param, + &quant_param); const int n_coeffs = av2_get_max_eob(txfm_param.tx_size); for (int i = 0; i < n_coeffs; i++) { int abs_qcoeff = abs(qcoeff[i]); diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 0c220b6c96..9b17e14e5f 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -323,6 +323,8 @@ static void set_good_speed_features_framesize_independent( sf->tx_sf.model_based_prune_tx_search_level = 1; sf->tx_sf.prune_tx_rd_eval_sec_tx_sse = true; sf->tx_sf.tx_type_search.use_reduced_intra_txset = 1; + sf->tx_sf.enable_adaptive_tcq_threshold = false; + sf->tx_sf.adaptive_tcq_threshold_qidx = 185; if (cpi->twopass.fr_content_type == FC_HIGHMOTION || cpi->is_screen_content_type) { @@ -378,6 +380,8 @@ static void set_good_speed_features_framesize_independent( // nearest searched result beyond the cap. sf->mv_sf.newmv_drl_search_limit = 2; + sf->tx_sf.enable_adaptive_tcq_threshold = true; + sf->tx_sf.adaptive_tcq_threshold_qidx = 185; sf->inter_sf.enable_enhanced_inter_mode_cache_reuse = 1; sf->inter_sf.skip_temporary_pred_for_opfl = 1; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 6a6a62284a..019e11017a 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -842,6 +842,12 @@ typedef struct TX_SPEED_FEATURES { // Enable txfm partition search bool enable_tx_partition; + // Enable adaptive TCQ threshold: + bool enable_adaptive_tcq_threshold; + + // Base qindex upper bound for applying the adaptive TCQ threshold + int adaptive_tcq_threshold_qidx; + // Skip IST/STX cascade for intra-luma candidates whose primary transform // quantizes to zero. Extends the intra-luma pre-skip / post-trellis gates // from eob == 1 to also cover eob == 0 (stx > 0 only, so skip-coded diff --git a/av2/encoder/tpl_model.c b/av2/encoder/tpl_model.c index ab118c5e01..92451c42ff 100644 --- a/av2/encoder/tpl_model.c +++ b/av2/encoder/tpl_model.c @@ -48,8 +48,7 @@ static AVM_INLINE void get_quantize_error(const MACROBLOCK *x, int plane, QUANT_PARAM quant_param; av2_setup_quant(tx_size, 0, AV2_XFORM_QUANT_FP, 0, &quant_param); - - av2_highbd_quantize_fp_facade(coeff, pix_num, p, qcoeff, dqcoeff, eob, + av2_highbd_quantize_fp_facade(0, coeff, pix_num, p, qcoeff, dqcoeff, eob, scan_order, &quant_param); *recon_error = av2_highbd_block_error(coeff, dqcoeff, pix_num, sse, xd->bd) >> shift; diff --git a/av2/encoder/tx_search.c b/av2/encoder/tx_search.c index f17736674a..08a1732393 100644 --- a/av2/encoder/tx_search.c +++ b/av2/encoder/tx_search.c @@ -51,7 +51,7 @@ typedef struct tx_size_rd_info_node { // Mapping of index to IST kernel set (for encoder search only) static const uint8_t ist_intra_stx_mapping[IST_SET_SIZE][IST_SET_SIZE] = { { 6, 1, 0, 5, 4, 3, 2 }, // DC_PRED - { 1, 6, 0, 4, 2, 5, 3 }, // V_PRED, H_PRED, SMOOTH_V_PRED, SMOOTH_H_PRED + { 1, 6, 0, 4, 2, 5, 3 }, // V_PRED, H_PRED, SMOOTH_V_PRED, SMOOTH_H_PRED { 2, 6, 0, 5, 1, 4, 3 }, // D45_PRED { 3, 4, 6, 1, 0, 2, 5 }, // D135_PRED { 4, 1, 3, 6, 0, 5, 2 }, // D113_PRED, D157_PRED @@ -61,7 +61,7 @@ static const uint8_t ist_intra_stx_mapping[IST_SET_SIZE][IST_SET_SIZE] = { static const uint8_t ist_intra_stx_mapping_ADST_ADST[IST_SET_SIZE][IST_REDUCED_SET_SIZE] = { { 3, 1, 0, 2 }, // DC_PRED - { 1, 3, 0, 2 }, // V_PRED, H_PRED, SMOOTH_V_PRED, SMOOTH_H_PRED + { 1, 3, 0, 2 }, // V_PRED, H_PRED, SMOOTH_V_PRED, SMOOTH_H_PRED { 1, 3, 0, 2 }, // D45_PRED { 0, 2, 3, 1 }, // D135_PRED { 2, 1, 0, 3 }, // D113_PRED, D157_PRED @@ -920,13 +920,25 @@ static INLINE void recon_intra(const AV2_COMP *cpi, MACROBLOCK *x, int plane, av2_subtract_txb(x, plane, plane_bsize, blk_col, blk_row, tx_size, cm->width, cm->height, get_primary_tx_type(best_tx_type)); - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, - &txfm_param_intra, &quant_param_intra); const uint8_t fsc_mode = ((cm->seq_params.enable_fsc && xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] && plane == PLANE_TYPE_Y) || use_inter_fsc(cm, plane, best_tx_type, 0 /*is_inter*/)); + const TX_CLASS tx_class = + tx_type_to_class[get_primary_tx_type(best_tx_type)]; + int use_tcq = + tcq_enable(cpi->common.features.tcq_mode, + xd->lossless[x->e_mbd.mi[0]->segment_id], plane, tx_class); + const int use_tcq_deadzone_boost = + use_tcq && quant_param_intra.use_optimize_b && !fsc_mode && + cpi->sf.tx_sf.enable_adaptive_tcq_threshold && + cm->quant_params.base_qindex < + cpi->sf.tx_sf.adaptive_tcq_threshold_qidx; + av2_xform_quant(use_tcq_deadzone_boost, cm, x, plane, block, blk_row, + blk_col, plane_bsize, &txfm_param_intra, + &quant_param_intra); + if (fsc_mode && quant_param_intra.use_optimize_b) { av2_optimize_fsc(cpi, x, plane, block, tx_size, best_tx_type, txb_ctx, rate_cost); @@ -1249,8 +1261,7 @@ uint16_t prune_txk_type_separ(const AV2_COMP *cpi, MACROBLOCK *x, int plane, for (idx = 0; idx < 4; ++idx) { tx_type = idx_map[idx]; txfm_param.tx_type = tx_type; - - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, + av2_xform_quant(0, cm, x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param, &quant_param); dist_block_tx_domain(x, plane, block, tx_size, &dist, &sse); @@ -1279,8 +1290,7 @@ uint16_t prune_txk_type_separ(const AV2_COMP *cpi, MACROBLOCK *x, int plane, for (idx = start_v; idx < end_v; ++idx) { tx_type = idx_map_v[idx_v[idx] * 4]; txfm_param.tx_type = tx_type; - - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, + av2_xform_quant(0, cm, x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param, &quant_param); dist_block_tx_domain(x, plane, block, tx_size, &dist, &sse); @@ -1365,7 +1375,7 @@ uint16_t prune_txk_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, txfm_param.tx_type = tx_type; // do txfm and quantization - av2_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, + av2_xform_quant(0, cm, x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param, &quant_param); // estimate rate cost rate_cost = av2_cost_coeffs_txb_laplacian(cm, x, plane, block, tx_size, @@ -2509,7 +2519,16 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, uint8_t fsc_mode_in = ((cm->seq_params.enable_fsc && is_fsc && plane == AVM_PLANE_Y) || use_inter_fsc(cm, plane, tx_type, is_inter)); - av2_quant(x, plane, block, &txfm_param, &quant_param); + int use_tcq = + tcq_enable(cpi->common.features.tcq_mode, + xd->lossless[xd->mi[0]->segment_id], plane, tx_class); + const int use_tcq_deadzone_boost = + use_tcq && quant_param.use_optimize_b && !fsc_mode_in && + cpi->sf.tx_sf.enable_adaptive_tcq_threshold && + cm->quant_params.base_qindex < + cpi->sf.tx_sf.adaptive_tcq_threshold_qidx; + av2_quant(use_tcq_deadzone_boost, x, plane, block, &txfm_param, + &quant_param); if (fsc_mode_in) { if (primary_tx_type == IDTX) { uint16_t *const eob = &mb_plane->eobs[block]; @@ -2752,11 +2771,11 @@ static void search_cctx_type(const AV2_COMP *cpi, MACROBLOCK *x, int block, if (av2_use_qmatrix(&cm->quant_params, xd, mbmi->segment_id)) av2_setup_qmatrix(&cm->quant_params, xd, AVM_PLANE_U, tx_size, tx_type, &quant_param); - av2_quant(x, AVM_PLANE_U, block, &txfm_param, &quant_param); + av2_quant(0, x, AVM_PLANE_U, block, &txfm_param, &quant_param); if (av2_use_qmatrix(&cm->quant_params, xd, mbmi->segment_id)) av2_setup_qmatrix(&cm->quant_params, xd, AVM_PLANE_V, tx_size, tx_type, &quant_param); - av2_quant(x, AVM_PLANE_V, block, &txfm_param, &quant_param); + av2_quant(0, x, AVM_PLANE_V, block, &txfm_param, &quant_param); } int rate_cost[2] = { 0, 0 }; @@ -2810,7 +2829,7 @@ static void search_cctx_type(const AV2_COMP *cpi, MACROBLOCK *x, int block, if (av2_use_qmatrix(&cm->quant_params, xd, mbmi->segment_id)) av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type, &quant_param); - av2_quant(x, plane, block, &txfm_param, &quant_param); + av2_quant(0, x, plane, block, &txfm_param, &quant_param); skip_cctx_eval = skip_cctx_eval_based_on_eob( plane, is_inter, eobs_ptr_c1[block], cctx_type); diff --git a/av2/encoder/x86/av2_highbd_quantize_avx2.c b/av2/encoder/x86/av2_highbd_quantize_avx2.c index 43b92f861a..2a91ac6fc7 100644 --- a/av2/encoder/x86/av2_highbd_quantize_avx2.c +++ b/av2/encoder/x86/av2_highbd_quantize_avx2.c @@ -65,12 +65,20 @@ static AVM_FORCE_INLINE __m256i get_max_lane_eob(const int16_t *iscan_ptr, static INLINE void quantize(const __m256i *qp, const tran_low_t *coeff_ptr, const int16_t *iscan_ptr, int log_scale, tran_low_t *qcoeff, tran_low_t *dqcoeff, - __m256i *eob) { + __m256i *eob, int use_tcq_deadzone_boost) { const __m256i coeff = _mm256_loadu_si256((const __m256i *)coeff_ptr); const __m256i abs_coeff = _mm256_abs_epi32(coeff); const __m256i abs_s = _mm256_slli_epi32(abs_coeff, 1 + log_scale + QUANT_TABLE_BITS); - const __m256i mask = _mm256_cmpgt_epi32(qp[2], abs_s); + __m256i mask; + if (use_tcq_deadzone_boost == 1) { + const __m256i abs_s9 = _mm256_add_epi32(_mm256_slli_epi32(abs_s, 3), abs_s); + const __m256i dq10 = _mm256_add_epi32(_mm256_slli_epi32(qp[2], 3), + _mm256_add_epi32(qp[2], qp[2])); + mask = _mm256_cmpgt_epi32(dq10, abs_s9); + } else { + mask = _mm256_cmpgt_epi32(qp[2], abs_s); + } const __m256i zbin_mask = _mm256_xor_si256(mask, _mm256_set1_epi32(-1)); // If all the transformed coefficient values are less than the dequantized @@ -107,11 +115,12 @@ static INLINE void quantize(const __m256i *qp, const tran_low_t *coeff_ptr, } void av2_highbd_quantize_fp_avx2( - const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int32_t *zbin_ptr, - const int32_t *round_ptr, const int32_t *quant_ptr, - const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, - tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan, int log_scale) { + const int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, + intptr_t n_coeffs, const int32_t *zbin_ptr, const int32_t *round_ptr, + const int32_t *quant_ptr, const int32_t *quant_shift_ptr, + tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, + uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, + int log_scale) { (void)scan; (void)zbin_ptr; (void)quant_shift_ptr; @@ -121,7 +130,8 @@ void av2_highbd_quantize_fp_avx2( init_qp(round_ptr, quant_ptr, dequant_ptr, log_scale, qp); __m256i eob = _mm256_setzero_si256(); - quantize(qp, coeff_ptr, iscan, log_scale, qcoeff_ptr, dqcoeff_ptr, &eob); + quantize(qp, coeff_ptr, iscan, log_scale, qcoeff_ptr, dqcoeff_ptr, &eob, + use_tcq_deadzone_boost); coeff_ptr += step; qcoeff_ptr += step; @@ -131,7 +141,8 @@ void av2_highbd_quantize_fp_avx2( update_qp(qp); while (n_coeffs > 0) { - quantize(qp, coeff_ptr, iscan, log_scale, qcoeff_ptr, dqcoeff_ptr, &eob); + quantize(qp, coeff_ptr, iscan, log_scale, qcoeff_ptr, dqcoeff_ptr, &eob, + use_tcq_deadzone_boost); coeff_ptr += step; qcoeff_ptr += step; diff --git a/av2/encoder/x86/av2_highbd_quantize_sse4.c b/av2/encoder/x86/av2_highbd_quantize_sse4.c index fe15fdf42a..167e68a434 100644 --- a/av2/encoder/x86/av2_highbd_quantize_sse4.c +++ b/av2/encoder/x86/av2_highbd_quantize_sse4.c @@ -23,7 +23,8 @@ static INLINE void quantize_coeff_phase1(__m128i *coeff, const __m128i *param, const int shift, const int scale, __m128i *qcoeff, __m128i *dquan, - __m128i *sign) { + __m128i *sign, + int use_tcq_deadzone_boost) { const __m128i zero = _mm_setzero_si128(); const __m128i one = _mm_set1_epi32(1); const __m128i round = _mm_set1_epi64x((1 << QUANT_TABLE_BITS) >> 1); @@ -43,7 +44,14 @@ static INLINE void quantize_coeff_phase1(__m128i *coeff, const __m128i *param, dquan[0] = _mm_srli_epi64(dquan[0], scale); const __m128i abs_s = _mm_slli_epi32(*coeff, 1 + scale); - qcoeff[2] = _mm_cmplt_epi32(abs_s, param[3]); + if (use_tcq_deadzone_boost == 1) { + const __m128i abs_s9 = _mm_add_epi32(_mm_slli_epi32(abs_s, 3), abs_s); + const __m128i dq10 = _mm_add_epi32(_mm_slli_epi32(param[3], 3), + _mm_add_epi32(param[3], param[3])); + qcoeff[2] = _mm_cmpgt_epi32(dq10, abs_s9); + } else { + qcoeff[2] = _mm_cmplt_epi32(abs_s, param[3]); + } } // Coefficient quantization phase 2 @@ -122,11 +130,12 @@ static INLINE uint16_t get_accumulated_eob(__m128i *eob) { } void av2_highbd_quantize_fp_sse4_1( - const tran_low_t *coeff_ptr, intptr_t count, const int32_t *zbin_ptr, - const int32_t *round_ptr, const int32_t *quant_ptr, - const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, - tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan, int log_scale) { + const int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, + intptr_t count, const int32_t *zbin_ptr, const int32_t *round_ptr, + const int32_t *quant_ptr, const int32_t *quant_shift_ptr, + tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, + uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, + int log_scale) { __m128i coeff[2], qcoeff[3], dequant[2], qparam[4], coeff_sign; __m128i eob = _mm_setzero_si128(); const tran_low_t *src = coeff_ptr; @@ -158,7 +167,7 @@ void av2_highbd_quantize_fp_sse4_1( // DC and first 3 AC quantize_coeff_phase1(&coeff[0], qparam, shift, log_scale, qcoeff, dequant, - &coeff_sign); + &coeff_sign, use_tcq_deadzone_boost); // update round/quan/dquan for AC qparam[0] = _mm_unpackhi_epi64(qparam[0], qparam[0]); @@ -171,7 +180,7 @@ void av2_highbd_quantize_fp_sse4_1( // next 4 AC coeff[1] = _mm_loadu_si128((__m128i const *)(src + coeff_stride)); quantize_coeff_phase1(&coeff[1], qparam, shift, log_scale, qcoeff, dequant, - &coeff_sign); + &coeff_sign, use_tcq_deadzone_boost); quantize_coeff_phase2(qcoeff, dequant, &coeff_sign, qparam, shift, log_scale, quanAddr + quan_stride, dquanAddr + quan_stride); @@ -190,12 +199,12 @@ void av2_highbd_quantize_fp_sse4_1( coeff[1] = _mm_loadu_si128((__m128i const *)(src + coeff_stride)); quantize_coeff_phase1(&coeff[0], qparam, shift, log_scale, qcoeff, dequant, - &coeff_sign); + &coeff_sign, use_tcq_deadzone_boost); quantize_coeff_phase2(qcoeff, dequant, &coeff_sign, qparam, shift, log_scale, quanAddr, dquanAddr); quantize_coeff_phase1(&coeff[1], qparam, shift, log_scale, qcoeff, dequant, - &coeff_sign); + &coeff_sign, use_tcq_deadzone_boost); quantize_coeff_phase2(qcoeff, dequant, &coeff_sign, qparam, shift, log_scale, quanAddr + quan_stride, dquanAddr + quan_stride); diff --git a/avm_dsp/avm_dsp_rtcd_defs.pl b/avm_dsp/avm_dsp_rtcd_defs.pl index 270b45baa8..254cf8424e 100644 --- a/avm_dsp/avm_dsp_rtcd_defs.pl +++ b/avm_dsp/avm_dsp_rtcd_defs.pl @@ -240,7 +240,7 @@ () # Quantization # if (avm_config("CONFIG_AV2_ENCODER") eq "yes") { - add_proto qw/void avm_highbd_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const int log_scale"; + add_proto qw/void avm_highbd_quantize_b/, "int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const int log_scale"; specialize qw/avm_highbd_quantize_b avx2 sse2/; add_proto qw/void avm_highbd_quantize_b_adaptive/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan"; diff --git a/avm_dsp/quantize.c b/avm_dsp/quantize.c index 4f96309ebe..f7f2df4106 100644 --- a/avm_dsp/quantize.c +++ b/avm_dsp/quantize.c @@ -201,14 +201,13 @@ void avm_highbd_quantize_b_64x64_adaptive_c( eob_ptr, scan, iscan, NULL, NULL, 2); } -void avm_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, - const int32_t *zbin_ptr, const int32_t *round_ptr, - const int32_t *quant_ptr, - const int32_t *quant_shift_ptr, - tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, - const int32_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan, - const int log_scale) { +void avm_highbd_quantize_b_c( + int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, intptr_t n_coeffs, + const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, + const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, + tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, + const int16_t *scan, const int16_t *iscan, const int log_scale) { + (void)use_tcq_deadzone_boost; avm_highbd_quantize_b_helper_c(coeff_ptr, n_coeffs, zbin_ptr, round_ptr, quant_ptr, quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, dequant_ptr, eob_ptr, scan, iscan, diff --git a/avm_dsp/quantize.h b/avm_dsp/quantize.h index 4068b05ae8..81d76e9787 100644 --- a/avm_dsp/quantize.h +++ b/avm_dsp/quantize.h @@ -58,14 +58,12 @@ void avm_highbd_quantize_b_helper_c( const int16_t *scan, const int16_t *iscan, const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr, const int log_scale); -void avm_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, - const int32_t *zbin_ptr, const int32_t *round_ptr, - const int32_t *quant_ptr, - const int32_t *quant_shift_ptr, - tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, - const int32_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan, - const int log_scale); +void avm_highbd_quantize_b_c( + int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, intptr_t n_coeffs, + const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, + const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, + tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, + const int16_t *scan, const int16_t *iscan, const int log_scale); #ifdef __cplusplus } // extern "C" #endif diff --git a/avm_dsp/x86/highbd_quantize_intrin_avx2.c b/avm_dsp/x86/highbd_quantize_intrin_avx2.c index 6e8169b97c..5d0144a57a 100644 --- a/avm_dsp/x86/highbd_quantize_intrin_avx2.c +++ b/avm_dsp/x86/highbd_quantize_intrin_avx2.c @@ -120,11 +120,12 @@ static INLINE void quantize(const __m256i *qp, const tran_low_t *coeff_ptr, } void avm_highbd_quantize_b_avx2( - const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int32_t *zbin_ptr, - const int32_t *round_ptr, const int32_t *quant_ptr, + int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, intptr_t n_coeffs, + const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const int log_scale) { + (void)use_tcq_deadzone_boost; (void)scan; const unsigned int step = 8; diff --git a/avm_dsp/x86/highbd_quantize_intrin_sse2.c b/avm_dsp/x86/highbd_quantize_intrin_sse2.c index ac4495ca05..9c1349a2c9 100644 --- a/avm_dsp/x86/highbd_quantize_intrin_sse2.c +++ b/avm_dsp/x86/highbd_quantize_intrin_sse2.c @@ -219,11 +219,12 @@ void highbd_quantize_b_64x64_sse2( } void avm_highbd_quantize_b_sse2( - const tran_low_t *coeff_ptr, intptr_t count, const int32_t *zbin_ptr, - const int32_t *round_ptr, const int32_t *quant_ptr, + int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, intptr_t count, + const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const int log_scale) { + (void)use_tcq_deadzone_boost; switch (log_scale) { case 0: highbd_quantize_b_sse2(coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, diff --git a/test/av2_quantize_test.cc b/test/av2_quantize_test.cc index db817e149b..fa9651221d 100644 --- a/test/av2_quantize_test.cc +++ b/test/av2_quantize_test.cc @@ -25,8 +25,8 @@ namespace { typedef void (*QuantizeFpFunc)( - const tran_low_t *coeff_ptr, intptr_t count, const int32_t *zbin_ptr, - const int32_t *round_ptr, const int32_t *quant_ptr, + int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, intptr_t count, + const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, int log_scale); @@ -97,25 +97,32 @@ class AV2QuantizeTest : public ::testing::TestWithParam { quant_ptr[j] = quant_ptr[1]; round_ptr[j] = round_ptr[1]; } - quanFuncRef(coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, - quant_shift_ptr, ref_qcoeff_ptr, ref_dqcoeff_ptr, dequant_ptr, - &ref_eob, scanOrder.scan, scanOrder.iscan, log_scale); - - ASM_REGISTER_STATE_CHECK( - quanFunc(coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, - quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, dequant_ptr, &eob, - scanOrder.scan, scanOrder.iscan, log_scale)); - - for (int j = 0; j < count; ++j) { - err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | - (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); - ASSERT_EQ(ref_qcoeff_ptr[j], qcoeff_ptr[j]) - << "qcoeff error: i = " << i << " j = " << j << "\n"; - EXPECT_EQ(ref_dqcoeff_ptr[j], dqcoeff_ptr[j]) - << "dqcoeff error: i = " << i << " j = " << j << "\n"; + for (int boost = 0; boost < 2; ++boost) { + ref_eob = eob = UINT16_MAX; + quanFuncRef(boost, coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, + quant_shift_ptr, ref_qcoeff_ptr, ref_dqcoeff_ptr, + dequant_ptr, &ref_eob, scanOrder.scan, scanOrder.iscan, + log_scale); + + ASM_REGISTER_STATE_CHECK( + quanFunc(boost, coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, + quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, dequant_ptr, + &eob, scanOrder.scan, scanOrder.iscan, log_scale)); + + for (int j = 0; j < count; ++j) { + err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | + (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); + ASSERT_EQ(ref_qcoeff_ptr[j], qcoeff_ptr[j]) + << "qcoeff error: i = " << i << " j = " << j + << " boost = " << boost << "\n"; + EXPECT_EQ(ref_dqcoeff_ptr[j], dqcoeff_ptr[j]) + << "dqcoeff error: i = " << i << " j = " << j + << " boost = " << boost << "\n"; + } + EXPECT_EQ(ref_eob, eob) + << "eob error: " << "i = " << i << " boost = " << boost << "\n"; + err_count += (ref_eob != eob); } - EXPECT_EQ(ref_eob, eob) << "eob error: " << "i = " << i << "\n"; - err_count += (ref_eob != eob); if (err_count && !err_count_total) { first_failure = i; } @@ -175,15 +182,20 @@ class AV2QuantizeTest : public ::testing::TestWithParam { round_ptr[j] = round_ptr[1]; } - quanFuncRef(coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, - quant_shift_ptr, ref_qcoeff_ptr, ref_dqcoeff_ptr, dequant_ptr, - &ref_eob, scanOrder.scan, scanOrder.iscan, log_scale); + for (int boost = 0; boost < 2; ++boost) { + ref_eob = eob = UINT16_MAX; + quanFuncRef(boost, coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, + quant_shift_ptr, ref_qcoeff_ptr, ref_dqcoeff_ptr, + dequant_ptr, &ref_eob, scanOrder.scan, scanOrder.iscan, + log_scale); - ASM_REGISTER_STATE_CHECK( - quanFunc(coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, - quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, dequant_ptr, &eob, - scanOrder.scan, scanOrder.iscan, log_scale)); - EXPECT_EQ(ref_eob, eob) << "eob error: " << "i = " << i << "\n"; + ASM_REGISTER_STATE_CHECK( + quanFunc(boost, coeff_ptr, count, zbin_ptr, round_ptr, quant_ptr, + quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, dequant_ptr, + &eob, scanOrder.scan, scanOrder.iscan, log_scale)); + EXPECT_EQ(ref_eob, eob) + << "eob error: " << "i = " << i << " boost = " << boost << "\n"; + } } } diff --git a/test/quantize_func_test.cc b/test/quantize_func_test.cc index bc10a19236..06aadfd84e 100644 --- a/test/quantize_func_test.cc +++ b/test/quantize_func_test.cc @@ -31,8 +31,8 @@ namespace { using libavm_test::ACMRandom; typedef void (*QuantizeFuncHbd)( - const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int32_t *zbin_ptr, - const int32_t *round_ptr, const int32_t *quant_ptr, + int use_tcq_deadzone_boost, const tran_low_t *coeff_ptr, intptr_t n_coeffs, + const int32_t *zbin_ptr, const int32_t *round_ptr, const int32_t *quant_ptr, const int32_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int32_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, int log_scale); @@ -122,13 +122,13 @@ class QuantizeTest : public ::testing::TestWithParam { memset(qcoeff_ref, 0, 5 * n_coeffs * sizeof(*qcoeff_ref)); - quant_ref_(coeff_ptr, n_coeffs, zbin, round, quant, quant_shift, + quant_ref_(0, coeff_ptr, n_coeffs, zbin, round, quant, quant_shift, qcoeff_ref, dqcoeff_ref, dequant, &eob[0], sc->scan, sc->iscan, log_scale); - ASM_REGISTER_STATE_CHECK(quant_(coeff_ptr, n_coeffs, zbin, round, quant, - quant_shift, qcoeff, dqcoeff, dequant, - &eob[1], sc->scan, sc->iscan, log_scale)); + ASM_REGISTER_STATE_CHECK(quant_( + 0, coeff_ptr, n_coeffs, zbin, round, quant, quant_shift, qcoeff, + dqcoeff, dequant, &eob[1], sc->scan, sc->iscan, log_scale)); for (int j = 0; j < n_coeffs; ++j) { ASSERT_EQ(qcoeff_ref[j], qcoeff[j]) @@ -289,15 +289,15 @@ TEST_P(QuantizeTest, DISABLED_Speed) { avm_usec_timer_start(&timer); for (int n = 0; n < kNumTests; ++n) { - quant_ref_(coeff_ptr, n_coeffs, zbin, round_fp, quant_fp, quant_shift, + quant_ref_(0, coeff_ptr, n_coeffs, zbin, round_fp, quant_fp, quant_shift, qcoeff, dqcoeff, dequant, eob, sc->scan, sc->iscan, log_scale); } avm_usec_timer_mark(&timer); avm_usec_timer_start(&simd_timer); for (int n = 0; n < kNumTests; ++n) { - quant_(coeff_ptr, n_coeffs, zbin, round_fp, quant_fp, quant_shift, qcoeff, - dqcoeff, dequant, eob, sc->scan, sc->iscan, log_scale); + quant_(0, coeff_ptr, n_coeffs, zbin, round_fp, quant_fp, quant_shift, + qcoeff, dqcoeff, dequant, eob, sc->scan, sc->iscan, log_scale); } avm_usec_timer_mark(&simd_timer); From 62e2beed9f3d0c7fad8eeaa797c812c13f0a7ad4 Mon Sep 17 00:00:00 2001 From: Ranjit Kumar Tulabandu Date: Wed, 22 Jul 2026 13:12:36 +0530 Subject: [PATCH 24/51] Add a speed feature to improve intra mode pruning A speed feature is added to prune intra modes more by updating top_intra_model_rd[] with model RD cost of DIP modes and also prune DIP modes using the same. This also improves the possibility of pruning intra modes evaluated subsequently. The speed feature aids intra mode pruning in mixed inter intra regions of inter frames. STATS_CHANGED --- av2/encoder/intra_mode_search.c | 51 ++++++++++++++++++++++++++++----- av2/encoder/speed_features.c | 3 ++ av2/encoder/speed_features.h | 7 +++++ 3 files changed, 54 insertions(+), 7 deletions(-) diff --git a/av2/encoder/intra_mode_search.c b/av2/encoder/intra_mode_search.c index 1b39b84885..04b8b85ad6 100644 --- a/av2/encoder/intra_mode_search.c +++ b/av2/encoder/intra_mode_search.c @@ -1004,6 +1004,39 @@ static AVM_INLINE int intra_block_yrd(const AV2_COMP *const cpi, MACROBLOCK *x, return 0; } +/*!\brief Prune a DIP mode candidate based on model RD cost. + * + * \ingroup intra_mode_search + * \callergraph + * This function estimates the model RD cost for the current DIP mode and + * prunes it if it falls outside the top N model RD candidates. Pruning is + * skipped when the speed feature is disabled or when the block is lossless + * with DPCM enabled. + * + * \param[in] cpi Top-level encoder structure. + * \param[in] x Pointer to macroblock structure. + * \param[in,out] top_intra_model_rd Top intra model RD cost array. + * \param[in,out] best_model_rd Best model RD cost seen so far. + * \param[in] bsize Block size. + * \param[in] mode_cost Mode signaling cost. + * + * \return 1 if the mode should be pruned, 0 otherwise. + */ +static INLINE int prune_intra_dip_mode(const AV2_COMP *cpi, MACROBLOCK *x, + int64_t top_intra_model_rd[], + int64_t *best_model_rd, BLOCK_SIZE bsize, + int mode_cost) { + if (!cpi->sf.intra_sf.include_dip_for_top_n_model_rd_pruning) return 0; + + const MACROBLOCKD *xd = &x->e_mbd; + const MB_MODE_INFO *const mbmi = xd->mi[0]; + const int64_t this_model_rd = intra_model_yrd(cpi, x, bsize, mode_cost); + if (prune_intra_y_mode(this_model_rd, best_model_rd, top_intra_model_rd) && + (!xd->lossless[mbmi->segment_id] || mbmi->use_dpcm_y == 0)) + return 1; + return 0; +} + /*!\brief Search for the best data-driven intra mode when coding inter frame. * * \ingroup intra_mode_search @@ -1012,12 +1045,11 @@ static AVM_INLINE int intra_block_yrd(const AV2_COMP *const cpi, MACROBLOCK *x, * * Returns nothing, but updates the mbmi and rd_stats. */ -static INLINE void handle_intra_dip_mode(const AV2_COMP *cpi, MACROBLOCK *x, - BLOCK_SIZE bsize, - const PICK_MODE_CONTEXT *ctx, - RD_STATS *rd_stats_y, int mode_cost, - int64_t best_rd, - int64_t best_rd_so_far) { +static INLINE void handle_intra_dip_mode( + const AV2_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, + const PICK_MODE_CONTEXT *ctx, RD_STATS *rd_stats_y, int mode_cost, + int64_t best_rd, int64_t best_rd_so_far, int64_t *best_model_rd, + int64_t top_intra_model_rd[]) { MACROBLOCKD *const xd = &x->e_mbd; MB_MODE_INFO *const mbmi = xd->mi[0]; assert(mbmi->mode == DC_PRED && @@ -1049,6 +1081,11 @@ static INLINE void handle_intra_dip_mode(const AV2_COMP *cpi, MACROBLOCK *x, int mode = (transpose << 4) + ml_mode; mbmi->intra_dip_mode = mode; + if (prune_intra_dip_mode(cpi, x, top_intra_model_rd, best_model_rd, bsize, + mode_cost)) { + continue; + } + av2_pick_uniform_tx_size_type_yrd(cpi, x, &rd_stats_y_iml, bsize, best_rd); @@ -1225,7 +1262,7 @@ int64_t av2_handle_intra_mode(IntraModeSearchState *intra_search_state, } if (try_intra_dip) { handle_intra_dip_mode(cpi, x, bsize, ctx, rd_stats_y, mode_cost, best_rd, - best_rd_so_far); + best_rd_so_far, best_model_rd, top_intra_model_rd); } } diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 9b17e14e5f..54621bb199 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -348,6 +348,8 @@ static void set_good_speed_features_framesize_independent( sf->inter_sf.prune_interintra_by_ref_idx = 1; sf->inter_sf.prune_warp_delta_by_ref_idx = 1; + sf->intra_sf.include_dip_for_top_n_model_rd_pruning = true; + sf->tx_sf.adaptive_tx_type_search_idx = 4; sf->tx_sf.adaptive_tx_partition_type_search_idx = 4; sf->tx_sf.prune_intra_ist_stx_by_zero_eob = true; @@ -801,6 +803,7 @@ static AVM_INLINE void init_intra_sf(INTRA_MODE_SPEED_FEATURES *intra_sf) { intra_sf->src_var_thresh_intra_skip = 1; intra_sf->prune_palette_search_level = 0; intra_sf->reuse_uv_mode_rd_info = false; + intra_sf->include_dip_for_top_n_model_rd_pruning = false; intra_sf->skip_intra_dip_search = false; for (int i = 0; i < TX_SIZES; i++) { diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 019e11017a..31f2c6c440 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -795,6 +795,13 @@ typedef struct INTRA_MODE_SPEED_FEATURES { // False: No reuse // True: Reuse UV mode RD info. bool reuse_uv_mode_rd_info; + + // Use model RD cost of DIP modes to build top N model RD cost table for + // better pruning. This logic is applied to mixed inter intra regions. + // False: Do not use model RD cost of DIP modes + // True: Use model RD cost of DIP modes + bool include_dip_for_top_n_model_rd_pruning; + bool skip_intra_dip_search; } INTRA_MODE_SPEED_FEATURES; From 0bd432fb3051a50aac9e9973d6abb733e87559cb Mon Sep 17 00:00:00 2001 From: motongxu Date: Thu, 23 Jul 2026 16:27:43 -0700 Subject: [PATCH 25/51] Enable skip tx search when max_eob<512 (#5144) Skip remaining tx type search for small blocks when best eob is 0. Anchor: https://github.com/AOMediaCodec/avm/commit/6e71b0c85924e61d9403b6222921cd4bb8cf870e Tests: cpu-used =1, RA A1 - 17 frames A2 - 33 frames ``` +---------+--------+--------+--------+--------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+--------+--------+--------+--------+----------+----------+ | A1 | 0.09% | 0.20% | 0.04% | 0.09% | 96.9% | 99.0% | | A2 | -0.02% | 0.04% | -0.49% | -0.04% | 97.0% | 100.0% | +---------+--------+--------+--------+--------+----------+----------+ ``` --- av2/encoder/speed_features.c | 6 ++++++ av2/encoder/speed_features.h | 4 ++++ av2/encoder/tx_search.c | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 54621bb199..77d22fee8a 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -382,6 +382,10 @@ static void set_good_speed_features_framesize_independent( // nearest searched result beyond the cap. sf->mv_sf.newmv_drl_search_limit = 2; + sf->tx_sf.tx_type_search.skip_tx_search = 1; + sf->tx_sf.tx_type_search.eob_adapt_skip_tx_search = true; + sf->tx_sf.tx_type_search.skip_tx_search_max_eob = 256; + sf->tx_sf.enable_adaptive_tcq_threshold = true; sf->tx_sf.adaptive_tcq_threshold_qidx = 185; sf->inter_sf.enable_enhanced_inter_mode_cache_reuse = 1; @@ -820,6 +824,8 @@ static AVM_INLINE void init_tx_sf(TX_SPEED_FEATURES *tx_sf) { tx_sf->tx_type_search.use_reduced_intra_txset = 0; tx_sf->tx_type_search.fast_inter_tx_type_search = 0; tx_sf->tx_type_search.skip_tx_search = 0; + tx_sf->tx_type_search.eob_adapt_skip_tx_search = false; + tx_sf->tx_type_search.skip_tx_search_max_eob = 1024; tx_sf->tx_type_search.prune_tx_type_using_stats = 0; tx_sf->tx_type_search.prune_tx_type_est_rd = 0; tx_sf->tx_type_search.winner_mode_tx_type_pruning = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 31f2c6c440..7df5f118b0 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -158,6 +158,10 @@ typedef struct { // skip remaining transform type search when we found the rdcost of skip is // better than applying transform int skip_tx_search; + // adaptively enable skip tx search based on block size + bool eob_adapt_skip_tx_search; + // Maximum block size used for skip tx search + int skip_tx_search_max_eob; // Prune tx type search using previous frame stats. int prune_tx_type_using_stats; diff --git a/av2/encoder/tx_search.c b/av2/encoder/tx_search.c index 08a1732393..8ba4d22809 100644 --- a/av2/encoder/tx_search.c +++ b/av2/encoder/tx_search.c @@ -2678,7 +2678,9 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // Terminate transform type search if the block has been quantized to // all zero. - if (tx_sf->tx_type_search.skip_tx_search && !best_eob) { + if (tx_sf->tx_type_search.skip_tx_search && !best_eob && + (!cpi->sf.tx_sf.tx_type_search.eob_adapt_skip_tx_search || + max_eob <= cpi->sf.tx_sf.tx_type_search.skip_tx_search_max_eob)) { skip_idx = true; break; } From 5affb673f9ebe11fc01492076cfdb981d2bc6755 Mon Sep 17 00:00:00 2001 From: Lin Zheng Date: Wed, 22 Jul 2026 19:42:49 +0000 Subject: [PATCH 26/51] Encoder speedup for pruning partitions 1) Add early termination after split; 2) Remove qp restriction for resolution <= 720p in av2_ml_part_split_infer(). Both changes can affect all speeds >= speed 1. Here are the breakdown for the changes: Anchor: commit 6e71b0c8 Overall performances: Speed 1 (cpu-used=1): FG16 CTC (33 frames, RA) class psnr-y psnr-u psnr-v psnr-yuv Enctime A1 +0.00% +0.09% +0.09% +0.01% 99.10% A2 +0.00% +0.19% +0.29% +0.02% 98.51% A3 +0.06% -0.32% +0.31% +0.06% 95.58% A4 -0.15% +0.83% +2.96% -0.00% 93.29% A5 +0.04% +0.03% -1.62% -0.05% 93.38% B1 +0.04% +0.21% +0.22% +0.05% 97.61% Avg w/o B2 +0.00% +0.16% +0.40% +0.02% 97.04% Speed 4 (cpu-used=4): FG16 CTC (33 frames, RA) psnr-y psnr-u psnr-v psnr-yuv Enctime Avg w/o B2 +0.02% +0.52% +0.07% +0.04% 96.28% STATS_CHANGED --- av2/encoder/partition_ml.c | 6 +- av2/encoder/partition_model_weights.h | 747 ++++++++++++++++++++++++++ av2/encoder/partition_search.c | 32 ++ av2/encoder/partition_search.h | 9 + av2/encoder/partition_strategy.c | 143 +++++ av2/encoder/speed_features.c | 7 + av2/encoder/speed_features.h | 1 + 7 files changed, 943 insertions(+), 2 deletions(-) diff --git a/av2/encoder/partition_ml.c b/av2/encoder/partition_ml.c index 905f8498b7..82881f1b3b 100644 --- a/av2/encoder/partition_ml.c +++ b/av2/encoder/partition_ml.c @@ -660,8 +660,10 @@ int av2_ml_part_split_infer(AV2_COMP *const cpi, MACROBLOCK *x, int mi_row, for (int mi = 0; mi < num_models; mi++) { MODEL_TYPE model_type = model_types[mi]; struct ModelParams params = model_params[mi]; - bool model_disabled = - qp > (params.qp_high + qp_offset) || qp < (params.qp_low + qp_offset); + bool model_disabled = (cpi->sf.part_sf.remove_qp_restriction_with_ml + ? 0 + : (qp > (params.qp_high + qp_offset) || + qp < (params.qp_low + qp_offset))); model_disabled |= get_model_part_type(model_type) == PT_NONE && !cpi->sf.part_sf.prune_none_with_ml; if (model_disabled) continue; diff --git a/av2/encoder/partition_model_weights.h b/av2/encoder/partition_model_weights.h index 64430094ee..7aa9a1138e 100644 --- a/av2/encoder/partition_model_weights.h +++ b/av2/encoder/partition_model_weights.h @@ -2725,6 +2725,753 @@ static const float av2_simple_motion_search_term_none_model_16[] = { -0.5396254205f, }; +#define FEATURES 31 +#define HIDDEN_NODES 32 +static const float av2_early_term_after_split_nn_weights_64_layer0[] = { + -0.306296f, -0.691664f, 0.335148f, -0.298465f, -0.509241f, -0.632796f, + -0.527979f, -0.009904f, -0.503646f, -0.494002f, -0.575101f, 0.239911f, + -0.413312f, -0.622825f, -0.405448f, -0.419103f, -0.505903f, -0.392550f, + -0.240293f, 0.121749f, -0.489777f, -0.756647f, 0.001047f, -0.016528f, + 0.145714f, 0.172910f, 0.086197f, 0.162882f, -0.070588f, -0.077104f, + 0.502730f, -0.244954f, 0.265605f, -0.323994f, 0.223397f, -1.086453f, + 0.391886f, 0.200343f, 0.253878f, 0.018925f, 0.201819f, -0.205136f, + 0.427314f, 0.041155f, 0.070484f, 0.159925f, -0.057095f, -0.146544f, + -0.073792f, 0.152628f, 0.003986f, -0.515965f, -0.209754f, 0.037457f, + 0.070622f, -0.143571f, -0.059602f, 0.111734f, 0.319674f, 0.149894f, + -0.219883f, 0.206678f, 0.015809f, -0.210549f, 0.130156f, -0.189502f, + -0.850392f, -0.156363f, -0.060354f, 0.189044f, 0.266495f, 0.151305f, + -0.563677f, -0.354896f, 0.300637f, 0.257568f, -0.008359f, -0.535497f, + -0.003127f, 0.293054f, -0.020212f, -0.157278f, 0.229972f, -0.309799f, + -0.329927f, -0.077140f, 0.001177f, -0.024415f, 0.134044f, -0.181587f, + -0.135380f, 0.230989f, -0.281451f, 0.912282f, 0.511562f, -3.900779f, + -0.039917f, 1.956406f, -0.357589f, 0.292998f, -0.950158f, 0.422041f, + 0.526572f, 0.605746f, -0.147110f, 0.256576f, 0.090010f, 0.221641f, + 0.029763f, 0.351592f, 0.458324f, -0.005888f, 0.010521f, -0.389326f, + -0.094006f, -0.171489f, -0.013153f, 0.026333f, -0.454571f, -1.932891f, + -0.168211f, 0.051298f, -0.258061f, -0.028936f, -0.555937f, -0.475566f, + -0.304046f, -0.318113f, 0.099697f, -0.217145f, 0.139433f, -0.203986f, + -0.164012f, 0.051527f, 0.138603f, -0.085100f, -0.082887f, -0.242955f, + -0.663410f, -0.535772f, -0.181665f, -0.197883f, 0.071319f, 0.135086f, + 0.146200f, 0.184827f, -0.199041f, 0.162570f, -0.300167f, 0.017748f, + -0.140111f, 0.103553f, 0.206929f, 0.193446f, 0.123141f, -1.201898f, + -0.052254f, -0.750121f, 0.111741f, 0.204092f, -0.166266f, 0.124008f, + -0.455496f, 0.306035f, 0.275903f, 0.193599f, -0.730011f, 0.126808f, + 0.051059f, 0.103634f, -0.044334f, 0.048889f, 0.405228f, 0.574099f, + 0.061167f, 0.260576f, 0.070032f, -0.038040f, 0.229183f, -0.243269f, + -0.130116f, -0.538563f, -0.070199f, -0.129249f, -0.205153f, -0.268530f, + -0.290828f, -0.233006f, 0.068712f, 0.618085f, -0.407008f, 0.686868f, + 0.172247f, 0.826287f, -0.002672f, 0.239825f, -0.051548f, 0.420773f, + 0.218747f, 0.041057f, -0.071189f, 0.286987f, -0.113915f, 0.122561f, + 0.013979f, -0.049046f, 0.148175f, 0.031313f, -0.248601f, 0.209488f, + 0.069008f, 0.072763f, 0.332475f, 0.079986f, -0.151042f, -0.205110f, + -0.155550f, -0.510408f, 0.330429f, 0.577729f, 0.266524f, -0.378489f, + 0.228204f, 0.055318f, 0.117583f, -0.588557f, -0.778201f, 0.434622f, + -0.227820f, 0.611642f, 0.170548f, 0.817761f, 0.006642f, -1.005794f, + -0.911490f, 1.633684f, -0.290664f, 0.308128f, 0.295986f, 0.243377f, + -0.001275f, -0.131156f, 0.275205f, -0.041865f, -0.201951f, -0.016380f, + 0.336604f, -0.258118f, 0.890810f, 0.441065f, -0.968006f, 0.135989f, + -1.447191f, 0.353426f, -0.343235f, 0.376837f, -0.071602f, -0.319639f, + -0.072347f, 0.547450f, -0.215380f, 0.182141f, -0.066186f, 0.033787f, + 0.257482f, 0.217428f, -0.130249f, 0.057525f, 0.263991f, 0.230664f, + -0.245113f, 0.048610f, -0.079955f, 0.251737f, -0.070368f, -0.017968f, + -0.151815f, 0.025945f, -0.257769f, 0.299735f, 0.077263f, -0.565526f, + 0.326263f, 0.096429f, 0.113414f, 0.092754f, -0.141908f, 0.172060f, + 0.393117f, -0.216755f, 0.331051f, -0.363369f, -0.113363f, -0.095164f, + -0.072784f, 0.214572f, 0.010993f, 0.209456f, 0.260381f, -0.314747f, + -0.422173f, -0.189963f, -0.225130f, 0.339448f, 0.153814f, 0.265616f, + -0.103575f, -0.123841f, -0.106236f, 0.155894f, -0.156264f, -1.361406f, + -0.040736f, -0.614998f, -0.468200f, -0.266505f, -0.342786f, -0.908088f, + 0.105758f, 0.040788f, -0.313589f, -1.359318f, 0.071329f, 0.176404f, + -0.476141f, 0.010108f, -0.201440f, -0.221167f, -0.197448f, -0.013927f, + -0.610270f, -0.607285f, 0.178070f, 0.174320f, 0.313115f, 0.026191f, + -0.112330f, 0.122338f, -0.367751f, 0.196794f, 0.153709f, -0.205454f, + -0.397471f, -1.879336f, -0.030129f, 0.143429f, -0.079832f, 0.435259f, + -1.729539f, 0.518301f, -0.141393f, 0.199399f, -1.914601f, 0.142865f, + -0.219899f, 0.508458f, 0.086365f, -0.220740f, -0.012507f, 1.263320f, + 0.042136f, 0.050922f, -0.329644f, -0.188198f, 0.251522f, 0.394731f, + -0.047866f, -0.260853f, -0.267207f, -0.248489f, 0.146474f, 0.359257f, + -0.427732f, -0.100652f, 0.192129f, 0.075572f, 0.916708f, 0.255747f, + 0.486384f, 0.127989f, -0.556449f, -0.484913f, 0.392298f, 0.045401f, + -0.839551f, -0.703619f, 0.069263f, -0.040720f, 0.542265f, 0.443739f, + 0.862552f, -0.021726f, 0.230858f, -0.261004f, -0.125697f, -0.106435f, + 0.002341f, 0.013904f, 0.011034f, 0.542296f, -0.284325f, 0.135736f, + 0.113882f, 0.040610f, -0.255485f, 0.224061f, -0.087140f, 0.127872f, + -0.002638f, 0.164889f, -0.335958f, -0.031166f, -0.393581f, 0.075455f, + 0.055995f, 0.087934f, -0.133859f, -0.342187f, 0.002492f, -0.340722f, + 0.058304f, 0.104165f, -0.142136f, -0.351111f, -0.158037f, -0.079924f, + -0.253209f, -0.092840f, -0.174646f, -0.202772f, -0.353438f, -0.031111f, + 0.076088f, -0.232091f, -0.070052f, 0.097595f, 0.063173f, -0.211195f, + 0.126478f, -0.178828f, 0.278723f, -0.070807f, -0.179783f, 0.034123f, + 0.035721f, -0.200431f, 0.170640f, 0.107933f, 0.226594f, -0.301499f, + -0.291096f, 0.228076f, -0.272951f, 0.002490f, -0.210707f, -0.128033f, + -0.194009f, -0.011347f, -0.256694f, -0.011841f, -0.005167f, -0.163203f, + -0.253796f, -0.198877f, -0.055827f, -0.882685f, -0.443471f, 0.349601f, + 0.749334f, -1.161845f, 0.505480f, 0.221733f, 0.210490f, -0.234984f, + 0.014183f, -0.510401f, 0.238692f, -0.134111f, 0.083844f, -0.478751f, + -0.088434f, 0.304063f, 0.150336f, -0.749682f, -0.081999f, 0.729739f, + 0.412508f, 0.132571f, 0.058306f, -0.047451f, -0.117435f, -0.445395f, + -0.005182f, -0.025757f, 0.175051f, -0.258194f, -0.150311f, -0.196533f, + -1.314316f, -0.428627f, 0.512451f, 0.045138f, -0.200925f, 0.081538f, + -0.346151f, -0.358197f, -0.422258f, -0.028542f, -0.383534f, -0.026163f, + -0.419858f, -0.154321f, 0.376970f, 0.094017f, 0.783520f, 0.110641f, + 0.077966f, -0.093064f, 0.160522f, -0.863041f, 0.086210f, 0.560764f, + 0.057032f, 0.159224f, 0.323068f, -0.173109f, 0.014042f, -0.126856f, + -0.128237f, -0.245273f, -0.317312f, -0.257597f, -0.181977f, 0.259485f, + -0.215834f, 0.062076f, -0.270596f, 0.271581f, -0.153486f, -0.247165f, + 0.079737f, -0.157049f, -0.027459f, -0.299397f, 0.136729f, -0.334192f, + -0.191722f, 0.145865f, -0.031324f, -0.307165f, -0.244923f, -0.228027f, + 0.063807f, 0.054965f, -0.005709f, -0.041977f, -0.276245f, 0.020003f, + 0.133323f, -0.145992f, -0.951030f, 0.414083f, -1.063323f, 0.137872f, + 0.104732f, -0.123728f, 0.542532f, 0.213654f, 0.542954f, 0.155619f, + 0.543072f, 0.399067f, 0.191402f, -0.102552f, -0.176734f, -0.136776f, + -0.012814f, -0.021298f, -0.802467f, -0.957481f, -0.238787f, -0.138482f, + 0.058331f, 0.126601f, 0.104420f, -0.148684f, 0.343218f, 0.093604f, + -0.055642f, -0.383918f, -0.045250f, -0.090480f, -0.155464f, 0.278299f, + 0.042791f, -0.029084f, -0.373861f, -0.073233f, -0.085172f, 0.186841f, + -0.070898f, -0.156415f, 0.112831f, -0.065931f, -0.353007f, 0.058453f, + -0.136982f, 0.233393f, 0.017240f, -0.018428f, 0.229104f, -0.371440f, + -0.262212f, 0.203075f, -0.263293f, 0.034413f, -0.299354f, 0.227269f, + 0.204977f, -0.118107f, -0.359832f, -0.068252f, 0.480105f, -0.214711f, + -0.614381f, 0.209048f, -0.456014f, -0.188819f, -0.220995f, -0.322104f, + -0.191457f, 0.420874f, -0.454919f, 0.023119f, 0.291700f, -0.532885f, + -0.032642f, 0.043271f, 0.133974f, 0.002399f, -0.179899f, -0.044158f, + -0.027078f, -0.350075f, 0.236766f, 0.346771f, -0.118534f, -0.421221f, + 0.019544f, 0.109349f, 0.141517f, 0.403561f, 0.409102f, 0.054555f, + -0.561751f, 0.577183f, -0.705156f, -0.231188f, -1.969772f, 0.172289f, + -0.048122f, 0.205671f, -0.667130f, -0.066870f, 0.202838f, -0.095538f, + -0.842651f, 0.254170f, 0.046256f, -0.271891f, -0.369254f, 0.492101f, + 0.001189f, -0.186525f, 0.188470f, -0.207072f, 0.030086f, -0.132904f, + 0.127001f, 0.116662f, -0.079246f, 0.227241f, -0.462178f, 0.446304f, + -1.660753f, 0.241832f, -0.288040f, 0.054663f, -0.435804f, 0.296782f, + -0.026421f, -0.115618f, 0.163416f, 0.834001f, 0.008019f, -0.014243f, + 0.524658f, 0.067894f, -0.253936f, -0.100657f, 1.285389f, -0.005952f, + 0.087134f, -0.088375f, -0.121866f, -0.171172f, 0.279463f, -0.598593f, + -0.727761f, 0.189831f, -0.822575f, -0.291141f, -0.012410f, -0.069999f, + 0.098842f, -0.218513f, 0.009494f, 0.100106f, -0.402884f, -0.299236f, + -0.345668f, -0.057739f, -0.213248f, -0.426661f, -0.360268f, -0.349860f, + -0.382177f, -0.357802f, -0.032030f, -0.110597f, -0.155442f, -0.418794f, + -0.012113f, -0.032962f, -0.450648f, 0.129060f, -0.135227f, -0.298593f, + 0.001435f, 0.278790f, -0.272945f, 0.162759f, -0.290208f, 0.058481f, + -0.490971f, 0.019630f, -0.210347f, 0.000520f, -0.340413f, 0.641562f, + 0.023104f, 0.194832f, -0.441894f, -0.253538f, -0.228332f, 0.423264f, + -1.094073f, -0.475657f, -0.238752f, 0.033910f, 0.440425f, 0.036320f, + 0.566989f, -0.065326f, -0.297939f, 0.406098f, 0.529561f, -0.113084f, + 0.141472f, -0.024462f, -0.179212f, 0.187801f, -0.235787f, -0.229624f, + 0.357791f, 0.061110f, -0.607788f, -1.713694f, -0.651041f, 1.734283f, + -0.334701f, 0.161687f, 0.010215f, 0.320708f, 0.169447f, 0.513558f, + 0.488340f, -0.619036f, -0.525441f, -1.144352f, -0.546154f, 0.669973f, + 0.327028f, -0.100539f, 0.012048f, -0.223013f, -0.239680f, 0.323035f, + 0.165950f, -0.155110f, 0.128664f, -0.157378f, -0.124490f, 0.291553f, + 0.055849f, -0.221664f, 0.077770f, -0.350658f, -0.181939f, 0.110230f, + -0.078219f, 0.007472f, -0.031620f, 0.007708f, -0.201794f, 0.017594f, + -0.027480f, 0.058884f, -0.369166f, -0.369770f, 0.181635f, -0.183318f, + -0.389184f, -0.256661f, 0.160107f, 0.037127f, -0.082573f, -0.095815f, + -0.322782f, 0.072528f, -0.348875f, 0.216247f, -0.161757f, -0.385502f, + -0.315738f, 0.020123f, -0.155609f, 0.114403f, -0.383232f, 0.629529f, + 0.066142f, 0.448392f, -0.389557f, -0.083315f, 0.829535f, -0.015531f, + -0.050728f, -0.325127f, 0.812992f, -0.196780f, 0.021060f, -0.952647f, + 0.006687f, -0.512715f, -0.066778f, 0.410067f, -0.116945f, -0.288283f, + 0.189334f, -0.083153f, 0.159980f, -0.068208f, 0.107358f, -0.154411f, + -0.068914f, 0.186816f, 0.032251f, 0.109242f, 0.134825f, 0.035101f, + -0.253175f, 0.157309f, -0.363597f, -0.138176f, -0.334141f, -0.172697f, + 0.045800f, -0.286057f, 0.173403f, -0.172444f, -0.117996f, -0.383848f, + -0.173303f, -0.258482f, -0.021404f, -0.017898f, -0.001970f, 0.003273f, + 0.056121f, 0.155046f, 0.044708f, -0.295609f, -0.211688f, -0.233229f, + -0.264980f, 0.145549f, 0.045323f, -0.027112f, 0.175638f, -0.207251f, + -0.055274f, 0.092706f, 0.086200f, -0.241340f, -0.147416f, 0.024510f, + -0.357194f, -0.181944f, -0.050104f, -0.079024f, -0.290473f, -0.169790f, + -0.277982f, -0.017781f, -0.004854f, -0.094132f, -0.348555f, 0.199291f, + -0.343989f, -0.319299f, -0.268935f, -0.021208f, 0.020938f, -0.090609f, + 0.006595f, -0.200790f, 0.171856f, -0.027766f, -0.032017f, -0.006745f, + 0.566426f, -0.096850f, 0.727633f, -0.408065f, -0.012436f, 0.005646f, + -0.305148f, -0.095075f, -0.391549f, -0.020378f, -0.236498f, -0.252773f, + -0.231385f, -0.203175f, 0.041903f, -0.373694f, 0.058239f, -0.101116f, + 0.183772f, 0.164523f, -0.099046f, -0.201272f, -0.394523f, -0.157517f, + 0.032079f, -0.381173f, -0.238496f, -0.037990f, -0.294553f, 0.141473f, + 0.100268f, -0.023806f, 0.004978f, 0.184916f, 0.142699f, -0.113240f, + -0.213364f, -0.160059f, -0.216263f, -0.406387f, -0.301140f, -0.406355f, + -0.113085f, -0.279699f, -0.267434f, 0.126263f, -0.260527f, -0.153904f, + -0.494653f, -0.355144f, 0.030549f, -0.216400f, -0.123363f, 0.189090f, + 0.219122f, 0.096677f, -0.202037f, -0.014489f, -0.137859f, -0.114184f, + -0.279423f, -0.270683f, +}; + +static const float av2_early_term_after_split_nn_bias_64_layer0[] = { + -0.491455f, 0.464538f, -0.005742f, -0.219951f, -0.073682f, 0.102027f, + 0.567071f, 0.441402f, 0.277521f, 0.314498f, -0.448199f, -0.065032f, + 0.488139f, -0.079632f, 0.000000f, 0.521555f, -0.151950f, -0.034616f, + 0.393438f, -0.072242f, -0.087343f, -0.571308f, 0.017372f, -0.126144f, + 0.372261f, -0.451537f, -0.140238f, -0.092377f, -0.074475f, -0.068879f, + -0.109614f, -0.164492f, +}; + +static const float av2_early_term_after_split_nn_weights_64_layer1[] = { + -0.373195f, -0.283141f, 0.416113f, 0.483659f, 0.230583f, 0.349197f, + -0.168582f, -0.813338f, -0.472369f, -0.173872f, 1.297845f, 0.339355f, + -0.828033f, 0.019617f, 0.118757f, -0.619360f, 0.282295f, -0.054116f, + -0.730596f, 0.068567f, -0.248707f, 0.461225f, 0.330224f, -0.287080f, + -0.458103f, 0.591852f, -0.008491f, 0.632119f, -0.007872f, 0.007869f, + -0.230698f, -0.011437f, +}; + +static const float av2_early_term_after_split_nn_bias_64_layer1[] = { + -0.55403697f, +}; + +static const NN_CONFIG av2_early_term_after_split_nnconfig_64 = { + FEATURES, + 1, + 1, + { + HIDDEN_NODES, + }, + { + av2_early_term_after_split_nn_weights_64_layer0, + av2_early_term_after_split_nn_weights_64_layer1, + }, + { + av2_early_term_after_split_nn_bias_64_layer0, + av2_early_term_after_split_nn_bias_64_layer1, + }, +}; + +static const float av2_early_term_after_split_nn_weights_32_layer0[] = { + 0.026050f, -0.226531f, 0.308107f, -0.083744f, 0.201785f, 0.098562f, + 0.147595f, -0.495771f, -0.245741f, 0.201616f, -0.272070f, -0.579545f, + -0.127261f, -0.229588f, 0.250831f, -0.176929f, -0.031689f, 0.284718f, + 0.085845f, -0.285027f, 0.012304f, 0.382402f, -0.204591f, 0.272514f, + -0.065854f, -0.054228f, -0.231174f, -0.174504f, 0.258287f, 0.195689f, + 0.242530f, 0.023528f, -0.294242f, -0.272132f, 0.460180f, -0.731281f, + -0.208103f, 0.208204f, 0.348250f, 0.016328f, 0.043707f, -0.169551f, + 0.108521f, 0.226895f, -0.020471f, 0.102443f, 0.429640f, -0.252555f, + -0.218434f, -0.163665f, 0.175531f, 0.101588f, -0.135798f, -0.158102f, + 0.142565f, 0.128277f, 0.174985f, -0.100073f, 0.113967f, 0.223682f, + -0.145576f, -0.008443f, 0.112748f, -0.037845f, 0.076954f, -0.287137f, + -0.518185f, -0.106833f, 0.175359f, 0.031408f, 0.219069f, -0.294440f, + 0.007766f, 0.067754f, -0.049168f, -0.212368f, -0.261708f, 0.309252f, + 0.220859f, -0.274852f, -0.653157f, 0.083438f, -0.265386f, 0.174429f, + -0.116931f, -0.091594f, -0.244897f, -0.089015f, 0.274453f, 0.212890f, + 0.272053f, -0.425315f, -0.107726f, 0.294444f, -0.354629f, 0.104402f, + -0.307663f, 0.558430f, 0.140334f, -0.054831f, -0.449456f, 0.058274f, + -0.033768f, -0.354117f, -0.331618f, -0.411772f, 0.232064f, -0.079297f, + -0.638571f, 0.181823f, -0.039611f, 0.206310f, -0.659157f, -0.102930f, + -0.067303f, -0.176881f, -0.001038f, 0.091835f, 0.079739f, -0.121923f, + 0.211070f, 0.362719f, -0.154915f, -0.151876f, -0.165460f, 0.023469f, + -0.251036f, 0.210014f, -0.537125f, 0.156832f, -0.216987f, 0.062975f, + -0.198462f, 0.329123f, 0.125870f, 0.225830f, 0.086377f, -0.128773f, + -0.179673f, -0.074612f, 0.456645f, 0.021905f, -0.243140f, 0.059145f, + -0.273942f, -0.277822f, 0.154556f, -0.025459f, 0.227614f, -0.313076f, + 0.044705f, -0.019017f, 0.108999f, -0.020243f, -0.016373f, 0.560270f, + -0.064818f, 0.050880f, -0.218458f, 0.825699f, -0.534056f, -0.258253f, + 0.222073f, 0.013295f, 0.477870f, -0.386727f, 0.388509f, 0.004128f, + 0.451388f, -0.175788f, 0.264093f, -0.109812f, 0.358132f, 0.500992f, + -0.446933f, -0.222397f, 0.345834f, 0.370943f, -0.233115f, -0.047005f, + -0.111335f, -0.111586f, 0.026975f, -0.052191f, -0.111800f, -0.129782f, + 0.225132f, 0.102524f, 0.544557f, -0.111674f, -0.857884f, 0.133258f, + 0.310001f, 0.043829f, 0.104143f, 0.256493f, 0.242520f, -0.342082f, + 0.421447f, 0.124227f, 0.061542f, -0.090206f, 0.316681f, 0.353452f, + -0.918408f, -0.001903f, -0.052303f, -0.004816f, -0.446393f, -0.053038f, + 0.255725f, -0.126346f, 0.034095f, -0.240276f, -0.135918f, 0.095682f, + -0.147457f, -0.338216f, -0.200426f, 0.010265f, -0.243915f, -0.231375f, + -0.323924f, -0.014353f, 0.150252f, -0.264346f, 0.205303f, -0.194610f, + -0.282527f, 0.180555f, -0.000087f, 0.027240f, -0.000903f, -0.345877f, + -0.353274f, -0.311829f, 0.172985f, -0.111748f, -0.309380f, 0.108110f, + -0.260914f, -0.164990f, 0.183625f, -0.319692f, -0.096988f, 0.094147f, + -0.047062f, -0.080978f, 0.227387f, -0.000450f, -0.220159f, -0.211448f, + -0.020885f, -0.139646f, -0.086721f, 0.067928f, -0.033084f, -0.251996f, + 0.090317f, 0.086313f, -0.228420f, -0.111356f, -0.314304f, -0.223664f, + 0.188176f, -0.002360f, -0.029491f, -0.006000f, -0.075343f, 0.173699f, + -0.272800f, -0.238507f, -0.272071f, -0.015000f, -0.215305f, -0.192943f, + -0.038595f, 0.119537f, 0.260477f, -0.168014f, -0.172751f, 0.532861f, + -0.753250f, -0.017485f, -0.115541f, -0.109291f, -1.098943f, 0.418559f, + -0.532110f, 0.359323f, -0.254786f, 0.471316f, -0.545024f, 0.291912f, + -0.836939f, 0.443427f, -0.441709f, 0.168866f, -0.140372f, 0.546607f, + -0.315465f, 0.023328f, 0.137709f, -0.083492f, -0.049986f, -0.071302f, + -0.293680f, -0.105049f, 0.315317f, 0.279569f, 0.220762f, 0.088161f, + -0.756456f, -0.074512f, 0.958318f, -0.332924f, -0.004906f, -0.629271f, + 0.212050f, 0.279123f, 0.311523f, -0.599580f, 0.516150f, 0.456952f, + 0.020255f, 0.247290f, -0.182670f, -0.335554f, 0.021203f, 0.131081f, + -0.208584f, 0.112530f, -0.198980f, 0.211583f, -0.101271f, -0.206453f, + -0.502688f, -0.294976f, -0.187019f, -0.114473f, 0.282050f, -0.165483f, + 0.094953f, -0.182578f, 0.055068f, 0.135605f, -0.266941f, -0.297556f, + 0.199181f, 0.015979f, -0.158659f, -0.226841f, 0.171306f, 0.013438f, + -0.286309f, -0.071753f, -0.170300f, -0.238188f, 0.093572f, -0.026230f, + -0.254502f, -0.297786f, -0.063480f, -0.300799f, -0.065644f, 0.074710f, + 0.248576f, -0.144425f, -0.113948f, -0.247297f, 0.276682f, 0.010963f, + -0.737786f, 0.026347f, 0.007830f, 0.753543f, 0.371904f, 0.305614f, + 0.105028f, 0.073530f, -0.119137f, 0.102352f, -0.080523f, 0.176366f, + -0.159457f, -0.339948f, 0.360131f, -0.007051f, -0.388378f, -0.101695f, + 0.663041f, -0.234486f, -0.142536f, -0.099931f, 0.041478f, 0.230425f, + 0.005743f, 0.154060f, 0.056233f, -0.080668f, -0.009754f, -0.194356f, + 0.185474f, -0.296474f, 0.192700f, 0.257767f, 0.348529f, 0.458265f, + 0.060276f, -0.130473f, 0.139889f, 0.310073f, -0.306869f, -0.272922f, + -0.259862f, 0.409207f, 0.431991f, -0.100357f, -0.050415f, -0.071830f, + -0.239665f, 0.153399f, 0.177192f, -0.611644f, -0.176114f, -0.022694f, + -0.033701f, -0.345842f, 0.015660f, 0.158931f, -0.097586f, 0.222001f, + 0.257887f, -0.171307f, -0.222607f, -0.245508f, -0.145742f, -0.096461f, + -0.010895f, 0.052815f, -0.265306f, -0.081059f, 0.219162f, -0.256084f, + -0.372676f, 0.148977f, 0.174831f, 0.086980f, 0.108518f, 0.074011f, + 0.038032f, -0.070856f, -0.109407f, 0.126174f, 0.022341f, -0.249786f, + -0.356164f, -0.202841f, -0.087437f, -0.133740f, 0.090956f, -0.017953f, + -0.028353f, 0.233621f, 0.109426f, 0.232798f, -0.104950f, -0.241798f, + -0.018995f, -0.167954f, 0.002473f, 0.060418f, -0.232717f, -0.195980f, + -0.283971f, -0.371881f, 0.219728f, 0.018072f, -0.166694f, -0.083301f, + -0.000616f, -0.212641f, -0.173158f, 0.222739f, -0.235302f, 0.237624f, + 0.222232f, -0.041235f, -0.342411f, 0.121194f, 0.211291f, -0.032237f, + -0.249401f, -0.291668f, 0.206055f, -0.148200f, 0.011824f, -0.272728f, + -0.194854f, 0.367175f, -0.257243f, 0.103433f, -0.231077f, 0.236734f, + 0.135733f, -0.362845f, 0.197147f, 0.242782f, -0.135289f, 0.123311f, + 0.259420f, -0.116278f, 0.127287f, 0.236789f, -0.097438f, 0.118073f, + 0.112796f, -0.035949f, 0.184408f, 0.200948f, -0.008859f, 0.195989f, + 0.161970f, -0.295320f, -0.330389f, 0.141034f, 0.066081f, -0.707857f, + 0.357037f, 0.149633f, 0.679877f, 0.548674f, 0.469076f, 0.194123f, + -0.209872f, -0.071764f, -0.126960f, 0.199420f, 0.327116f, -0.169053f, + -0.429156f, 0.443429f, -0.225530f, -0.130738f, -0.028351f, 0.644393f, + 0.049606f, -0.243602f, -0.409920f, 0.117028f, -0.258557f, 0.073865f, + -0.200454f, -0.139957f, -0.031314f, 0.162325f, 0.247221f, 0.071909f, + -0.336276f, 0.079922f, 0.192780f, -0.148882f, 0.133192f, -0.143177f, + -0.121327f, 0.126221f, -0.089521f, -0.181826f, 0.149923f, -0.280682f, + 0.391572f, 0.108990f, -0.445494f, -0.170787f, 0.225182f, 0.223313f, + -0.234828f, -0.071072f, -0.072673f, -0.093686f, 0.223892f, -0.049377f, + 0.057976f, 0.033558f, 0.068733f, -0.283353f, 0.217877f, 0.158093f, + -0.276761f, -0.097049f, -0.351913f, -0.383604f, 0.002863f, -0.474510f, + -0.096738f, 0.256940f, 0.234203f, -0.226667f, -0.260576f, -0.183403f, + -0.035578f, 0.141570f, 0.078764f, -0.028086f, 0.155800f, -0.251115f, + -0.286703f, -0.014739f, -0.072621f, -0.311506f, -0.048639f, 0.081621f, + 0.043057f, 0.068136f, -0.179903f, 0.143699f, -0.002571f, 0.239012f, + 0.197456f, 0.035745f, -0.311927f, 0.220320f, 0.102687f, -0.294105f, + 0.426740f, 0.209050f, 0.211907f, 0.083453f, 0.006578f, -0.143338f, + 0.003157f, 0.040295f, 0.234497f, 0.035344f, -0.163909f, 0.411115f, + 0.289453f, -0.075357f, -0.008884f, 0.469798f, -0.033304f, -0.153293f, + -0.229322f, -0.004162f, 0.113363f, 0.395381f, 0.067414f, -0.188966f, + -0.117424f, -0.166423f, 0.066839f, 0.595641f, -0.204782f, -0.451727f, + 0.198509f, -0.921583f, -0.246765f, -0.153411f, 0.046491f, 0.365906f, + 0.376710f, -0.017355f, -0.035232f, 0.138785f, -0.163918f, -0.283449f, + -0.094340f, 0.192127f, 0.154815f, 0.035787f, -0.029087f, 0.115649f, + -0.220133f, -0.452741f, 0.311667f, 0.157666f, 0.091401f, 0.236040f, + -0.168523f, 0.122176f, -0.219016f, -0.214856f, 0.172824f, -0.091810f, + 0.031520f, -0.857420f, 0.643446f, -0.017471f, 0.206082f, -0.933517f, + -0.020070f, -0.065091f, -0.117680f, -1.271870f, -0.069177f, -0.149409f, + 0.289970f, -0.889775f, -0.044741f, 0.232647f, -0.319416f, 0.073030f, + 0.278549f, 0.238782f, -0.202206f, 0.272540f, 0.201412f, 0.175574f, + -0.127971f, -0.253164f, -0.086352f, -0.005381f, 0.114714f, 0.505169f, + -0.175049f, -1.534280f, -0.320666f, -2.119298f, -0.023075f, -0.021259f, + -0.161019f, 0.344837f, 0.361958f, -0.097050f, 0.014375f, 0.267110f, + 0.341442f, -0.016688f, 0.073393f, 0.131500f, 0.246331f, 0.011059f, + 0.033597f, 0.014779f, -0.269366f, -0.504788f, 0.048651f, 0.295682f, + 0.237363f, 0.227484f, -0.235814f, -0.160530f, 0.182682f, -0.172999f, + -0.126630f, 0.168357f, -0.078729f, 0.052805f, 0.377021f, -0.004727f, + 0.230415f, -0.876673f, 0.458457f, 0.099401f, -0.019616f, 0.611982f, + -0.231508f, -0.070894f, -0.056142f, 0.548969f, -0.376599f, -0.600428f, + 0.241930f, -0.592893f, 0.189371f, 0.488651f, -0.092446f, -0.272569f, + 0.251643f, 0.315945f, -0.301468f, 0.112961f, 0.052119f, -0.066076f, + -0.082249f, 0.252805f, -0.195539f, 0.150386f, -0.865534f, 0.673447f, + 0.030177f, -0.438528f, -1.006174f, 0.575176f, -0.271656f, 0.035835f, + -1.056916f, 0.495267f, -0.092428f, -0.109511f, -0.192359f, 0.166669f, + -0.624326f, -0.000354f, -0.089075f, 0.176279f, -0.289347f, 0.021346f, + 0.020375f, 0.255282f, -0.045588f, 0.173675f, 0.100957f, -0.294373f, + 0.049303f, -0.134132f, -0.255731f, -0.025559f, -0.307463f, -0.205100f, + 0.079024f, 0.101113f, 0.135742f, -0.348869f, -0.026759f, -0.134155f, + -0.179275f, -0.054297f, -0.054948f, 0.029351f, 0.190560f, 0.102476f, + -0.025785f, 0.169442f, -0.271303f, 0.200667f, 0.099063f, 0.074767f, + -0.326533f, 0.044426f, -0.290251f, -0.082443f, -0.164482f, -0.349412f, + 0.045109f, -0.157330f, 0.165935f, 0.012672f, -0.059818f, 0.399140f, + -0.316620f, 0.386638f, -0.285399f, -0.296777f, -0.200473f, -0.144232f, + 0.251851f, -0.203768f, 0.001071f, -0.179063f, 0.248952f, -0.143029f, + 0.010423f, -0.030293f, -0.046786f, -0.196195f, -0.016845f, 0.295023f, + 0.322825f, 0.133683f, 0.017388f, 0.142467f, 0.221320f, 0.004059f, + -0.115770f, 0.143363f, 0.137972f, -0.272584f, 0.489366f, -0.091828f, + -0.014703f, 0.082332f, -0.476226f, -0.202859f, 0.356094f, -0.283049f, + 0.218086f, 0.202015f, 0.201724f, 0.012617f, 0.050720f, 0.255695f, + 0.244653f, 0.111296f, -0.151450f, -0.056210f, -0.757348f, 0.441724f, + -0.022455f, -0.244662f, 0.296205f, -0.421883f, -0.217386f, -0.254301f, + 0.409105f, -0.031309f, 0.050147f, -0.337170f, -0.106620f, -0.606455f, + 0.308024f, 0.298144f, 0.363993f, 0.704870f, -0.047292f, 0.166901f, + 0.105991f, -0.536757f, -0.424031f, -0.226034f, 0.213635f, -0.526754f, + 0.310990f, -0.116038f, 0.007775f, 0.538330f, -0.177912f, 0.445357f, + -0.290365f, 0.451169f, 0.030931f, 0.033388f, 0.209905f, -0.244492f, + -0.097792f, -0.246042f, 0.132047f, 0.032576f, 0.115516f, 0.022890f, + 0.093508f, -0.071840f, 0.362948f, -0.135245f, 0.659911f, -0.321413f, + 0.193118f, -0.795001f, -0.218311f, 0.024862f, 0.206172f, -0.832878f, + -0.255670f, 0.343402f, -0.275211f, -0.898363f, -0.025172f, 0.158565f, + 0.171347f, -0.127518f, -0.215156f, -0.159198f, 0.250355f, -0.132452f, + 0.061254f, -0.097544f, -0.223246f, 0.013183f, 0.239468f, 0.259017f, + -0.217739f, -0.032263f, 0.123755f, -0.701777f, 0.150049f, -0.555293f, + 0.062430f, -0.260304f, 0.494894f, -0.168702f, -0.134829f, -0.113989f, + 0.150092f, -0.060248f, 0.115711f, -0.277202f, 0.499811f, 0.417116f, + 0.191081f, -0.376432f, -0.321092f, 0.033992f, 0.057193f, 0.127077f, + -0.009042f, 0.014443f, 0.142808f, -0.124349f, 0.213087f, -0.381686f, + 0.129726f, -0.038396f, +}; + +static const float av2_early_term_after_split_nn_bias_32_layer0[] = { + -0.107171f, 0.060848f, -0.069480f, -0.121982f, 0.037637f, -0.291839f, + 0.102257f, -0.065889f, -0.032452f, 0.034171f, -0.073984f, -0.005236f, + 0.218820f, 0.132123f, -0.089621f, -0.067679f, 0.049368f, 0.329444f, + -0.184729f, 0.031702f, 0.009735f, -0.039964f, -0.018024f, -0.073031f, + -0.030166f, -0.191037f, -0.074862f, -0.076548f, 0.076537f, 0.216609f, + -0.078358f, -0.007740f, +}; + +static const float av2_early_term_after_split_nn_weights_32_layer1[] = { + 0.047869f, -0.231773f, -0.185663f, 0.460676f, -0.208182f, 0.590555f, + -0.622627f, 0.279377f, 0.351681f, 0.633504f, 1.069884f, 0.332449f, + -0.457703f, -0.435817f, -0.028853f, 0.327490f, -0.282469f, -0.975792f, + -0.062975f, -0.147187f, 0.348340f, -1.207116f, 0.516159f, -1.509626f, + -0.805072f, 0.522999f, 0.143671f, 0.304246f, -0.360720f, -0.612472f, + 0.260045f, -0.223243f, +}; + +static const float av2_early_term_after_split_nn_bias_32_layer1[] = { + -0.07571174f, +}; + +static const NN_CONFIG av2_early_term_after_split_nnconfig_32 = { + FEATURES, + 1, + 1, + { + HIDDEN_NODES, + }, + { + av2_early_term_after_split_nn_weights_32_layer0, + av2_early_term_after_split_nn_weights_32_layer1, + }, + { + av2_early_term_after_split_nn_bias_32_layer0, + av2_early_term_after_split_nn_bias_32_layer1, + }, +}; + +static const float av2_early_term_after_split_nn_weights_16_layer0[] = { + -0.113798f, 0.053357f, -0.037947f, -0.477171f, 0.276517f, -0.349252f, + -0.177284f, 0.189597f, 0.141744f, 0.230207f, -0.328104f, 0.074328f, + 0.247717f, 0.233533f, 0.145167f, 0.018029f, -0.398725f, -0.226199f, + -0.309724f, 0.125279f, 0.194759f, 0.025531f, 0.349714f, -0.273944f, + 0.186871f, 0.181735f, -0.520614f, -0.264076f, 0.308207f, 0.157438f, + -0.137791f, -0.054582f, 0.125879f, 0.796218f, -0.897562f, 0.885439f, + 0.381640f, 0.106625f, -2.027456f, 0.000874f, 0.179581f, 0.013287f, + -2.329439f, -0.163169f, -0.136191f, 0.320108f, -2.318779f, -0.196722f, + -0.295721f, 0.203658f, -0.182275f, 0.615941f, 0.015762f, 0.257181f, + -0.115297f, 0.295774f, -0.026144f, -0.022686f, -0.219423f, -0.042861f, + 0.207647f, -0.057791f, 0.201671f, -0.169569f, 0.291492f, -0.994991f, + 0.137473f, 0.230948f, 0.505626f, -1.065860f, 0.275225f, -0.250861f, + 0.519466f, -1.217242f, -0.087384f, 0.053441f, 0.030729f, -1.702304f, + -0.034635f, 0.010177f, -0.035422f, -0.749979f, 0.355499f, 0.408166f, + -0.086883f, 0.017203f, 0.195706f, -0.218056f, -0.029153f, 0.367335f, + -0.061732f, -0.241068f, 0.078496f, -0.370346f, -0.124223f, -0.172708f, + 0.037971f, 0.038875f, -0.282489f, -0.266323f, -0.210864f, 0.214714f, + 0.234695f, -0.045625f, 0.015357f, -0.007464f, -0.362003f, -0.113465f, + 0.145141f, 0.238470f, -0.202664f, -0.286587f, -0.347112f, 0.054501f, + -0.190290f, -0.283256f, 0.062179f, 0.041165f, -0.006935f, -0.220351f, + -0.088800f, 0.220924f, -0.200982f, 0.058493f, -0.225175f, 0.057175f, + -0.618187f, 0.761023f, -0.743774f, -0.500599f, -0.584999f, 1.545211f, + 0.123055f, -0.106848f, -0.353057f, 1.552187f, 0.174104f, 0.068060f, + -0.449859f, 1.254299f, -0.161716f, -0.060630f, -0.230721f, 0.165976f, + -0.101582f, -0.422415f, 0.110384f, -0.130098f, 0.104428f, 0.083518f, + 0.031626f, 0.083048f, 0.158877f, 0.173340f, 0.063962f, 0.427845f, + 0.663268f, 0.376996f, 0.146435f, -0.091329f, 0.443447f, 0.518432f, + -0.182777f, -0.091313f, 0.331229f, 0.532604f, -0.187001f, 0.054774f, + 0.298068f, 0.502295f, -0.362378f, 0.054283f, 0.292806f, 0.168901f, + -0.214787f, 0.025637f, 0.458009f, -0.322714f, -0.264059f, 0.140313f, + -0.102696f, -0.431208f, -0.134450f, -0.545415f, 0.253851f, -0.009061f, + -0.050681f, 0.108681f, 0.043272f, -1.073133f, 0.206410f, 0.469576f, + 0.291494f, -2.021244f, -0.001183f, -0.067542f, 0.364907f, -2.470543f, + 0.049147f, -0.018868f, 0.658500f, -2.531048f, 0.275433f, -0.034224f, + -0.171386f, 0.096369f, 0.728069f, 0.272332f, 0.222255f, -0.030426f, + 0.026994f, 0.208928f, -0.173943f, -0.227581f, -0.214798f, 0.079341f, + 0.032344f, -0.253575f, -0.044353f, -0.239265f, -0.055852f, -0.162582f, + -0.086592f, 0.066487f, 0.337353f, -0.168704f, 0.015702f, 0.022607f, + 0.286647f, 0.218106f, 0.193319f, -0.358714f, 0.030796f, 0.007646f, + -0.045617f, 0.165007f, -0.284641f, -0.291812f, 0.207544f, 0.082823f, + -0.141907f, -0.331336f, -0.052908f, 0.120716f, 0.202521f, 0.232782f, + -0.348141f, -0.017332f, 1.191126f, -0.391987f, -0.154537f, -0.206551f, + -2.378690f, 0.057918f, -0.328183f, 2.151556f, 0.238803f, 0.164880f, + -0.480039f, 1.616200f, 0.260243f, 0.083704f, -0.174461f, 1.804634f, + 0.194810f, 0.223837f, 0.550107f, -0.068171f, -0.293435f, -0.186770f, + -0.364846f, 0.127181f, 0.105556f, -0.016202f, 0.278403f, -0.344995f, + -0.009761f, -0.082555f, 0.046731f, -0.301452f, 0.604259f, 0.055895f, + 0.049862f, 0.314249f, -0.305811f, -0.112937f, 0.658787f, -0.549288f, + -0.307567f, -0.460650f, -0.840643f, 0.082576f, 0.373711f, 0.138318f, + 0.336901f, 0.284984f, -0.281400f, 0.408210f, -0.449858f, 0.461054f, + 0.227629f, -0.131705f, 0.301769f, -0.278540f, 0.189290f, -0.269041f, + 0.111350f, -0.300257f, 0.436858f, -0.265920f, -0.211938f, 0.272631f, + 0.206291f, 0.253273f, -0.229776f, -0.031112f, -0.171183f, -0.109676f, + -0.202390f, -0.068857f, 0.182125f, -0.140523f, -0.308742f, -0.045840f, + 0.256545f, -0.262405f, 0.225951f, -0.287463f, -0.189203f, -0.055552f, + -0.052448f, -0.242839f, -0.278877f, 0.140920f, -0.175755f, 0.215402f, + -0.248841f, -0.264080f, -0.178303f, 0.147777f, 0.049460f, -0.279877f, + -0.539725f, -0.004622f, 0.182874f, 0.338814f, 0.265974f, 0.249851f, + -0.141154f, 0.157228f, -0.090972f, 0.179444f, 0.305255f, 0.127788f, + 0.123270f, 0.355320f, 0.076797f, 0.263495f, 0.235965f, -0.133816f, + 0.243624f, 0.227062f, -0.213629f, 0.002075f, 0.061203f, -0.077820f, + -0.008807f, -0.247324f, -0.051464f, -0.191894f, -0.238713f, -0.389526f, + -0.274248f, 0.053950f, -0.225750f, -0.367097f, -0.122391f, 0.181212f, + -0.411824f, -0.084241f, -0.302288f, 0.077860f, -0.187443f, -0.300262f, + 0.083156f, -0.392461f, -0.332320f, -0.346474f, 0.140658f, -0.283656f, + 0.120714f, -0.056577f, -0.280968f, 0.017795f, -0.024686f, 0.073113f, + -0.346637f, 0.082567f, -0.036556f, -0.369730f, 0.081225f, -0.005211f, + 0.144886f, -0.003544f, 0.178307f, -0.366035f, -0.063887f, -0.191767f, + 0.105835f, -0.273978f, -0.266532f, -0.023984f, 0.039166f, 0.065848f, + -0.026802f, -0.268923f, 0.189659f, 0.086300f, 0.030718f, 0.216565f, + -0.130025f, -0.215687f, 0.146341f, -0.286438f, -0.394226f, -0.181509f, + -0.005612f, 0.186040f, 0.133491f, 0.032096f, -0.261609f, 0.074007f, + -0.042929f, -0.234479f, 0.189704f, 0.088395f, -0.003671f, -0.125055f, + -0.252418f, -0.086387f, 0.111197f, -0.297071f, -0.018793f, -0.031902f, + -0.333191f, -0.186279f, 0.039868f, 0.091419f, -0.264438f, -0.216150f, + -0.212550f, 0.203412f, -0.113028f, -0.197169f, -0.346771f, 0.086066f, + 0.091443f, -0.128507f, -0.007281f, -0.118389f, 0.003370f, -0.338661f, + 0.026739f, -0.063571f, -0.281567f, -0.166824f, 0.167455f, 0.216173f, + 0.199163f, 0.256314f, -0.222679f, 0.040282f, -0.154808f, -0.133943f, + -0.270163f, -0.357398f, 0.260373f, 0.176950f, -0.125162f, -0.085050f, + 0.226376f, -0.124585f, -0.324804f, 0.035536f, -0.133600f, 0.173450f, + 0.068107f, -0.337442f, 0.169629f, 0.047223f, 0.057878f, 0.055555f, + -0.317449f, -0.103768f, 0.080899f, -0.194759f, -1.137593f, 0.508999f, + 0.045372f, 1.746454f, 1.250347f, -0.342930f, -0.127821f, -0.220175f, + -0.417649f, -0.480595f, 0.071902f, 0.050231f, -0.562554f, -0.677866f, + -0.121416f, -0.247558f, -0.483876f, -0.504157f, 1.731953f, 0.572936f, + 0.047325f, 0.050619f, 0.112611f, -0.035393f, 0.052585f, -0.071076f, + -0.015798f, -0.050228f, -0.142875f, 0.189329f, 0.048833f, 0.503633f, + 0.249588f, 0.175492f, -0.137664f, -0.018533f, 0.288453f, -0.025644f, + 0.079131f, 0.195096f, -0.154039f, -0.104220f, -0.224072f, 0.095946f, + -0.208424f, 0.214745f, 0.056468f, 0.182603f, 0.341784f, -0.134664f, + -0.194050f, 0.058532f, -0.107336f, -0.087783f, -0.238795f, -0.387212f, + 0.049055f, -0.127417f, -0.299919f, -0.094371f, -0.011735f, -0.264753f, + 0.407375f, -0.462654f, -0.609488f, 0.027742f, -0.985512f, -0.109154f, + -0.423276f, 2.347960f, 0.129240f, 0.187610f, -0.057081f, 2.424892f, + 0.087666f, 0.106716f, -0.039379f, 2.764866f, 0.113309f, 0.028196f, + -0.582789f, 0.335385f, -0.538029f, -0.477337f, -0.114207f, 0.178829f, + 0.006276f, 0.123179f, 0.095101f, 0.139898f, -0.372074f, -0.111010f, + 0.136330f, 0.272900f, 0.126737f, -0.097808f, -0.363697f, 0.108665f, + -0.227749f, -0.083421f, 1.714677f, 0.451943f, 0.107931f, -0.392281f, + 1.615846f, 0.022307f, -0.247011f, 0.257703f, 1.039134f, 0.537789f, + 0.022177f, -0.271532f, 0.351350f, -0.399205f, -0.240534f, -0.315399f, + 0.026928f, -0.005618f, 0.053179f, -0.010277f, 0.000501f, 0.040896f, + -0.109160f, 0.018282f, 0.003887f, 0.199599f, 0.095349f, -0.337284f, + 0.169929f, -0.109409f, -0.166983f, 0.059908f, -0.226574f, -0.120114f, + 0.077329f, -0.333133f, -0.220936f, 0.114309f, -0.233965f, -0.281551f, + 0.042948f, 0.100940f, 0.116037f, -0.313122f, 0.215149f, -0.309057f, + -0.341052f, -0.294417f, -0.179722f, 0.010795f, 0.192053f, -0.275261f, + -0.033077f, 0.117348f, 0.090206f, 0.781573f, 0.602456f, -0.220296f, + 0.172159f, 0.758513f, 0.157910f, -0.217897f, -0.372659f, 0.031935f, + 0.791463f, 0.267195f, 0.931593f, -0.057349f, 0.405512f, -0.058512f, + -0.641663f, -0.076592f, 0.550227f, -0.024094f, 0.048218f, -0.289971f, + 0.180940f, 0.167533f, 0.052711f, -0.360726f, 0.019210f, -0.488879f, + 0.380498f, 0.151608f, -0.276895f, -0.596554f, 0.106076f, -0.245833f, + -0.048783f, 0.073823f, 0.098780f, 0.000211f, 0.113958f, -0.068964f, + -0.265533f, -0.185457f, 0.175586f, -0.163621f, -0.204919f, 0.145802f, + -0.163421f, 0.129576f, -0.153486f, -0.105573f, 0.067289f, -0.213120f, + -0.286103f, 0.249543f, -0.044970f, -0.170464f, -0.105501f, -0.094765f, + -0.050734f, -0.369468f, 0.180020f, -0.363328f, -0.151654f, -0.262550f, + -0.424503f, 0.829032f, -0.559452f, 0.506837f, 0.143823f, 0.276660f, + -1.808608f, -0.259517f, -0.053945f, 0.035676f, -1.842195f, -0.065960f, + -0.069285f, 0.462022f, -2.319453f, -0.370299f, 0.183329f, -0.146412f, + -0.563875f, 0.305068f, 0.480904f, 0.044319f, -0.016098f, 0.168516f, + 0.114874f, -0.097621f, -0.030373f, 0.177700f, 0.181591f, -0.146003f, + -0.330853f, -0.259200f, 0.779319f, -1.517524f, 0.178781f, 0.135451f, + 0.088784f, -2.076089f, 0.628717f, -0.048685f, 0.281327f, -2.341596f, + 0.422171f, 0.006135f, 0.367096f, -1.663118f, 0.365253f, -0.072884f, + -0.197620f, -0.688634f, 0.477354f, 0.395841f, -0.098505f, 0.208709f, + -0.027523f, 0.127119f, 0.106274f, 0.114424f, -0.122877f, -0.087245f, + 0.086923f, -0.527398f, -0.342062f, -0.764662f, 0.713094f, -0.626453f, + -0.081454f, -0.087683f, 0.885047f, 0.323440f, -0.018579f, -0.217166f, + 1.617984f, -0.159038f, 0.265991f, -0.390313f, 1.933182f, -0.032431f, + -0.057513f, -0.300841f, 0.461248f, -0.072147f, -0.287052f, -0.078056f, + 0.011734f, 0.044013f, 0.177174f, 0.093400f, 0.028819f, 0.193686f, + -0.224853f, 0.268321f, -0.075059f, 0.074526f, -0.015618f, 0.165615f, + -0.276780f, -0.063908f, -0.369264f, -0.171497f, -0.173624f, -0.130743f, + -0.224625f, -0.124980f, -0.104482f, 0.076864f, -0.009631f, -0.164682f, + 0.150480f, -0.111880f, -0.260425f, 0.086234f, -0.176936f, -0.136771f, + -0.168867f, -0.405626f, -0.288716f, -0.128950f, -0.207327f, 0.015581f, + -0.109061f, -0.098970f, 0.090792f, -0.109623f, 0.349851f, 0.266341f, + -0.088602f, -0.108071f, 0.082519f, 0.472650f, -1.838758f, 0.456694f, + 0.119927f, 0.461077f, -2.860022f, 0.231495f, 0.235771f, 0.256424f, + -1.938516f, -0.188202f, -0.000832f, -0.518206f, 0.194644f, 0.505510f, + 0.615657f, 0.193760f, 0.224600f, 0.265732f, -0.121553f, -0.354597f, + -0.242414f, -0.276639f, -0.057591f, 0.026369f, -0.261148f, -0.356155f, + -0.149178f, -0.353566f, -0.340835f, -0.141776f, 0.076535f, 0.221299f, + -0.108857f, -0.156514f, 0.050901f, 0.058541f, -0.077141f, 0.071515f, + -0.333283f, -0.181489f, -0.212900f, -0.224698f, -0.174693f, -0.178665f, + -0.143374f, -0.091811f, 0.165161f, 0.060156f, -0.086103f, -0.039031f, + -0.377759f, -0.370533f, 0.074431f, 0.064192f, 0.186576f, 0.447858f, + -0.082260f, -0.020268f, -0.123089f, -0.402017f, 0.080500f, 0.176286f, + 2.850013f, 0.019385f, -0.225361f, -0.235315f, 1.654694f, -0.073978f, + -0.341412f, -1.187575f, 2.815900f, -0.228063f, -0.174547f, 0.623825f, + -0.010676f, 0.157189f, 0.111879f, -0.198965f, 0.051851f, 0.158396f, + 0.045194f, 0.293531f, -0.246714f, -0.351493f, 0.026954f, 0.076233f, + 0.420367f, 0.168154f, -0.131450f, 0.134487f, -0.288851f, -0.134553f, + 0.014902f, 0.756381f, 0.277713f, 0.190080f, -0.020869f, 1.446672f, + 0.029792f, -0.025927f, 0.060640f, 0.559864f, 0.422229f, 0.198459f, + 0.036167f, 0.029432f, 0.001882f, 0.038480f, -0.160528f, -0.288855f, + -0.310886f, 0.291296f, 0.190558f, -0.182816f, -0.002252f, 0.073101f, + -0.172245f, -0.305980f, 0.112492f, -0.422839f, -0.295999f, -0.078160f, + -0.173405f, -0.032819f, 0.373774f, -0.715223f, 0.018911f, 0.131753f, + -0.237364f, -0.128499f, -0.228406f, 0.341619f, 0.343552f, -0.521581f, + -0.263790f, 0.362502f, -0.018450f, 0.054233f, 0.183068f, 0.382772f, + 0.188811f, -0.627287f, 0.040399f, -0.487338f, -0.192591f, 0.247426f, + 0.154372f, -0.483994f, +}; + +static const float av2_early_term_after_split_nn_bias_16_layer0[] = { + -0.173976f, 0.305495f, 0.250981f, -0.067127f, -0.313100f, 0.242464f, + 0.315196f, -0.056052f, -0.241227f, -0.253308f, -0.002697f, 0.003687f, + -0.124421f, -0.090383f, -0.070366f, -0.064074f, -0.056115f, 0.123313f, + -0.239698f, -0.182082f, -0.065296f, 0.021503f, -0.036787f, 0.311861f, + 0.118135f, -0.320456f, -0.110719f, 0.220692f, -0.071727f, -0.088226f, + -0.110874f, -0.111671f, +}; + +static const float av2_early_term_after_split_nn_weights_16_layer1[] = { + -0.338573f, 0.398159f, 0.314774f, -0.037448f, -0.271950f, -0.774991f, + 0.950901f, -0.225380f, -1.841906f, -0.350379f, -0.079350f, 0.383148f, + -0.183676f, -0.313132f, -0.340820f, -0.309401f, -1.050540f, -0.432267f, + -0.657195f, 0.927632f, -0.040150f, 0.578920f, 0.212301f, 0.292495f, + 0.563590f, -0.205735f, 0.195877f, 0.582122f, -0.217860f, 1.613379f, + 0.313278f, -0.555802f, +}; + +static const float av2_early_term_after_split_nn_bias_16_layer1[] = { + 0.16553f, +}; + +static const NN_CONFIG av2_early_term_after_split_nnconfig_16 = { + FEATURES, + 1, + 1, + { + HIDDEN_NODES, + }, + { + av2_early_term_after_split_nn_weights_16_layer0, + av2_early_term_after_split_nn_weights_16_layer1, + }, + { + av2_early_term_after_split_nn_bias_16_layer0, + av2_early_term_after_split_nn_bias_16_layer1, + }, +}; + +static const float av2_early_term_after_split_nn_weights_8_layer0[] = { + -0.719472f, 0.305806f, 0.855829f, 0.100094f, 0.412517f, 1.254673f, + 1.552105f, -5.890773f, -0.089957f, -0.016736f, 1.418074f, -5.393506f, + -0.028214f, 0.117758f, 1.479209f, -5.299794f, 0.171585f, -0.084182f, + -0.162105f, 0.388577f, -0.044319f, -0.025861f, 0.251782f, -0.181462f, + -0.101545f, -0.079999f, -0.033014f, -0.191627f, -0.032802f, -0.053404f, + 0.038038f, -0.119492f, 0.049104f, -0.344384f, -0.354513f, 0.036977f, + 0.017513f, -0.004025f, -0.163212f, -0.261999f, 0.146575f, 0.207541f, + 0.130365f, -0.252127f, 0.097419f, -0.231057f, -0.309421f, 0.347866f, + -0.064670f, -0.283171f, -0.244193f, -0.193323f, -0.226954f, -0.276194f, + -0.233553f, 0.156354f, -0.184009f, 0.344289f, -0.308058f, -0.205202f, + -0.325068f, 0.183820f, -0.361667f, -0.069559f, -0.121834f, -0.038357f, + -0.210043f, -0.266129f, 0.003188f, 0.074902f, -0.328843f, 0.293679f, + -0.234698f, -0.428268f, -0.308772f, -0.136538f, -0.008384f, -0.078227f, + 0.166074f, -0.262899f, 0.102114f, -0.323420f, 0.057064f, -0.203318f, + -0.397413f, -0.317324f, -0.307093f, 0.020574f, -0.188627f, 0.132529f, + 0.118992f, -0.487387f, -0.282975f, 0.573231f, -0.266071f, 0.125140f, + -0.970034f, 1.424008f, -0.487366f, -0.196415f, 3.680273f, -0.008407f, + 0.081109f, -0.187479f, 3.876021f, 0.159168f, 0.111721f, -0.337423f, + 3.901760f, 0.261268f, -0.245555f, -0.187632f, -0.324298f, 0.167234f, + 0.170986f, -0.473055f, 0.087016f, -0.003469f, 0.051035f, 0.251794f, + 0.153549f, 0.217609f, -0.326870f, -0.175511f, 0.637341f, -0.694837f, + -0.873487f, -0.186614f, -1.089884f, -0.607316f, -0.523519f, 5.256331f, + 0.071414f, 0.215265f, -0.835999f, 5.735746f, 0.300101f, 0.089626f, + -0.450261f, 5.608051f, 0.190491f, 0.110220f, -0.595360f, -0.446324f, + 0.311380f, 0.268812f, -0.339656f, -0.008708f, 0.011111f, -0.027557f, + 0.171534f, 0.000676f, 0.227232f, 0.033993f, 0.146684f, 0.094817f, + -0.175381f, -0.211927f, -0.362471f, 0.168834f, 0.264149f, -0.350538f, + -0.463249f, -0.288105f, 0.347155f, 0.183231f, -0.229732f, -0.252202f, + -0.218074f, -0.008769f, -0.156103f, 0.181233f, -0.354736f, 0.263270f, + -0.106636f, 0.081057f, 0.060634f, -0.046887f, 0.050468f, 0.071259f, + 0.221287f, 0.199071f, -0.180185f, -0.406902f, -0.239351f, -0.034957f, + 0.369140f, 0.864600f, 0.233798f, 0.423612f, -0.468918f, 0.976987f, + 0.691198f, -1.597908f, 0.102926f, 0.305546f, 0.391196f, -3.909059f, + 0.333635f, 0.311561f, 0.738886f, -4.002001f, 0.236394f, -0.233141f, + 0.263342f, 0.679898f, 0.136233f, 0.254743f, -0.367571f, 0.066412f, + 0.001606f, -0.059542f, 0.051726f, -0.347145f, -0.045501f, -0.313847f, + -0.021952f, 1.386316f, -0.579139f, -1.275844f, -0.003493f, -1.716577f, + 0.250209f, 0.192086f, 4.177055f, 0.351835f, 0.338177f, 0.140163f, + 4.099592f, 0.321866f, -0.128153f, -0.360414f, 4.350767f, 0.025943f, + -0.116740f, -0.664107f, -0.064558f, -0.039553f, -0.208186f, -0.678774f, + 0.149441f, -0.019823f, 0.012759f, 0.404442f, -0.108881f, 0.067974f, + -0.188278f, 0.136327f, 0.109927f, -0.179270f, -0.272342f, 0.018064f, + -0.304216f, -0.469470f, 0.109310f, -0.326214f, 0.061909f, -0.278997f, + -0.352329f, -0.333770f, -0.186522f, -0.328567f, -0.206211f, -0.008804f, + 0.042441f, -0.126699f, -0.420399f, -0.033842f, 0.016773f, -0.273789f, + 0.081928f, -0.191552f, -0.179533f, -0.263070f, -0.471807f, 0.062601f, + -0.232576f, 0.082955f, -0.490080f, 0.073820f, -0.090384f, 0.035781f, + -0.158880f, -0.506793f, -0.069132f, 0.047602f, -0.349640f, -0.058389f, + -0.017387f, -0.194636f, -0.457227f, -0.143105f, 0.222045f, -0.548909f, + -0.131561f, 0.247196f, -0.207923f, 0.133056f, -0.509854f, -0.193685f, + -0.181327f, -0.242442f, 0.091821f, 0.114430f, -0.375233f, -0.015254f, + -0.336632f, -0.060279f, -0.169169f, -0.429914f, -0.036563f, -0.400560f, + -0.076332f, -0.186232f, -0.268491f, 0.075561f, -0.389082f, -0.077435f, + 0.352562f, -0.020086f, -0.338181f, -0.404629f, 0.254983f, 0.150477f, + -0.265903f, 0.003341f, 0.099969f, -0.211964f, -0.129372f, -0.166366f, + 0.327712f, -0.276234f, 0.140675f, -0.433677f, -0.163050f, -0.143578f, + -0.397840f, -0.422130f, -0.293835f, -0.075362f, -0.468375f, 1.021238f, + 1.394155f, -0.922486f, -1.350222f, 2.030201f, 0.057717f, 0.227650f, + -0.193179f, 0.037224f, 0.065555f, 0.020558f, -0.059205f, -0.023690f, + -0.008718f, 0.095976f, -0.549587f, -0.321164f, -0.243728f, 1.344381f, + -1.254107f, 0.294244f, -0.154737f, -0.152597f, 0.342419f, 0.301883f, + 0.069866f, -0.327766f, 0.209323f, -0.364913f, -0.005530f, -0.558972f, + 0.057684f, -0.309357f, -0.283325f, -0.278445f, -0.420115f, -0.418457f, + -0.391481f, -0.418460f, -0.003897f, -0.023744f, -0.312330f, -0.366213f, + 0.269628f, -0.274877f, -0.189988f, -0.419555f, -0.034033f, 0.192874f, + -0.135487f, -0.326108f, -0.039019f, 0.185029f, -0.264883f, -0.563447f, + -0.163532f, -0.447652f, -0.141851f, 0.001714f, -0.193184f, 0.032609f, + -0.112883f, 0.074599f, 0.490665f, 0.434764f, 0.021652f, -0.219618f, + 0.743267f, 0.147195f, -0.303479f, -0.097674f, 0.195813f, 0.704007f, + -1.290851f, 0.119701f, 0.224065f, 0.260246f, -0.580657f, -0.096201f, + -0.333214f, -0.586689f, 0.567178f, 0.157340f, -0.043184f, 0.194358f, + -0.026506f, -0.339894f, -0.571803f, -0.234828f, 0.147054f, -0.564178f, + -0.156933f, -0.366055f, -0.691687f, -0.187501f, 0.215834f, -0.346106f, + -0.256892f, 0.110915f, -0.337464f, -0.341474f, -0.216113f, 0.249445f, + -0.070175f, -0.412141f, 0.153458f, -0.081280f, 0.164669f, -0.356396f, + -0.294971f, -0.165121f, -0.133585f, -0.071467f, 0.295147f, -0.253233f, + -0.213833f, -0.343416f, -0.474344f, -0.304000f, -0.341379f, -0.331456f, + -0.393952f, -0.508004f, -0.569518f, -0.509864f, 0.121961f, 0.011957f, + 0.000498f, -0.201969f, -0.407195f, -0.414375f, -0.295846f, 0.247492f, + 0.124249f, -0.550804f, -0.420397f, -0.123462f, 0.333292f, -0.240230f, + -0.025604f, 0.337536f, -0.295006f, -0.272614f, -0.496850f, -0.278521f, + 0.234591f, -0.052775f, -0.014052f, -0.260078f, -0.279128f, -0.036385f, + 0.008714f, -0.064018f, -0.124873f, -0.334014f, +}; + +static const float av2_early_term_after_split_nn_bias_8_layer0[] = { + 1.202379f, -0.117005f, -0.135527f, -0.262255f, -0.443658f, -0.078981f, + 0.615653f, -0.124482f, -0.227768f, -0.227014f, -0.135898f, 0.143216f, + -0.225995f, 0.370877f, -0.214821f, -0.227752f, +}; + +static const float av2_early_term_after_split_nn_weights_8_layer1[] = { + 0.376594f, 0.266703f, -0.039847f, 1.680142f, -0.879939f, 0.286806f, + -0.378223f, -0.405295f, -0.021107f, 0.039188f, 0.259308f, 0.193091f, + 0.077994f, -0.269141f, 0.011180f, -0.019262f, +}; + +static const float av2_early_term_after_split_nn_bias_8_layer1[] = { + -1.29585564f, +}; + +static const NN_CONFIG av2_early_term_after_split_nnconfig_8 = { + FEATURES, + 1, + 1, + { + 16, + }, + { + av2_early_term_after_split_nn_weights_8_layer0, + av2_early_term_after_split_nn_weights_8_layer1, + }, + { + av2_early_term_after_split_nn_bias_8_layer0, + av2_early_term_after_split_nn_bias_8_layer1, + }, +}; +#undef FEATURES +#undef HIDDEN_NODES + #ifdef __cplusplus } // extern "C" #endif diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index 00dd0293ae..5282e18315 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -3886,6 +3886,30 @@ static void none_partition_search( restore_level_banks(&x->e_mbd, level_banks); } +// Decide early termination by ml based on PARTITION_NONE and PARTITION_SPLIT +// costs. +static void av2_ml_prune_after_split(AV2_COMP *const cpi, MACROBLOCK *x, + SIMPLE_MOTION_DATA_TREE *sms_tree, + PartitionSearchState *part_search_state, + RD_STATS *best_rdc, int64_t part_none_rd, + int64_t part_split_rd) { + const AV2_COMMON *const cm = &cpi->common; + + // Early termination: using the rd costs of PARTITION_NONE and subblocks + // from PARTITION_SPLIT to determine an early breakout. + if (cpi->sf.part_sf.ml_early_term_after_part_split_level && + !frame_is_intra_only(cm) && + !part_search_state->terminate_partition_search && + part_search_state->do_rectangular_split && + (part_search_state->partition_rect_allowed[HORZ] || + part_search_state->partition_rect_allowed[VERT]) && + sms_tree) { + av2_ml_early_term_after_split( + cpi, x, sms_tree, best_rdc->rdcost, part_none_rd, part_split_rd, + part_search_state->split_rd, part_search_state); + } +} + // PARTITION_SPLIT search. static void split_partition_search( AV2_COMP *const cpi, ThreadData *td, TileDataEnc *tile_data, @@ -5813,6 +5837,14 @@ bool av2_rd_pick_partition( prune_partitions_after_split(cpi, pc_tree, &part_search_state); // Based on split result, decide if we want to further delay the search to // after rect + + if (!search_none_after_rect && !search_none_after_split && + partition_none_allowed) { + // Prune partitions based on PARTITION_NONE and PARTITION_SPLIT. + av2_ml_prune_after_split(cpi, x, sms_tree, &part_search_state, &best_rdc, + part_none_rd, part_split_rd); + } + if (search_none_after_split && pc_tree->partitioning == PARTITION_SPLIT) { for (int idx = 0; idx < SUB_PARTITIONS_SPLIT; idx++) { const int depth = diff --git a/av2/encoder/partition_search.h b/av2/encoder/partition_search.h index 944c4dc9e7..f47eb7fecf 100644 --- a/av2/encoder/partition_search.h +++ b/av2/encoder/partition_search.h @@ -48,6 +48,15 @@ bool av2_rd_pick_partition(AV2_COMP *const cpi, ThreadData *td, int prune_rect_flags[3] #endif // CONFIG_ML_PART_SPLIT ); + +// Attempts an early termination after PARTITION_SPLIT. +void av2_ml_early_term_after_split(AV2_COMP *const cpi, MACROBLOCK *const x, + SIMPLE_MOTION_DATA_TREE *const sms_tree, + int64_t best_rd, int64_t part_none_rd, + int64_t part_split_rd, + int64_t *split_block_rd, + PartitionSearchState *part_state); + void av2_build_partition_tree_fixed_partitioning( AV2_COMMON *const cm, TREE_TYPE tree_type, int mi_row, int mi_col, BLOCK_SIZE bsize, PARTITION_TREE *ptree, const PARTITION_TREE *ptree_luma); diff --git a/av2/encoder/partition_strategy.c b/av2/encoder/partition_strategy.c index 7fd4ca27d7..62b9678f09 100644 --- a/av2/encoder/partition_strategy.c +++ b/av2/encoder/partition_strategy.c @@ -1439,6 +1439,149 @@ static AVM_INLINE int64_t clip_rate(const int rate) { return rate; } +// Get the minimum partition block width and height(in log scale) under a +// SIMPLE_MOTION_DATA_TREE. +static inline void get_min_bsize(const SIMPLE_MOTION_DATA_TREE *sms_tree, + int *min_bw, int *min_bh) { + if (!sms_tree) return; + + const BLOCK_SIZE bsize = sms_tree->block_size; + if (bsize == BLOCK_4X4) { + *min_bw = 0; + *min_bh = 0; + return; + } + + PARTITION_TYPE part_type = sms_tree->partitioning; + if (part_type == PARTITION_INVALID) return; + + if (part_type == PARTITION_SPLIT) { + for (int i = 0; i < SUB_PARTITIONS_SPLIT; ++i) { + get_min_bsize(sms_tree->split[i], min_bw, min_bh); + } + } else { + if (part_type == PARTITION_HORZ_4A || part_type == PARTITION_HORZ_4B || + part_type == PARTITION_VERT_4A || part_type == PARTITION_VERT_4B || + part_type == PARTITION_HORZ_3 || part_type == PARTITION_VERT_3) + part_type = PARTITION_SPLIT; + const BLOCK_SIZE subsize = get_partition_subsize(bsize, part_type); + if (subsize != BLOCK_INVALID) { + *min_bw = AVMMIN(*min_bw, mi_size_wide_log2[subsize]); + *min_bh = AVMMIN(*min_bh, mi_size_high_log2[subsize]); + } + } +} + +static inline void add_rd_feature(int64_t rd, int64_t best_rd, float *features, + int *feature_idx) { + const int rd_valid = rd > 0 && rd < INT64_MAX; + const float rd_ratio = rd_valid ? (float)rd / best_rd : 1.0f; + features[(*feature_idx)++] = (float)rd_valid; + features[(*feature_idx)++] = rd_ratio; +} + +#define FEATURES 31 +void av2_ml_early_term_after_split(AV2_COMP *const cpi, MACROBLOCK *const x, + SIMPLE_MOTION_DATA_TREE *const sms_tree, + int64_t best_rd, int64_t part_none_rd, + int64_t part_split_rd, + int64_t *split_block_rd, + PartitionSearchState *part_state) { + const PartitionBlkParams *blk_params = &part_state->part_blk_params; + const int mi_row = blk_params->mi_row, mi_col = blk_params->mi_col; + const BLOCK_SIZE bsize = blk_params->bsize; + + if (best_rd <= 0 || best_rd == INT64_MAX || + part_state->terminate_partition_search || bsize == BLOCK_256X256) + return; + + const AV2_COMMON *const cm = &cpi->common; + const NN_CONFIG *nn_config = NULL; + const float thresholds[5] = { 0.0035648215612127795f, 0.0014665436382494844f, + 5.110332251005399e-5f, 3.749879965048595e-5f, + 9.213190802080392e-4f }; + float thresh = -1e6; + switch (bsize) { + case BLOCK_128X128: + nn_config = &av2_early_term_after_split_nnconfig_64; + thresh = thresholds[0]; + break; + case BLOCK_64X64: + nn_config = &av2_early_term_after_split_nnconfig_64; + thresh = thresholds[1]; + break; + case BLOCK_32X32: + nn_config = &av2_early_term_after_split_nnconfig_32; + thresh = thresholds[2]; + break; + case BLOCK_16X16: + nn_config = &av2_early_term_after_split_nnconfig_16; + thresh = thresholds[3]; + break; + case BLOCK_8X8: + nn_config = &av2_early_term_after_split_nnconfig_8; + thresh = thresholds[4]; + break; + case BLOCK_4X4: break; + default: + assert(0 && "Invalid block size in av2_ml_early_term_after_split()."); + break; + } + if (!nn_config) return; + + const MACROBLOCKD *const xd = &x->e_mbd; + const int dc_q = av2_dc_quant_QTX(x->qindex, 0, + cm->seq_params.base_y_dc_delta_q, xd->bd) >> + (xd->bd - 8); + const int bs = block_size_wide[bsize]; + int f_idx = 0; + float features[FEATURES] = { 0.0f }; + + features[f_idx++] = log1pf((float)dc_q / 4.0f); + features[f_idx++] = log1pf((float)best_rd / bs / bs / 1024.0f); + + add_rd_feature(part_none_rd, best_rd, features, &f_idx); + add_rd_feature(part_split_rd, best_rd, features, &f_idx); + + for (int i = 0; i < SUB_PARTITIONS_SPLIT; ++i) { + add_rd_feature(split_block_rd[i], best_rd, features, &f_idx); + int min_bw = MAX_SB_SIZE_LOG2; + int min_bh = MAX_SB_SIZE_LOG2; + get_min_bsize(sms_tree->split[i], &min_bw, &min_bh); + features[f_idx++] = (float)min_bw; + features[f_idx++] = (float)min_bh; + } + + simple_motion_search_prune_part_features(cpi, x, sms_tree, mi_row, mi_col, + bsize, NULL, + FEATURE_SMS_PRUNE_PART_FLAG); + + features[f_idx++] = log1pf((float)sms_tree->sms_none_feat[1]); + + features[f_idx++] = log1pf((float)sms_tree->split[0]->sms_none_feat[1]); + features[f_idx++] = log1pf((float)sms_tree->split[1]->sms_none_feat[1]); + features[f_idx++] = log1pf((float)sms_tree->split[2]->sms_none_feat[1]); + features[f_idx++] = log1pf((float)sms_tree->split[3]->sms_none_feat[1]); + + features[f_idx++] = log1pf((float)sms_tree->sms_rect_feat[1]); + features[f_idx++] = log1pf((float)sms_tree->sms_rect_feat[3]); + features[f_idx++] = log1pf((float)sms_tree->sms_rect_feat[5]); + features[f_idx++] = log1pf((float)sms_tree->sms_rect_feat[7]); + + assert(f_idx == FEATURES); + + float score = 0.0f; + av2_nn_predict(features, nn_config, 1, &score); + + float thresh_score = (float)log(thresh / (1 - thresh)); + + // Score is indicator of confidence that we should NOT terminate. + if (score < thresh_score) { + part_state->terminate_partition_search = 1; + } +} +#undef FEATURES + void av2_gather_erp_rect_features( float *ml_features, AV2_COMP *cpi, MACROBLOCK *x, const TileInfo *tile_info, const PC_TREE *pc_tree, const PartitionSearchState *part_search_state, diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 77d22fee8a..bce935e009 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -702,6 +702,7 @@ static AVM_INLINE void init_part_sf(PARTITION_SPEED_FEATURES *part_sf) { part_sf->prune_none_with_ml = 0; part_sf->prune_split_ml_level = -2; // default pruning part_sf->prune_split_ml_level_inter = -1; + part_sf->remove_qp_restriction_with_ml = 0; #endif // CONFIG_ML_PART_SPLIT part_sf->disable_ext_partitions = false; part_sf->disable_uneven_4way_partitions = false; @@ -969,6 +970,11 @@ static AVM_INLINE void set_erp_speed_features_framesize_dependent( sf->part_sf.simple_motion_search_early_term_none = cm->current_frame.pyramid_level > 4 ? 1 : 0; } +#if CONFIG_ML_PART_SPLIT + if (is_720p_or_lesser) { + sf->part_sf.remove_qp_restriction_with_ml = 1; + } +#endif // CONFIG_ML_PART_SPLIT } if (cpi->speed >= 2) { @@ -1059,6 +1065,7 @@ static AVM_INLINE void set_erp_speed_features(AV2_COMP *cpi) { if (cpi->speed >= 1) { // Emulate erp_pruning_level = 6. sf->part_sf.ext_recur_depth_level = 1; + sf->part_sf.ml_early_term_after_part_split_level = 2; } if (cpi->speed >= 2) { diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 7df5f118b0..1b76aa5fed 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -440,6 +440,7 @@ typedef struct PARTITION_SPEED_FEATURES { int prune_split_ml_level; int prune_split_ml_level_inter; int prune_none_with_ml; + int remove_qp_restriction_with_ml; #endif // CONFIG_ML_PART_SPLIT bool disable_ext_partitions; From 0f5e014c3bcfc0828f678072b35c6b4d46d53df5 Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Wed, 22 Jul 2026 14:41:14 -0400 Subject: [PATCH 27/51] Add realtime(rt) flag, encoder options / config Also added unit test with rtc mode Default remains GOOD quality mode. --- apps/avmenc.c | 3 + av2/arg_defs.c | 1 + av2/arg_defs.h | 1 + av2/av2_cx_iface.c | 418 ++++++++++++++++++++++++++++-------------- av2/encoder/encoder.h | 4 +- avm/avm_encoder.h | 2 + test/rtc_test.cc | 111 +++++++++++ test/test.cmake | 1 + 8 files changed, 399 insertions(+), 142 deletions(-) create mode 100644 test/rtc_test.cc diff --git a/apps/avmenc.c b/apps/avmenc.c index 435639dcb3..18e175cb58 100644 --- a/apps/avmenc.c +++ b/apps/avmenc.c @@ -147,6 +147,7 @@ const arg_def_t *main_args[] = { &g_av2_codec_arg_defs.help, &g_av2_codec_arg_defs.skip, &g_av2_codec_arg_defs.step, &g_av2_codec_arg_defs.good_dl, + &g_av2_codec_arg_defs.rt_dl, &g_av2_codec_arg_defs.quietarg, &g_av2_codec_arg_defs.verbosearg, &g_av2_codec_arg_defs.psnrarg, @@ -702,6 +703,8 @@ static void parse_global_config(struct AvxEncoderConfig *global, char ***argv) { global->usage = arg_parse_uint(&arg); } else if (arg_match(&arg, &g_av2_codec_arg_defs.good_dl, argi)) { global->usage = AVM_USAGE_GOOD_QUALITY; // Good quality usage + } else if (arg_match(&arg, &g_av2_codec_arg_defs.rt_dl, argi)) { + global->usage = AVM_USAGE_REALTIME; // REALTIME usage } else if (arg_match(&arg, &g_av2_codec_arg_defs.use_yv12, argi)) { global->color_type = YV12; } else if (arg_match(&arg, &g_av2_codec_arg_defs.use_i420, argi)) { diff --git a/av2/arg_defs.c b/av2/arg_defs.c index 0a41c53c34..2994236293 100644 --- a/av2/arg_defs.c +++ b/av2/arg_defs.c @@ -177,6 +177,7 @@ const av2_codec_arg_definitions_t g_av2_codec_arg_defs = { .step = ARG_DEF(NULL, "step", 1, "Encode every n-th frame (after the --skip frames)"), .good_dl = ARG_DEF(NULL, "good", 0, "Use Good Quality Deadline"), + .rt_dl = ARG_DEF(NULL, "rt", 0, "Use Realtime Quality Deadline"), .quietarg = ARG_DEF("q", "quiet", 0, "Do not print encode progress"), .verbosearg = ARG_DEF("v", "verbose", 0, "Show encoder parameters"), .psnrarg = ARG_DEF( diff --git a/av2/arg_defs.h b/av2/arg_defs.h index 7fe25641bc..b79087dc5a 100644 --- a/av2/arg_defs.h +++ b/av2/arg_defs.h @@ -50,6 +50,7 @@ typedef struct av2_codec_arg_definitions { arg_def_t skip; arg_def_t step; arg_def_t good_dl; + arg_def_t rt_dl; arg_def_t quietarg; arg_def_t verbosearg; arg_def_t psnrarg; diff --git a/av2/av2_cx_iface.c b/av2/av2_cx_iface.c index 86283a57e5..ee57e70316 100644 --- a/av2/av2_cx_iface.c +++ b/av2/av2_cx_iface.c @@ -1238,7 +1238,10 @@ static avm_codec_err_t set_encoder_config(AV2EncoderConfig *oxcf, const int is_vbr = cfg->rc_end_usage == AVM_VBR; oxcf->profile = cfg->g_profile; oxcf->max_threads = (int)cfg->g_threads; - oxcf->mode = GOOD; + switch (cfg->g_usage) { + case AVM_USAGE_REALTIME: oxcf->mode = REALTIME; break; + default: oxcf->mode = GOOD; break; + } // Set frame-dimension related configuration. frm_dim_cfg->width = cfg->g_w; @@ -3206,10 +3209,6 @@ static avm_codec_err_t encoder_encode(avm_codec_alg_priv_t *ctx, } } } - if (ctx->oxcf.mode != GOOD) { - ctx->oxcf.mode = GOOD; - av2_change_config(ctx->cpi, &ctx->oxcf); - } avm_codec_pkt_list_init(&ctx->pkt_list); @@ -4741,141 +4740,278 @@ static avm_codec_ctrl_fn_map_t encoder_ctrl_maps[] = { CTRL_MAP_END, }; -static const avm_codec_enc_cfg_t encoder_usage_cfg[] = { { - // NOLINT - AVM_USAGE_GOOD_QUALITY, // g_usage - non-realtime usage - 0, // g_threads - 0, // g_profile - - 320, // g_w - 240, // g_h - 0, // g_limit - 0, // g_forced_max_frame_width - 0, // g_forced_max_frame_height - AVM_BITS_8, // g_bit_depth - 8, // g_input_bit_depth - - { 1, 30 }, // g_timebase - - 0, // g_error_resilient - - AVM_RC_ONE_PASS, // g_pass - - 19, // g_lag_in_frames - - 0, // rc_dropframe_thresh - RESIZE_NONE, // rc_resize_mode - SCALE_NUMERATOR, // rc_resize_denominator - SCALE_NUMERATOR, // rc_resize_kf_denominator - - AVM_VBR, // rc_end_usage - { NULL, 0 }, // rc_firstpass_mb_stats_in - 256, // rc_target_bandwidth - 0, // rc_min_quantizer - 255, // rc_max_quantizer - 25, // rc_undershoot_pct - 25, // rc_overshoot_pct - - 6000, // rc_max_buffer_size - 4000, // rc_buffer_initial_size - 5000, // rc_buffer_optimal_size - - 0, // rc_two_pass_vbrmin_section - 2000, // rc_two_pass_vbrmax_section - - // keyframing settings (kf) - 0, // fwd_kf_enabled - AVM_KF_AUTO, // kf_mode - 0, // kf_min_dist - 9999, // kf_max_dist - 0, // enable_sframe - 0, // sframe_dist - 1, // sframe_mode - 0, // sframe_type - 0, // monochrome - 0, // full_still_picture_hdr - 1, // enable_tcq - 0, // enable_lcr - 0, // enable_ops - 1, // num_ops - 0, // enable_atlas - 0, // tile_width_count - 0, // tile_height_count - { 0 }, // tile_widths - { 0 }, // tile_heights - 0, // use_fixed_qp_offsets - { -1, -1, -1, -1, -1, -1 }, // fixed_qp_offsets - 0, // frame_hash_metadata; - 0, // frame_hash_per_plane; - 0, // use_short_metadata; - { - 0, // init_by_cfg_file - 128, // superblock_size - 128, // max_partition_size - 4, // min_partition_size - 1, // enable_rect_partitions - 1, // enable_uneven_4way_partitions - 1, // disable_ml_partition_speed_features - 5, // erp_pruning_level - 0, // use_ml_erp_pruning - 1, // enable_ext_partitions - 1, // enable_tx_partition - 8, // max_partition_aspect_ratio - 0, 1, 1, /*extended sdp*/ 1, - 1, - 1, // enable RefineMv and OPFL for TIP - 1, // MV traj - 0, // enable_high_motion - 1, 1, 1, 1, - 1, // enable idtx intra for fsc is disabled case - 1, - 1, // IST - 1, // inter IST - 0, // chroma DCT only - 1, // inter DDT - 1, // enable_cctx - 1, 1, 1, - 3, // select_cfl_ds - 1, 1, 1, 1, - 1, 1, 1, 0, - 1, 1, 1, 1, - 0, 1, 1, 1, - 1, 1, 1, 1, - 1, 1, 1, 1, - 0, 0, 1, 1, - 1, 1, 1, 1, - 1, 1, 1, - 0, // reduced_tx_part_set - 1, 1, 1, 1, - 3, 1, - 0, // reduced_ref_frame_mvs_mode - 1, // enable_reduced_reference_set - 0, // explicit_ref_frame_map - 0, // add_sef_for_hidden_frames - 0, // monotonic_output_order - 0, // reduced_tx_type_set - 0, // max_drl_refmvs - - 0, // max_drl_refbvs - 1, 1, 1, - 1, // enable_avg_cdf - 1, // avg_cdf_type - 1, - 1, // enable_short_refresh_frame_flags - 0, // enable_ext_seg - 8, // dpb_size - 0, // enable_bru - 0, // disable_loopfilters_across_tiles - 0, // enable cropping window - 0, // crop_win_left_offset - 0, // crop_win_right_offset - 0, // crop_win_top_offset - 0, // crop_win_bottom_offset - NULL, 0, 0, - 0, // enable_mfh_obu_signaling - 1, - }, // cfg -} }; +static const avm_codec_enc_cfg_t encoder_usage_cfg[] = { + { + // NOLINT + AVM_USAGE_GOOD_QUALITY, // g_usage - non-realtime usage + 0, // g_threads + 0, // g_profile + + 320, // g_w + 240, // g_h + 0, // g_limit + 0, // g_forced_max_frame_width + 0, // g_forced_max_frame_height + AVM_BITS_8, // g_bit_depth + 8, // g_input_bit_depth + + { 1, 30 }, // g_timebase + + 0, // g_error_resilient + + AVM_RC_ONE_PASS, // g_pass + + 19, // g_lag_in_frames + + 0, // rc_dropframe_thresh + RESIZE_NONE, // rc_resize_mode + SCALE_NUMERATOR, // rc_resize_denominator + SCALE_NUMERATOR, // rc_resize_kf_denominator + + AVM_VBR, // rc_end_usage + { NULL, 0 }, // rc_firstpass_mb_stats_in + 256, // rc_target_bandwidth + 0, // rc_min_quantizer + 255, // rc_max_quantizer + 25, // rc_undershoot_pct + 25, // rc_overshoot_pct + + 6000, // rc_max_buffer_size + 4000, // rc_buffer_initial_size + 5000, // rc_buffer_optimal_size + + 0, // rc_two_pass_vbrmin_section + 2000, // rc_two_pass_vbrmax_section + + // keyframing settings (kf) + 0, // fwd_kf_enabled + AVM_KF_AUTO, // kf_mode + 0, // kf_min_dist + 9999, // kf_max_dist + 0, // enable_sframe + 0, // sframe_dist + 1, // sframe_mode + 0, // sframe_type + 0, // monochrome + 0, // full_still_picture_hdr + 1, // enable_tcq + 0, // enable_lcr + 0, // enable_ops + 1, // num_ops + 0, // enable_atlas + 0, // tile_width_count + 0, // tile_height_count + { 0 }, // tile_widths + { 0 }, // tile_heights + 0, // use_fixed_qp_offsets + { -1, -1, -1, -1, -1, -1 }, // fixed_qp_offsets + 0, // frame_hash_metadata; + 0, // frame_hash_per_plane; + 0, // use_short_metadata; + { + 0, // init_by_cfg_file + 128, // superblock_size + 128, // max_partition_size + 4, // min_partition_size + 1, // enable_rect_partitions + 1, // enable_uneven_4way_partitions + 1, // disable_ml_partition_speed_features + 5, // erp_pruning_level + 0, // use_ml_erp_pruning + 1, // enable_ext_partitions + 1, // enable_tx_partition + 8, // max_partition_aspect_ratio + 0, 1, 1, /*extended sdp*/ 1, + 1, + 1, // enable RefineMv and OPFL for TIP + 1, // MV traj + 0, // enable_high_motion + 1, 1, 1, 1, + 1, // enable idtx intra for fsc is disabled case + 1, + 1, // IST + 1, // inter IST + 0, // chroma DCT only + 1, // inter DDT + 1, // enable_cctx + 1, 1, 1, + 3, // select_cfl_ds + 1, 1, 1, 1, + 1, 1, 1, 0, + 1, 1, 1, 1, + 0, 1, 1, 1, + 1, 1, 1, 1, + 1, 1, 1, 1, + 0, 0, 1, 1, + 1, 1, 1, 1, + 1, 1, 1, + 0, // reduced_tx_part_set + 1, 1, 1, 1, + 3, 1, + 0, // reduced_ref_frame_mvs_mode + 1, // enable_reduced_reference_set + 0, // explicit_ref_frame_map + 0, // add_sef_for_hidden_frames + 0, // monotonic_output_order + 0, // reduced_tx_type_set + 0, // max_drl_refmvs + + 0, // max_drl_refbvs + 1, 1, 1, + 1, // enable_avg_cdf + 1, // avg_cdf_type + 1, + 1, // enable_short_refresh_frame_flags + 0, // enable_ext_seg + 8, // dpb_size + 0, // enable_bru + 0, // disable_loopfilters_across_tiles + 0, // enable cropping window + 0, // crop_win_left_offset + 0, // crop_win_right_offset + 0, // crop_win_top_offset + 0, // crop_win_bottom_offset + NULL, 0, 0, + 0, // enable_mfh_obu_signaling + 1, + }, // cfg + }, + { + // NOLINT + AVM_USAGE_REALTIME, // g_usage - realtime usage + 0, // g_threads + 0, // g_profile + + 320, // g_w + 240, // g_h + 0, // g_limit + 0, // g_forced_max_frame_width + 0, // g_forced_max_frame_height + AVM_BITS_8, // g_bit_depth + 8, // g_input_bit_depth + + { 1, 30 }, // g_timebase + + 0, // g_error_resilient + + AVM_RC_ONE_PASS, // g_pass + + 0, // g_lag_in_frames + + 0, // rc_dropframe_thresh + RESIZE_NONE, // rc_resize_mode + SCALE_NUMERATOR, // rc_resize_denominator + SCALE_NUMERATOR, // rc_resize_kf_denominator + + AVM_VBR, // rc_end_usage + { NULL, 0 }, // rc_firstpass_mb_stats_in + 256, // rc_target_bandwidth + 0, // rc_min_quantizer + 255, // rc_max_quantizer + 25, // rc_undershoot_pct + 25, // rc_overshoot_pct + + 6000, // rc_max_buffer_size + 4000, // rc_buffer_initial_size + 5000, // rc_buffer_optimal_size + + 0, // rc_two_pass_vbrmin_section + 2000, // rc_two_pass_vbrmax_section + + // keyframing settings (kf) + 0, // fwd_kf_enabled + AVM_KF_AUTO, // kf_mode + 0, // kf_min_dist + 9999, // kf_max_dist + 0, // enable_sframe + 0, // sframe_dist + 1, // sframe_mode + 0, // sframe_type + 0, // monochrome + 0, // full_still_picture_hdr + 0, // enable_tcq + 0, // enable_lcr + 0, // enable_ops + 1, // num_ops + 0, // enable_atlas + 0, // tile_width_count + 0, // tile_height_count + { 0 }, // tile_widths + { 0 }, // tile_heights + 0, // use_fixed_qp_offsets + { -1, -1, -1, -1, -1, -1 }, // fixed_qp_offsets + 0, // frame_hash_metadata; + 0, // frame_hash_per_plane; + 0, // use_short_metadata; + { + 0, // init_by_cfg_file + 128, // superblock_size + 128, // max_partition_size + 4, // min_partition_size + 1, // enable_rect_partitions + 1, // enable_uneven_4way_partitions + 1, // disable_ml_partition_speed_features + 5, // erp_pruning_level + 0, // use_ml_erp_pruning + 1, // enable_ext_partitions + 1, // enable_tx_partition + 8, // max_partition_aspect_ratio + 0, 1, 1, /*extended sdp*/ 1, + 1, + 1, // enable RefineMv and OPFL for TIP + 1, // MV traj + 0, // enable_high_motion + 1, 1, 1, 1, + 1, // enable idtx intra for fsc is disabled case + 1, + 1, // IST + 1, // inter IST + 0, // chroma DCT only + 1, // inter DDT + 1, // enable_cctx + 1, 1, 1, + 3, // select_cfl_ds + 1, 1, 1, 1, + 1, 1, 1, 0, + 1, 1, 1, 1, + 0, 1, 1, 1, + 1, 1, 1, 1, + 1, 1, 1, 1, + 0, 0, 1, 1, + 1, 1, 1, 1, + 1, 1, 1, + 0, // reduced_tx_part_set + 1, 1, 1, 1, + 3, 1, + 0, // reduced_ref_frame_mvs_mode + 1, // enable_reduced_reference_set + 0, // explicit_ref_frame_map + 0, // add_sef_for_hidden_frames + 0, // monotonic_output_order + 0, // reduced_tx_type_set + 0, // max_drl_refmvs + + 0, // max_drl_refbvs + 1, 1, 1, + 1, // enable_avg_cdf + 1, // avg_cdf_type + 1, + 1, // enable_short_refresh_frame_flags + 0, // enable_ext_seg + 8, // dpb_size + 0, // enable_bru + 0, // disable_loopfilters_across_tiles + 0, // enable cropping window + 0, // crop_win_left_offset + 0, // crop_win_right_offset + 0, // crop_win_top_offset + 0, // crop_win_bottom_offset + NULL, 0, 0, + 0, // enable_mfh_obu_signaling + 1, + }, // cfg + }, +}; // This data structure and function are exported in avm/avmcx.h #ifndef VERSION_STRING @@ -4899,7 +5035,7 @@ avm_codec_iface_t avm_codec_av2_cx_algo = { }, { // NOLINT - 1, // 1 cfg + 2, // 2 cfg encoder_usage_cfg, // avm_codec_enc_cfg_t encoder_encode, // avm_codec_encode_fn_t encoder_get_cxdata, // avm_codec_get_cx_data_fn_t diff --git a/av2/encoder/encoder.h b/av2/encoder/encoder.h index 33f1dc87b0..6b5997c9f8 100644 --- a/av2/encoder/encoder.h +++ b/av2/encoder/encoder.h @@ -96,7 +96,9 @@ enum { enum { // Good Quality Fast Encoding. The encoder balances quality with the amount of // time it takes to encode the output. Speed setting controls how fast. - GOOD + GOOD, + // Realtime Fast Encoding. + REALTIME } UENUM1BYTE(MODE); enum { diff --git a/avm/avm_encoder.h b/avm/avm_encoder.h index 9a82ee009d..87cb9adcae 100644 --- a/avm/avm_encoder.h +++ b/avm/avm_encoder.h @@ -1324,6 +1324,8 @@ avm_fixed_buf_t *avm_codec_get_global_headers(avm_codec_ctx_t *ctx); /*!\brief usage parameter analogous to AV2 GOOD QUALITY mode. */ #define AVM_USAGE_GOOD_QUALITY (0) +/*!\brief usage parameter analogous to AV2 REALTIME mode. */ +#define AVM_USAGE_REALTIME (1) /*!\brief Encode a frame * diff --git a/test/rtc_test.cc b/test/rtc_test.cc new file mode 100644 index 0000000000..4e168f8440 --- /dev/null +++ b/test/rtc_test.cc @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2021, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ +#include "avm/avm_codec.h" +#include "third_party/googletest/src/googletest/include/gtest/gtest.h" +#include "test/codec_factory.h" +#include "test/encode_test_driver.h" +#include "test/y4m_video_source.h" +#include "test/util.h" + +namespace { +// This class is used to validate realtime encoding path. +class RtcTestLarge : public ::libavm_test::CodecTestWithParam, + public ::libavm_test::EncoderTest { + protected: + RtcTestLarge() : EncoderTest(GET_PARAM(0)), tune_content_(GET_PARAM(1)) {} + virtual ~RtcTestLarge() {} + + virtual void SetUp() { + const avm_codec_err_t res = + codec_->DefaultEncoderConfig(&cfg_, AVM_USAGE_REALTIME); + ASSERT_EQ(AVM_CODEC_OK, res); + passes_ = 1; + cfg_.g_usage = AVM_USAGE_REALTIME; + const avm_rational timebase = { 1, 30 }; + cfg_.g_timebase = timebase; + cfg_.rc_target_bitrate = 1000; + cfg_.rc_end_usage = AVM_Q; + cfg_.rc_min_quantizer = 120; + cfg_.rc_max_quantizer = 120; + cfg_.g_threads = 1; + cfg_.g_lag_in_frames = 0; + cfg_.g_profile = 0; + cfg_.g_bit_depth = AVM_BITS_8; + cfg_.enable_tcq = 0; + } + + virtual bool DoDecode() const { return true; } + + virtual void PreEncodeFrameHook(::libavm_test::VideoSource *video, + ::libavm_test::Encoder *encoder) { + if (video->frame() == 0) { + encoder->Control(AV2E_SET_TUNE_CONTENT, tune_content_); + encoder->Control(AVME_SET_CPUUSED, 6); + // Other RTC settings, to be updated. + encoder->Control(AVME_SET_ENABLEAUTOALTREF, 0); + encoder->Control(AV2E_SET_ENABLE_KEYFRAME_FILTERING, 0); + encoder->Control(AV2E_SET_ENABLE_RECT_PARTITIONS, 0); + encoder->Control(AV2E_SET_ENABLE_INTRA_EDGE_FILTER, 0); + encoder->Control(AV2E_SET_ENABLE_MASKED_COMP, 0); + encoder->Control(AV2E_SET_ENABLE_ONESIDED_COMP, 0); + encoder->Control(AV2E_SET_ENABLE_INTERINTRA_COMP, 0); + encoder->Control(AV2E_SET_ENABLE_SMOOTH_INTERINTRA, 0); + encoder->Control(AV2E_SET_ENABLE_DIFF_WTD_COMP, 0); + encoder->Control(AV2E_SET_ENABLE_INTERINTER_WEDGE, 0); + encoder->Control(AV2E_SET_ENABLE_INTERINTRA_WEDGE, 0); + encoder->Control(AV2E_SET_ENABLE_GLOBAL_MOTION, 0); + encoder->Control(AV2E_SET_ENABLE_WARPED_MOTION, 0); + encoder->Control(AV2E_SET_ENABLE_SMOOTH_INTRA, 0); + encoder->Control(AV2E_SET_ENABLE_PAETH_INTRA, 0); + encoder->Control(AV2E_SET_ENABLE_CFL_INTRA, 0); + encoder->Control(AV2E_SET_ENABLE_OVERLAY, 0); + encoder->Control(AV2E_SET_QUANT_B_ADAPT, 0); + encoder->Control(AV2E_SET_ENABLE_TPL_MODEL, 0); + encoder->Control(AV2E_SET_FRAME_PERIODIC_BOOST, 0); + encoder->Control(AV2E_SET_MAX_REFERENCE_FRAMES, 3); + encoder->Control(AV2E_SET_REDUCED_REFERENCE_SET, 1); + encoder->Control(AV2E_SET_ENABLE_REF_FRAME_MVS, 0); + encoder->Control(AV2E_SET_ENABLE_QM, 0); + encoder->Control(AV2E_SET_ENABLE_ANGLE_DELTA, 0); + encoder->Control(AV2E_SET_ENABLE_RESTORATION, 0); + encoder->Control(AV2E_SET_ENABLE_BRU, 0); + encoder->Control(AV2E_SET_AQ_MODE, 0); + encoder->Control(AV2E_SET_CDF_UPDATE_MODE, 1); + encoder->Control(AV2E_SET_ENABLE_DEBLOCKING, 1); + encoder->Control(AV2E_SET_ENABLE_CDEF, 1); + encoder->Control(AV2E_SET_ENABLE_PALETTE, 1); + encoder->Control(AV2E_SET_ENABLE_INTRABC, 1); + encoder->Control(AV2E_SET_INTRA_DCT_ONLY, 1); + encoder->Control(AV2E_SET_INTER_DCT_ONLY, 1); + encoder->Control(AV2E_SET_FORCE_VIDEO_MODE, 1); + encoder->Control(AV2E_SET_COEFF_COST_UPD_FREQ, 2); + encoder->Control(AV2E_SET_MODE_COST_UPD_FREQ, 2); + encoder->Control(AV2E_SET_MV_COST_UPD_FREQ, 3); + } + } + + virtual bool HandleDecodeResult(const avm_codec_err_t res_dec, + libavm_test::Decoder *decoder) { + EXPECT_EQ(AVM_CODEC_OK, res_dec) << decoder->DecodeError(); + return AVM_CODEC_OK == res_dec; + } + + int tune_content_; +}; + +TEST_P(RtcTestLarge, RtcTest) { + ::libavm_test::Y4mVideoSource video_nonsc("niklas_1280_720_30.y4m", 0, 5); + ASSERT_NO_FATAL_FAILURE(RunLoop(&video_nonsc)); +} + +AV2_INSTANTIATE_TEST_SUITE(RtcTestLarge, ::testing::Range(0, 2)); +} // namespace diff --git a/test/test.cmake b/test/test.cmake index b212feb0ea..b5d3b6b948 100644 --- a/test/test.cmake +++ b/test/test.cmake @@ -141,6 +141,7 @@ if(NOT BUILD_SHARED_LIBS) "${AVM_ROOT}/test/quant_test.cc" "${AVM_ROOT}/test/qm_test.cc" "${AVM_ROOT}/test/ras_frame_pruning_test.cc" + "${AVM_ROOT}/test/rtc_test.cc" "${AVM_ROOT}/test/sb_multipass_test.cc" "${AVM_ROOT}/test/screen_content_test.cc" "${AVM_ROOT}/test/sef_test.cc" From a0a5865ac393dc35839a78ad40b066cb9b7e5682 Mon Sep 17 00:00:00 2001 From: jadhuran Date: Mon, 27 Jul 2026 12:06:55 -0500 Subject: [PATCH 28/51] Speed up on uneven 4way partition and MV precision. (#5149) This has two contributions Contribution 1 Block size based partition depth reduction for uneven 4 way Q index threshold is applied only to key frames. Apply separate partition depth for uneven 4 way partition from H - partition Contribution 2 Prune mv using best precision Do not prune one pel when maximum precision is quarter pel. Results: Anchor: 1d2febc43d7dd206e68ac178cf7e69e17652d0dd Test: Contribution 1 + Contribution 2 ``` +---------+--------+-------+-------+-------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+--------+-------+-------+-------+----------+----------+ | A1 | -0.02% | 0.24% | 0.21% | 0.00% | 97.8% | 100.5% | | A2 | 0.10% | 0.15% | 0.03% | 0.09% | 95.8% | 99.8% | +---------+--------+-------+-------+-------+----------+----------+ ``` Test: Contribution 1 ``` +---------+--------+-------+--------+--------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+--------+-------+--------+--------+----------+----------+ | A1 | -0.02% | 0.05% | -0.14% | -0.02% | 99.0% | 100.5% | | A2 | 0.06% | 0.09% | 0.19% | 0.07% | 97.6% | 99.3% | +---------+--------+-------+--------+--------+----------+----------+ ``` --- av2/encoder/partition_search.c | 17 ++++++++++++++--- av2/encoder/rdopt.c | 6 +++--- av2/encoder/rdopt.h | 24 +++++++++++++++++------- av2/encoder/speed_features.c | 10 ++++++++++ av2/encoder/speed_features.h | 6 ++++++ 5 files changed, 50 insertions(+), 13 deletions(-) diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index 5282e18315..bc62a0db80 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -5883,9 +5883,19 @@ bool av2_rd_pick_partition( } // Search extended partitions. + const int ext_recur_depth_val = + get_ext_partitions_recur_depth(&cpi->sf.part_sf, bsize); const int ext_recur_depth = - AVMMIN(max_recursion_depth - 1, - get_ext_partitions_recur_depth(&cpi->sf.part_sf, bsize)); + AVMMIN(max_recursion_depth - 1, ext_recur_depth_val); + + const int uneven_4way_recur_depth_val = + cpi->sf.part_sf.uneven_4way_recur_depth_level && + (block_size_wide[bsize] < 64 || block_size_high[bsize] < 64) + ? 1 + : ext_recur_depth_val; + const int uneven_4way_recur_depth = + AVMMIN(max_recursion_depth - 1, uneven_4way_recur_depth_val); + const bool track_ptree_luma = is_luma_chroma_share_same_partition(xd->tree_type, ptree_luma, bsize); bool partition_boundaries[MAX_MIB_SQUARE] = { 0 }; @@ -5910,7 +5920,8 @@ bool av2_rd_pick_partition( search_extended_partition( &part_search_state, cpi, td, tile_data, tp, &best_rdc, pc_tree, track_ptree_luma ? ptree_luma : NULL, template_tree, &x_ctx, - &part_search_state, &level_banks, multi_pass_mode, ext_recur_depth, + &part_search_state, &level_banks, multi_pass_mode, + uneven_4way_recur_depth, is_cfl_allowed_for_sdp(cm, xd, ptree_luma, partition_type, bsize), partition_type); prune_4way_partitions_based_on_4way_search( diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index f705d70f2a..ed751ee8e1 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -5477,9 +5477,9 @@ static int64_t handle_inter_mode( pb_mv_precision < MV_PRECISION_FOUR_PEL && best_precision_so_far >= MV_PRECISION_QTR_PEL) continue; - if (prune_curr_mv_precision_eval( - cpi->sf.flexmv_sf.prune_mv_prec_using_best_mv_prec_so_far, - precision_dx, best_precision_dx_so_far)) + if (prune_curr_mv_precision_eval(cpi, mbmi, precision_def, + precision_dx, + best_precision_dx_so_far)) continue; if (mbmi->ref_mv_idx[0] || mbmi->ref_mv_idx[1]) { if (cpi->sf.flexmv_sf.do_not_search_8_pel_precision && diff --git a/av2/encoder/rdopt.h b/av2/encoder/rdopt.h index d514bc40e3..bf650d910d 100644 --- a/av2/encoder/rdopt.h +++ b/av2/encoder/rdopt.h @@ -375,14 +375,24 @@ static INLINE void update_mv_precision(const MV ref_mv, // Prune the evaluation of current MV precision based on best MV precision // chosen so far. static INLINE bool prune_curr_mv_precision_eval( - int prune_mv_prec_using_best_mv_prec_so_far, int precision_dx, + const AV2_COMP *const cpi, const MB_MODE_INFO *mbmi, + const PRECISION_SET *precision_def, int precision_dx, int best_precision_dx) { - if (!prune_mv_prec_using_best_mv_prec_so_far) return false; - if (prune_mv_prec_using_best_mv_prec_so_far >= 1) { - // If the current MV precision index is farther from the best MV precision, - // prune the evaluation of current MV precision. - if (best_precision_dx - precision_dx > 1) return true; - } + const int prune_mv_using_best_mv_prec = + cpi->sf.flexmv_sf.prune_non_one_pel_mv_using_best_mv_prec || + cpi->sf.flexmv_sf.prune_mv_prec_using_best_mv_prec_so_far; + + if (!prune_mv_using_best_mv_prec) return false; + // If the current MV precision index is farther from the best MV precision, + // prune the evaluation of current MV precision. + + // Avoid pruning one pel precision for boosted frames based + // on qindex when mbmi->max_mv_precision is QTR_PEL. + if (cpi->sf.flexmv_sf.prune_non_one_pel_mv_using_best_mv_prec && + mbmi->max_mv_precision == MV_PRECISION_QTR_PEL && + precision_def->precision[precision_dx] == MV_PRECISION_ONE_PEL) + return false; + if (best_precision_dx - precision_dx > 1) return true; return false; } diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index bce935e009..842316cf65 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -336,6 +336,7 @@ static void set_good_speed_features_framesize_independent( sf->rd_sf.perform_coeff_opt = 1; if (speed >= 1) { + sf->flexmv_sf.prune_non_one_pel_mv_using_best_mv_prec = 1; sf->inter_sf.selective_ref_frame = 2; sf->inter_sf.prune_newmv_modes_using_prior_rd = 1; sf->inter_sf.share_motion_mode_prune_pool = 1; @@ -694,6 +695,7 @@ static AVM_INLINE void init_part_sf(PARTITION_SPEED_FEATURES *part_sf) { part_sf->prune_rect_with_ml = 0; part_sf->end_part_search_after_consec_failures = 0; part_sf->ext_recur_depth_level = 0; + part_sf->uneven_4way_recur_depth_level = 0; part_sf->prune_rect_with_split_depth = 0; part_sf->prune_part_h_with_partition_boundary = 0; part_sf->inter_sdp_fast_method_level = 0; @@ -741,6 +743,7 @@ static AVM_INLINE void init_flexmv_sf( flexmv_sf->fast_mv_refinement = 0; flexmv_sf->fast_motion_search_low_precision = 0; flexmv_sf->prune_mv_prec_using_best_mv_prec_so_far = 0; + flexmv_sf->prune_non_one_pel_mv_using_best_mv_prec = 0; } static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { @@ -1275,6 +1278,10 @@ static AVM_INLINE void set_erp_speed_features_qindex_dependent(AV2_COMP *cpi) { if (!boosted && cm->quant_params.base_qindex < qindex_thresh3) { sf->part_sf.simple_motion_search_split = 1; } + sf->part_sf.uneven_4way_recur_depth_level = 1; + if (frame_is_intra_only(cm) && + cm->quant_params.base_qindex >= qindex_thresh3) + sf->part_sf.uneven_4way_recur_depth_level = 0; } } @@ -1348,6 +1355,9 @@ void av2_set_speed_features_qindex_dependent(AV2_COMP *cpi, int speed) { if (cm->quant_params.base_qindex <= qindex_thresh && !cm->features.allow_screen_content_tools) { sf->flexmv_sf.prune_mv_prec_using_best_mv_prec_so_far = boosted ? 0 : 1; + if (!boosted) { + sf->flexmv_sf.prune_non_one_pel_mv_using_best_mv_prec = 0; + } sf->tx_sf.prune_inter_tx_part_rd_eval = true; } } diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 1b76aa5fed..b130efaf37 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -411,6 +411,9 @@ typedef struct PARTITION_SPEED_FEATURES { // to INT_MAX. If set to 2, recursion depth is set to 1. int ext_recur_depth_level; + // Reduce the recursion depth for uneven 4way partitions based on block size + int uneven_4way_recur_depth_level; + // Prune rect partitions if PARTITION_SPLIT goes deep. int prune_rect_with_split_depth; @@ -982,6 +985,9 @@ typedef struct FLEXMV_PRECISION_SPEED_FEATURES { // Prune the evaluation of current MV precision based on best MV precision // chosen so far. int prune_mv_prec_using_best_mv_prec_so_far; + // Enable prune mv precision using best mv precision but restrict pruning one + // pel + int prune_non_one_pel_mv_using_best_mv_prec; } FLEXMV_PRECISION_SPEED_FEATURES; /*!\endcond */ From a62a620140c8452d7c94872935a5426b66612cb5 Mon Sep 17 00:00:00 2001 From: deepa-kg Date: Mon, 27 Jul 2026 22:44:47 +0530 Subject: [PATCH 29/51] Add SSE2 optimization for interp_cubic() (#5135) This patch refactors av2_model_rd_curvfit() by consolidating two interp_cubic() calls for computing rate and distortion. Also, the relevant SSE2 implementation for the combined interp_cubic() function along with its corresponding unit test is added. The SSE2 implementation achieves ~1.21x speedup compared to the scalar C version. (adopted from libaom: https://aomedia-review.googlesource.com/c/aom/+/211441) Also, unnecessary calls to the function get_dqv() in update_coeff_general(), update_coeff_simple(), and update_coeff_eob() are removed. Test results (RA) Anchor: commit 165345b A1 - 17 frames A2 - 33 frames ``` -------------------------------------- Speed Class Encoder Instruction Count Reduction (%) ------------------------------------- 0 A2 0.32 A1 0.23 ------------------------------------- 1 A2 0.31 A1 0.21 ------------------------------------- 2 A2 0.19 A1 0.10 ------------------------------------- 3 A2 0.26 A1 0.11 ------------------------------------- ``` --- av2/av2.cmake | 1 + av2/common/av2_rtcd_defs.pl | 3 + av2/encoder/encodetxb.c | 6 +- av2/encoder/model_rd.h | 9 +-- av2/encoder/rd.c | 11 ++- av2/encoder/rd.h | 17 ++++- av2/encoder/x86/model_rd_sse2.c | 61 +++++++++++++++ test/model_rd_test.cc | 127 ++++++++++++++++++++++++++++++++ test/test.cmake | 1 + 9 files changed, 224 insertions(+), 12 deletions(-) create mode 100644 av2/encoder/x86/model_rd_sse2.c create mode 100644 test/model_rd_test.cc diff --git a/av2/av2.cmake b/av2/av2.cmake index d36f132a33..3a3d95266d 100644 --- a/av2/av2.cmake +++ b/av2/av2.cmake @@ -396,6 +396,7 @@ list( "${AVM_ROOT}/av2/encoder/x86/encodetxb_sse2.c" "${AVM_ROOT}/av2/encoder/x86/highbd_block_error_intrin_sse2.c" "${AVM_ROOT}/av2/encoder/x86/highbd_temporal_filter_sse2.c" + "${AVM_ROOT}/av2/encoder/x86/model_rd_sse2.c" "${AVM_ROOT}/av2/encoder/x86/wedge_utils_sse2.c") list(APPEND AVM_AV2_ENCODER_INTRIN_SSE3 "${AVM_ROOT}/av2/encoder/x86/ml_sse3.c") diff --git a/av2/common/av2_rtcd_defs.pl b/av2/common/av2_rtcd_defs.pl index 95e64ca4f7..a92d1ee256 100644 --- a/av2/common/av2_rtcd_defs.pl +++ b/av2/common/av2_rtcd_defs.pl @@ -303,6 +303,9 @@ () add_proto qw/void av2_get_horver_correlation_full/, " const int16_t *diff, int stride, int w, int h, float *hcorr, float *vcorr"; specialize qw/av2_get_horver_correlation_full sse4_1 avx2 neon/; + add_proto qw/void av2_interp_cubic_rate_dist/, "const double *p1, const double *p2, double x, double rate_dist_f[2]"; + specialize qw/av2_interp_cubic_rate_dist sse2/; + add_proto qw/void av2_nn_predict/, " const float *input_nodes, const NN_CONFIG *const nn_config, int reduce_prec, float *const output"; if (avm_config("CONFIG_EXCLUDE_SIMD_MISMATCH") ne "yes") { specialize qw/av2_nn_predict sse3 neon/; diff --git a/av2/encoder/encodetxb.c b/av2/encoder/encodetxb.c index 8f9b72c84f..ad70f096ca 100644 --- a/av2/encoder/encodetxb.c +++ b/av2/encoder/encodetxb.c @@ -2581,7 +2581,6 @@ static INLINE void update_coeff_general( tran_low_t *qcoeff, tran_low_t *dqcoeff, uint8_t *levels, const qm_val_t *iqmatrix, int32_t *tmp_sign, int plane, coeff_info *coef_info, bool enable_parity_hiding, int *hr_level_avg) { - const int dqv = get_dqv(dequant, scan[si], iqmatrix); const int ci = scan[si]; const tran_low_t qc = qcoeff[ci]; const int is_last = si == (eob - 1); @@ -2608,6 +2607,7 @@ static INLINE void update_coeff_general( if (qc == 0) { *accu_rate += limits ? base_lf_cost : base_cost; } else { + const int dqv = get_dqv(dequant, scan[si], iqmatrix); const int sign = (qc < 0) ? 1 : 0; const tran_low_t abs_qc = abs(qc); const tran_low_t tqc = tcoeff[ci]; @@ -2666,7 +2666,6 @@ static AVM_FORCE_INLINE void update_coeff_simple( tran_low_t *qcoeff, tran_low_t *dqcoeff, uint8_t *levels, const qm_val_t *iqmatrix, coeff_info *coef_info, bool enable_parity_hiding, int plane, int *hr_level_avg) { - const int dqv = get_dqv(dequant, scan[si], iqmatrix); (void)eob; // this simple version assumes the coeff's scan_idx is not DC (scan_idx != 0) // and not the last (scan_idx != eob - 1) @@ -2709,6 +2708,7 @@ static AVM_FORCE_INLINE void update_coeff_simple( } } } else { + const int dqv = get_dqv(dequant, scan[si], iqmatrix); const tran_low_t abs_qc = abs(qc); const tran_low_t abs_tqc = abs(tcoeff[ci]); const tran_low_t abs_dqc = abs(dqcoeff[ci]); @@ -2905,7 +2905,6 @@ static AVM_FORCE_INLINE void update_coeff_eob( int *hr_level_avg) { const int bwl = get_txb_bwl(tx_size); const int height = get_txb_high(tx_size); - const int dqv = get_dqv(dequant, scan[si], iqmatrix); assert(si != *eob - 1); const int ci = scan[si]; const tran_low_t qc = qcoeff[ci]; @@ -2945,6 +2944,7 @@ static AVM_FORCE_INLINE void update_coeff_eob( } } } else { + const int dqv = get_dqv(dequant, scan[si], iqmatrix); int64_t rd_eob_low = INT64_MAX >> 1; int rate_eob_low = INT32_MAX >> 1; int lower_level = 0; diff --git a/av2/encoder/model_rd.h b/av2/encoder/model_rd.h index e64d088ff5..8c096fec6c 100644 --- a/av2/encoder/model_rd.h +++ b/av2/encoder/model_rd.h @@ -126,12 +126,11 @@ static AVM_INLINE void model_rd_with_curvfit(const AV2_COMP *const cpi, const double sse_norm = (double)sse / num_samples; const double qstepsqr = (double)qstep * qstep; const double xqr = log2(sse_norm / qstepsqr); - double rate_f, dist_by_sse_norm_f; - av2_model_rd_curvfit(plane_bsize, sse_norm, xqr, &rate_f, - &dist_by_sse_norm_f); + double rate_dist_f[2]; + av2_model_rd_curvfit(plane_bsize, sse_norm, xqr, rate_dist_f); - const double dist_f = dist_by_sse_norm_f * sse_norm; - int rate_i = (int)(AVMMAX(0.0, rate_f * num_samples) + 0.5); + const double dist_f = rate_dist_f[1] * sse_norm; + int rate_i = (int)(AVMMAX(0.0, rate_dist_f[0] * num_samples) + 0.5); int64_t dist_i = (int64_t)(AVMMAX(0.0, dist_f * num_samples) + 0.5); avm_clear_system_state(); diff --git a/av2/encoder/rd.c b/av2/encoder/rd.c index 6fc74a995c..dd6dd866f5 100644 --- a/av2/encoder/rd.c +++ b/av2/encoder/rd.c @@ -1419,6 +1419,12 @@ static double interp_cubic(const double *p, double x) { x * (3.0 * (p[1] - p[2]) + p[3] - p[0]))); } +void av2_interp_cubic_rate_dist_c(const double *p1, const double *p2, double x, + double rate_dist_f[2]) { + rate_dist_f[0] = interp_cubic(p1, x); + rate_dist_f[1] = interp_cubic(p2, x); +} + /* static double interp_bicubic(const double *p, int p_stride, double x, double y) { @@ -1533,7 +1539,7 @@ static const double interp_dgrid_curv[3][65] = { }; void av2_model_rd_curvfit(BLOCK_SIZE bsize, double sse_norm, double xqr, - double *rate_f, double *distbysse_f) { + double rate_dist_f[2]) { const double x_start = -15.5; const double x_end = 16.5; const double x_step = 0.5; @@ -1551,9 +1557,8 @@ void av2_model_rd_curvfit(BLOCK_SIZE bsize, double sse_norm, double xqr, assert(xi > 0); const double *prate = &interp_rgrid_curv[rcat][(xi - 1)]; - *rate_f = interp_cubic(prate, xo); const double *pdist = &interp_dgrid_curv[dcat][(xi - 1)]; - *distbysse_f = interp_cubic(pdist, xo); + av2_interp_cubic_rate_dist(prate, pdist, xo, rate_dist_f); } static void get_entropy_contexts_plane(BLOCK_SIZE plane_bsize, diff --git a/av2/encoder/rd.h b/av2/encoder/rd.h index ebf902e9bf..db40c656d4 100644 --- a/av2/encoder/rd.h +++ b/av2/encoder/rd.h @@ -219,8 +219,23 @@ void av2_set_sad_per_bit(const struct AV2_COMP *cpi, MvCosts *mv_costs, void av2_model_rd_from_var_lapndz(int64_t var, unsigned int n, unsigned int qstep, int *rate, int64_t *dist); +/*!\brief Estimate rate and distortion for a block. + * + * \param[in] bsize Block size + * \param[in] sse_norm Normalized SSE + * \param[in] xqr The log2 ratio of normalized SSE to the + * squared quantization step size, computed + * as: log2(sse_norm / qstep^2) + * \param[out] rate_dist_f Pointer to store the results + * rate_dist_f[0] stores the estimated rate + * rate_dist_f[1] stores the estimated + * distortion by normalized SSE + * + * \remark Nothing is returned. Results are saved in rate_dist_f[0] + * and rate_dist_f[1]. + */ void av2_model_rd_curvfit(BLOCK_SIZE bsize, double sse_norm, double xqr, - double *rate_f, double *distbysse_f); + double rate_dist_f[2]); int av2_get_switchable_rate(const MACROBLOCK *x, const MACROBLOCKD *xd, InterpFilter interp_filter); diff --git a/av2/encoder/x86/model_rd_sse2.c b/av2/encoder/x86/model_rd_sse2.c new file mode 100644 index 0000000000..888118437c --- /dev/null +++ b/av2/encoder/x86/model_rd_sse2.c @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include + +#include "config/av2_rtcd.h" + +void av2_interp_cubic_rate_dist_sse2(const double *p1, const double *p2, + double x, double rate_dist_f[2]) { + const __m128d half = _mm_set1_pd(0.5); + const __m128d two = _mm_set1_pd(2.0); + const __m128d three = _mm_set1_pd(3.0); + const __m128d four = _mm_set1_pd(4.0); + const __m128d five = _mm_set1_pd(5.0); + + const __m128d reg_x = _mm_set1_pd(x); + const __m128d reg_p0 = _mm_set_pd(p2[0], p1[0]); + const __m128d reg_p1 = _mm_set_pd(p2[1], p1[1]); + const __m128d reg_p2 = _mm_set_pd(p2[2], p1[2]); + const __m128d reg_p3 = _mm_set_pd(p2[3], p1[3]); + + // To ensure that results are bit-identical to the C code, we need to perform + // exactly the same sequence of operations here as in the C code. + // reg_res_0 = x * (3.0 * (p[1] - p[2]) + p[3] - p[0]) + __m128d reg_res_0 = _mm_sub_pd(reg_p1, reg_p2); + reg_res_0 = _mm_mul_pd(three, reg_res_0); + reg_res_0 = _mm_add_pd(reg_res_0, reg_p3); + reg_res_0 = _mm_sub_pd(reg_res_0, reg_p0); + reg_res_0 = _mm_mul_pd(reg_x, reg_res_0); + + // reg_res_1 = 2.0 * p[0] - 5.0 * p[1] + 4.0 * p[2]- p[3] + const __m128d regp0_x_2 = _mm_mul_pd(two, reg_p0); + const __m128d regp1_x_5 = _mm_mul_pd(five, reg_p1); + const __m128d regp2_x_4 = _mm_mul_pd(four, reg_p2); + __m128d reg_res_1 = _mm_sub_pd(regp0_x_2, regp1_x_5); + reg_res_1 = _mm_add_pd(reg_res_1, regp2_x_4); + reg_res_1 = _mm_sub_pd(reg_res_1, reg_p3); + + // reg_res_2 = x * (reg_res_1 + reg_res_0) + __m128d reg_res_2 = _mm_add_pd(reg_res_1, reg_res_0); + reg_res_2 = _mm_mul_pd(reg_x, reg_res_2); + + // reg_res_3 = p[2] - p[0] + reg_res_2 + __m128d reg_res_3 = _mm_sub_pd(reg_p2, reg_p0); + reg_res_3 = _mm_add_pd(reg_res_3, reg_res_2); + + // reg_res_4 = p[1] + 0.5 * x * reg_res_3 + __m128d reg_res_4 = _mm_mul_pd(_mm_mul_pd(half, reg_x), reg_res_3); + reg_res_4 = _mm_add_pd(reg_p1, reg_res_4); + + _mm_storeu_pd(rate_dist_f, reg_res_4); +} diff --git a/test/model_rd_test.cc b/test/model_rd_test.cc new file mode 100644 index 0000000000..bc1345d738 --- /dev/null +++ b/test/model_rd_test.cc @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include +#include + +#include "gtest/gtest.h" + +#include "config/av2_rtcd.h" +#include "avm_ports/avm_timer.h" +#include "test/acm_random.h" +#include "test/register_state_check.h" + +namespace { + +using InterpCubicRateDistFunc = void (*)(const double *p1, const double *p2, + double x, double rate_dist_f[2]); + +class InterpCubicTest + : public ::testing::TestWithParam { + public: + InterpCubicTest() + : target_func_(GetParam()), + rnd_(libavm_test::ACMRandom::DeterministicSeed()) {} + double GenerateRandomDouble(double min, double max) { + return min + (static_cast(rnd_.Rand31()) / ((1U << 31) - 1)) * + (max - min); + } + + protected: + void CheckOutput(); + void SpeedTest(); + InterpCubicRateDistFunc target_func_; + libavm_test::ACMRandom rnd_; +}; +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(InterpCubicTest); + +#if ARCH_X86 || ARCH_X86_64 +/* On x86, disable the x87 unit's internal 80 bit precision for better + * consistency with the SSE unit's 64 bit precision. + */ +#include "avm_ports/x86.h" +#define FLOATING_POINT_SET_PRECISION \ + unsigned short x87_orig_mode = x87_set_double_precision(); +#define FLOATING_POINT_RESTORE_PRECISION x87_set_control_word(x87_orig_mode); +#else +#define FLOATING_POINT_SET_PRECISION +#define FLOATING_POINT_RESTORE_PRECISION +#endif // ARCH_X86 || ARCH_X86_64 + +void InterpCubicTest::CheckOutput() { + double p1[4], p2[4], out_ref[2], out_mod[2]; + constexpr int kNumIters = 10000; + for (int iter = 0; iter < kNumIters; ++iter) { + for (int i = 0; i < 4; ++i) { + p1[i] = GenerateRandomDouble(0.0000, 4096.000000); + p2[i] = GenerateRandomDouble(0.0000, 16.0000); + } + const double x = GenerateRandomDouble(0.0000, 1.0000); + + FLOATING_POINT_SET_PRECISION + av2_interp_cubic_rate_dist_c(p1, p2, x, out_ref); + FLOATING_POINT_RESTORE_PRECISION + + API_REGISTER_STATE_CHECK(target_func_(p1, p2, x, out_mod)); + + EXPECT_EQ(out_ref[0], out_mod[0]) << "Error: rate_f value mismatch"; + EXPECT_EQ(out_ref[1], out_mod[1]) << "Error: distbysse_f value mismatch"; + } +} + +void InterpCubicTest::SpeedTest() { + double p1[4], p2[4], out_ref[2], out_mod[2]; + + for (int i = 0; i < 4; ++i) { + p1[i] = GenerateRandomDouble(0.0000, 4096.0000); + p2[i] = GenerateRandomDouble(0.0000, 16.0000); + } + const double x = GenerateRandomDouble(0.0000, 1.0000); + + constexpr int kNumIters = 100000000; + + avm_usec_timer ref_timer, test_timer; + FLOATING_POINT_SET_PRECISION + avm_usec_timer_start(&ref_timer); + for (int iter = 0; iter < kNumIters; ++iter) { + av2_interp_cubic_rate_dist_c(p1, p2, x, out_ref); + } + avm_usec_timer_mark(&ref_timer); + FLOATING_POINT_RESTORE_PRECISION + const int elapsed_time_c = + static_cast(avm_usec_timer_elapsed(&ref_timer)); + + avm_usec_timer_start(&test_timer); + for (int iter = 0; iter < kNumIters; ++iter) { + API_REGISTER_STATE_CHECK(target_func_(p1, p2, x, out_mod)); + } + avm_usec_timer_mark(&test_timer); + const int elapsed_time_simd = + static_cast(avm_usec_timer_elapsed(&test_timer)); + + printf( + "c_time=%d \t simd_time=%d \t " + "Scaling=%lf \n", + elapsed_time_c, elapsed_time_simd, + (static_cast(elapsed_time_c) / elapsed_time_simd)); +} + +TEST_P(InterpCubicTest, CheckOutput) { CheckOutput(); } + +TEST_P(InterpCubicTest, DISABLED_Speed) { SpeedTest(); } + +#if HAVE_SSE2 +INSTANTIATE_TEST_SUITE_P(SSE2, InterpCubicTest, + ::testing::Values(av2_interp_cubic_rate_dist_sse2)); +#endif // HAVE_SSE2 + +} // namespace diff --git a/test/test.cmake b/test/test.cmake index b5d3b6b948..e2eed9ff56 100644 --- a/test/test.cmake +++ b/test/test.cmake @@ -221,6 +221,7 @@ if(NOT BUILD_SHARED_LIBS) "${AVM_ROOT}/test/horver_correlation_test.cc" "${AVM_ROOT}/test/masked_sad_test.cc" "${AVM_ROOT}/test/masked_variance_test.cc" + "${AVM_ROOT}/test/model_rd_test.cc" "${AVM_ROOT}/test/motion_vector_test.cc" "${AVM_ROOT}/test/noise_model_test.cc" "${AVM_ROOT}/test/quantize_func_test.cc" From 7acfff17cdd4649875d5e95490a7e4b2ce5a3e20 Mon Sep 17 00:00:00 2001 From: linzhen-beep Date: Mon, 27 Jul 2026 16:15:13 -0400 Subject: [PATCH 30/51] Transform partition encoder speedup (#5165) Tweak the speed feature 'restrict_tx_partition_type_search'. Anchor: 41fc9bf31dcbecb6d6943441fe3e5be0962ff70c Test condition: CTC, RA, 33 frames, speed 1 ``` +---------+--------+--------+--------+--------+----------+ | Summary | Y | U | V | YUV | Enc-time | +---------+--------+--------+--------+--------+----------+ | A1 | 0.07% | 0.04% | 0.04% | 0.07% | 96.91% | | A2 | 0.05% | 0.03% | 0.22% | 0.05% | 96.22% | |avg wo b2| 0.06% | 0.04% | -0.02% | 0.06% | 96.24% | +---------+--------+--------+--------+--------+----------+ ``` STATS_CHANGED --- av2/encoder/speed_features.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 842316cf65..df570661b1 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -1340,6 +1340,7 @@ void av2_set_speed_features_qindex_dependent(AV2_COMP *cpi, int speed) { if (cpi->oxcf.mode == GOOD && speed >= 0) { const int qindex_thresh = 135 + qindex_offset; const int qindex_thresh2 = 113 + qindex_offset; + const int qindex_thresh4 = 160 + qindex_offset; if (cpi->oxcf.gf_cfg.lag_in_frames == 0) { if (cm->quant_params.base_qindex <= (frame_is_intra_only(&cpi->common) ? qindex_thresh2 @@ -1347,7 +1348,8 @@ void av2_set_speed_features_qindex_dependent(AV2_COMP *cpi, int speed) { sf->tx_sf.restrict_tx_partition_type_search = 2; } } else { - if (cm->quant_params.base_qindex <= qindex_thresh2) { + if (cm->quant_params.base_qindex <= + ((speed < 1) ? qindex_thresh2 : qindex_thresh4)) { sf->tx_sf.restrict_tx_partition_type_search = 1; } } From 377253ef3411afcea288aa3e5c587cae460fcb4a Mon Sep 17 00:00:00 2001 From: kslu-aom Date: Mon, 27 Jul 2026 13:20:54 -0700 Subject: [PATCH 31/51] Pruning compound reference frame search in speed >= 1 (#5163) Introduce a speed feature for speed >= 1 to 1. Allow only one same reference compound (0,0) and disallow (1,1) 2. Define a priority array for compound reference pairs based on selection frequency, and only allow the top 2 in the array for all compound modes other than NEAR_NEARMV and NEAR_NEARMV_OPTFLOW The macro SAME_REF_COMPOUND_PRUNE in entropymode.h is renamed and moved to encoder.c because it is only used by the encoder. RA 33 frames, speed 1 Anchor: 8fbe5622b2 +---------+--------+--------+--------+--------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+--------+--------+--------+--------+----------+----------+ | A1 | +0.01% | +0.06% | -0.05% | +0.01% | 97.9% | 100.0% | | A2 | +0.04% | +0.00% | +0.35% | +0.04% | 97.4% | 100.6% | | Avg | +0.03% | +0.02% | +0.23% | +0.03% | 97.6% | 100.4% | +---------+--------+--------+--------+--------+----------+----------+ --- av2/common/entropymode.h | 2 -- av2/encoder/encoder.c | 3 ++- av2/encoder/rdopt.c | 34 ++++++++++++++++++++++++++++++++++ av2/encoder/speed_features.c | 7 +++++++ av2/encoder/speed_features.h | 7 +++++++ 5 files changed, 50 insertions(+), 3 deletions(-) diff --git a/av2/common/entropymode.h b/av2/common/entropymode.h index f25e1061be..bc8d691bc1 100644 --- a/av2/common/entropymode.h +++ b/av2/common/entropymode.h @@ -46,8 +46,6 @@ extern "C" { #define COMPREF_BIT_TYPES 2 #define RANKED_REF0_TO_PRUNE 3 -// The number of reference pictures for the same reference compound mode -#define SAME_REF_COMPOUND_PRUNE 2 #define MAX_REFS_ARF 4 #define WIENERNS_4PART_CTX_MAX 1 diff --git a/av2/encoder/encoder.c b/av2/encoder/encoder.c index 3ef8d1adf9..cedc8ecab4 100644 --- a/av2/encoder/encoder.c +++ b/av2/encoder/encoder.c @@ -99,6 +99,7 @@ #define DEF_MAX_DRL_REFMVS 4 #define DEF_MAX_DRL_REFBVS 4 +#define NUM_SAME_REF_COMPOUND 2 #if CONFIG_ENTROPY_STATS FRAME_COUNTS aggregate_fc; #endif // CONFIG_ENTROPY_STATS @@ -481,7 +482,7 @@ void av2_init_seq_coding_tools(AV2_COMP *cpi, SequenceHeader *seq, // Disable frame by frame update for now. Can be changed later. seq->allow_frame_max_bvp_drl_bits = 0; seq->num_same_ref_compound = - seq->single_picture_header_flag ? 0 : SAME_REF_COMPOUND_PRUNE; + seq->single_picture_header_flag ? 0 : NUM_SAME_REF_COMPOUND; seq->max_frame_width = frm_dim_cfg->forced_max_frame_width ? frm_dim_cfg->forced_max_frame_width diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index ed751ee8e1..789d549e58 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -2264,6 +2264,35 @@ static AVM_INLINE void update_inter_mode_rd(HandleInterModeArgs *args, if (rd < *p) *p = rd; } +// Priority list of cross compound reference pairs ordered based on selection +// frequency. +static const int comp_ref_priority[15][2] = { + { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 0, 4 }, + { 0, 5 }, { 2, 3 }, { 1, 4 }, { 1, 3 }, { 1, 5 }, + { 2, 5 }, { 0, 6 }, { 1, 6 }, { 2, 4 }, { 2, 6 }, +}; + +// Returns 1 if a compound reference pair (ref_frame, second_ref_frame) should +// be pruned based on the reduce_comp_refs speed feature limit. +static AVM_INLINE int prune_comp_ref_by_priority( + const INTER_MODE_SPEED_FEATURES *inter_sf, PREDICTION_MODE mode, + int ref_frame, int second_ref_frame) { + const int reduce_comp_refs = inter_sf->reduce_comp_refs; + if (!reduce_comp_refs || ref_frame == second_ref_frame) return 0; + + // In compound modes other than NEAR_NEARMV and NEAR_NEARMV_OPTFLOW, search + // top-N compound reference pairs in the priority list. + if (mode == NEAR_NEARMV || mode == NEAR_NEARMV_OPTFLOW) return 0; + const int limit = AVMMIN(reduce_comp_refs, 15); + for (int ref_idx = 0; ref_idx < limit; ++ref_idx) { + if (comp_ref_priority[ref_idx][0] == ref_frame && + comp_ref_priority[ref_idx][1] == second_ref_frame) { + return 0; + } + } + return 1; +} + // Returns 1 if a single-ref mode (e.g. NEWMV or GLOBALMV) for this ref frame // should be skipped because the matching reference RD is not within // (1 / slack_denom) of the best reference RD across all ref frames. Decision @@ -9174,6 +9203,11 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, if (comp_pred && !(cm->ref_frame_flags & (1 << second_ref_frame))) continue; + if (comp_pred && prune_comp_ref_by_priority(&sf->inter_sf, this_mode, + ref_frame, second_ref_frame)) { + continue; + } + const MV_REFERENCE_FRAME ref_frames[2] = { ref_frame, second_ref_frame }; init_mbmi(mbmi, this_mode, ref_frames, cm, xd, xd->sbi); mbmi->fsc_mode[PLANE_TYPE_Y] = 0; diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index df570661b1..a513df4470 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -344,6 +344,7 @@ static void set_good_speed_features_framesize_independent( // TODO (Yeqing Wu): need to be tuned for speed > 1. sf->inter_sf.skip_compound_prune_top_refs_num_ref0 = 1; sf->inter_sf.skip_compound_prune_top_refs_num_ref1 = 2; + sf->inter_sf.reduce_comp_refs = 2; sf->inter_sf.disable_switchable_refinemv = 1; sf->inter_sf.prune_refinemv_by_ref_idx = 1; sf->inter_sf.prune_interintra_by_ref_idx = 1; @@ -756,6 +757,7 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->reduce_inter_modes = 0; inter_sf->alt_ref_search_fp = 0; inter_sf->disable_switchable_refinemv = 0; + inter_sf->reduce_comp_refs = 0; inter_sf->selective_ref_frame = 0; inter_sf->prune_newmv_modes_using_prior_rd = 0; inter_sf->share_motion_mode_prune_pool = 0; @@ -1121,6 +1123,11 @@ void av2_set_speed_features_framesize_independent(AV2_COMP *cpi, int speed) { cpi->common.seq_params.enable_masked_compound &= !sf->inter_sf.disable_masked_comp; + if (sf->inter_sf.reduce_comp_refs) { + cpi->common.seq_params.num_same_ref_compound = + AVMMIN(cpi->common.seq_params.num_same_ref_compound, 1); + } + if (sf->intra_sf.skip_intra_dip_search) { cpi->common.seq_params.enable_intra_dip = 0; } diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index b130efaf37..706ff724eb 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -582,6 +582,13 @@ typedef struct INTER_MODE_SPEED_FEATURES { // 2 implies prune horiz, vert and extended partition int prune_ref_frames; + // When set to N>0, this flag limits the maximum number of compound + // reference frame combinations evaluated in the RD search. For all compound + // modes, same reference compound is restricted to (0,0). For non-NEAR_NEARMV + // and non-NEAR_NEARMV_OPTFLOW modes, the evaluation is limited to top N + // compound reference combinations in priority order. + int reduce_comp_refs; + // Prune reference frames for ALTREF int alt_ref_search_fp; From 7052acc5c49d1cff81ed05a8bc9d87a7b035b393 Mon Sep 17 00:00:00 2001 From: arnabdey-ittiam Date: Tue, 28 Jul 2026 01:55:37 +0530 Subject: [PATCH 32/51] Add macro for maximum qp selection (#5145) This change adds a macro `MAXQ_FOR_GIVEN_BIT_DEPTH()` and replaces the ternary operators used to compute max-qp using the macro. No stats changed. --- av2/common/av2_common_int.h | 5 +++++ av2/common/quant_common.c | 15 ++++----------- av2/decoder/decodemv.c | 4 +--- av2/encoder/aq_cyclicrefresh.c | 13 +++---------- av2/encoder/encodeframe_utils.c | 5 +---- av2/encoder/ratectrl.c | 4 +--- av2/encoder/rd.c | 9 ++------- 7 files changed, 17 insertions(+), 38 deletions(-) diff --git a/av2/common/av2_common_int.h b/av2/common/av2_common_int.h index ba6514b682..863a65b781 100644 --- a/av2/common/av2_common_int.h +++ b/av2/common/av2_common_int.h @@ -103,6 +103,11 @@ extern "C" { #define MIN_BSIZE_WARP_DELTA 8 +#define MAXQ_FOR_GIVEN_BIT_DEPTH(bit_depth) \ + ((bit_depth) == AVM_BITS_8 ? MAXQ_8_BITS \ + : (bit_depth) == AVM_BITS_10 ? MAXQ_10_BITS \ + : MAXQ_12_BITS) + /*!\cond */ #if CONFIG_PARAKIT_COLLECT_DATA diff --git a/av2/common/quant_common.c b/av2/common/quant_common.c index ed86343ca7..14b38e6d66 100644 --- a/av2/common/quant_common.c +++ b/av2/common/quant_common.c @@ -99,9 +99,7 @@ int av2_q_clamped(int qindex, int delta, int base_dc_delta_q, q_clamped = 0; else q_clamped = clamp(qindex + base_dc_delta_q + delta, 1, - bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS); + MAXQ_FOR_GIVEN_BIT_DEPTH(bit_depth)); return q_clamped; } // Add the deltaq offset value @@ -142,10 +140,8 @@ static int32_t get_q(int qindex, int delta, avm_bit_depth_t bit_depth) { return ac_qlookup_QTX[0]; } - const int q_clamped = clamp(qindex + delta, 1, - bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS); + const int q_clamped = + clamp(qindex + delta, 1, MAXQ_FOR_GIVEN_BIT_DEPTH(bit_depth)); return qlookup(q_clamped); } @@ -165,10 +161,7 @@ int av2_get_qindex(const struct segmentation *seg, int segment_id, const int data = get_segdata(seg, segment_id, SEG_LVL_ALT_Q); const int seg_qindex = base_qindex + data; - return clamp(seg_qindex, 0, - bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS); + return clamp(seg_qindex, 0, MAXQ_FOR_GIVEN_BIT_DEPTH(bit_depth)); } else { return base_qindex; } diff --git a/av2/decoder/decodemv.c b/av2/decoder/decodemv.c index 03dc9055e3..51919c2170 100644 --- a/av2/decoder/decodemv.c +++ b/av2/decoder/decodemv.c @@ -1497,9 +1497,7 @@ static void read_delta_q_params(AV2_COMMON *const cm, MACROBLOCKD *const xd, /* Normative: Clamp to [1,MAXQ] to not interfere with lossless mode */ xd->current_base_qindex = clamp(xd->current_base_qindex, 1, - cm->seq_params.bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : cm->seq_params.bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS); + MAXQ_FOR_GIVEN_BIT_DEPTH(cm->seq_params.bit_depth)); } } diff --git a/av2/encoder/aq_cyclicrefresh.c b/av2/encoder/aq_cyclicrefresh.c index b94a0e90e7..7e3cf8a3f0 100644 --- a/av2/encoder/aq_cyclicrefresh.c +++ b/av2/encoder/aq_cyclicrefresh.c @@ -44,9 +44,7 @@ CYCLIC_REFRESH *av2_cyclic_refresh_alloc(int mi_rows, int mi_cols, : bit_depth == AVM_BITS_10 ? (MAXQ_10_BITS <= (QINDEX_RANGE_10_BITS - 1)) : (MAXQ_12_BITS <= (QINDEX_RANGE_12_BITS - 1))); - const uint16_t qinit = bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS; + const uint16_t qinit = MAXQ_FOR_GIVEN_BIT_DEPTH(bit_depth); for (int i = 0; i < mi_rows * mi_cols; ++i) cr->last_coded_q_map[i] = qinit; cr->avg_frame_low_motion = 0.0; @@ -428,9 +426,7 @@ void av2_cyclic_refresh_setup(AV2_COMP *const cpi) { if (cm->current_frame.frame_type == KEY_FRAME) { for (int i = 0; i <= (cm->mi_params.mi_rows * cm->mi_params.mi_cols); i++) cr->last_coded_q_map[i] = - cm->seq_params.bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : cm->seq_params.bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS; + MAXQ_FOR_GIVEN_BIT_DEPTH(cm->seq_params.bit_depth); cr->sb_index = 0; } @@ -477,10 +473,7 @@ void av2_cyclic_refresh_setup(AV2_COMP *const cpi) { const int qindex2 = clamp( quant_params->base_qindex + quant_params->y_dc_delta_q + qindex_delta, - 0, - cm->seq_params.bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : cm->seq_params.bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS); + 0, MAXQ_FOR_GIVEN_BIT_DEPTH(cm->seq_params.bit_depth)); cr->rdmult = av2_compute_rd_mult(cpi, qindex2); diff --git a/av2/encoder/encodeframe_utils.c b/av2/encoder/encodeframe_utils.c index 64df5e5c7d..b1c0757b66 100644 --- a/av2/encoder/encodeframe_utils.c +++ b/av2/encoder/encodeframe_utils.c @@ -1077,10 +1077,7 @@ int av2_get_q_for_deltaq_objective(AV2_COMP *const cpi, BLOCK_SIZE bsize, offset = AVMMAX(offset, -delta_q_info->delta_q_res * 9 + 1); int qindex = cm->quant_params.base_qindex + offset; - qindex = - AVMMIN(qindex, cm->seq_params.bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : cm->seq_params.bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS); + qindex = AVMMIN(qindex, MAXQ_FOR_GIVEN_BIT_DEPTH(cm->seq_params.bit_depth)); qindex = AVMMAX(qindex, MINQ); return qindex; diff --git a/av2/encoder/ratectrl.c b/av2/encoder/ratectrl.c index 6e580daedf..bf6814e51c 100644 --- a/av2/encoder/ratectrl.c +++ b/av2/encoder/ratectrl.c @@ -1078,9 +1078,7 @@ static int apply_tcq_qp_offset(const AV2_COMP *cpi, int qp_tcq) { } else { tcq_qp_offset_shift = 0; } - int max_qp = bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS; + int max_qp = MAXQ_FOR_GIVEN_BIT_DEPTH(bit_depth); return clamp(qp_tcq + tcq_qp_offset_shift, 0, max_qp); } diff --git a/av2/encoder/rd.c b/av2/encoder/rd.c index dd6dd866f5..ad5f41d65b 100644 --- a/av2/encoder/rd.c +++ b/av2/encoder/rd.c @@ -701,9 +701,7 @@ int av2_get_deltaq_offset(const AV2_COMP *cpi, int qindex, double beta) { int newq = (int)rint(q / sqrt(beta)); int orig_qindex = qindex; const int max_qindex = - cpi->common.seq_params.bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : cpi->common.seq_params.bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS; + MAXQ_FOR_GIVEN_BIT_DEPTH(cpi->common.seq_params.bit_depth); if (newq < q) { do { qindex--; @@ -811,10 +809,7 @@ static void set_block_thresholds(const AV2_COMMON *cm, RD_OPT *rd) { clamp(av2_get_qindex(&cm->seg, segment_id, cm->quant_params.base_qindex, cm->seq_params.bit_depth) + cm->quant_params.y_dc_delta_q, - 0, - cm->seq_params.bit_depth == AVM_BITS_8 ? MAXQ_8_BITS - : cm->seq_params.bit_depth == AVM_BITS_10 ? MAXQ_10_BITS - : MAXQ_12_BITS); + 0, MAXQ_FOR_GIVEN_BIT_DEPTH(cm->seq_params.bit_depth)); const int q = compute_rd_thresh_factor( qindex, cm->seq_params.base_y_dc_delta_q, cm->seq_params.bit_depth); From 9992c357a401755f81d9e49cebea9f378a899d9e Mon Sep 17 00:00:00 2001 From: leolzhao Date: Mon, 27 Jul 2026 16:31:12 -0700 Subject: [PATCH 33/51] Fast method for AMVD with newmv mode (#5166) Add a tid based fast method for AMVD under newmv mode. The results are tested on top of commit 5c2906938fcc38504. Class A1 and A2 results are llisted below. ``` +---------+--------+--------+--------+--------+----------+ | Summary | Y | U | V | YUV | Enc-time | +---------+--------+--------+--------+--------+----------+ | A1 | 0.07% | -0.12% | -0.03% | 0.05% | 98.2% | | A2 | 0.06% | 00.14% | -0.24% | 0.05% | 97.9% | +---------+--------+--------+--------+--------+----------+ ``` STATS_CHANGED --- av2/encoder/rdopt.c | 7 +++++++ av2/encoder/speed_features.c | 2 ++ av2/encoder/speed_features.h | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 789d549e58..931917981b 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -9260,6 +9260,13 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, continue; } + if (sf->inter_sf.prune_amvd_newmv && + cm->current_frame.pyramid_level >= 4 && (mbmi->mode == NEWMV)) { + if (mbmi->use_amvd && search_state.best_mbmode.mode != mbmi->mode) { + continue; + } + } + // Skip single-ref NEWMV / WARP_NEWMV when prior-mode RD for this // ref frame is far from the best across all refs. See // prune_newmv_modes_by_prior_rd() for source selection and diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index a513df4470..955edb8e2d 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -383,6 +383,7 @@ static void set_good_speed_features_framesize_independent( // Cap the DRL depth for a fresh single-ref NEWMV search; reuse the // nearest searched result beyond the cap. sf->mv_sf.newmv_drl_search_limit = 2; + sf->inter_sf.prune_amvd_newmv = 1; sf->tx_sf.tx_type_search.skip_tx_search = 1; sf->tx_sf.tx_type_search.eob_adapt_skip_tx_search = true; @@ -800,6 +801,7 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->skip_mode_eval_based_on_rate_cost = 0; inter_sf->reuse_erp_mode_flag = 0; inter_sf->prune_warpmv_prob_thresh = 32; + inter_sf->prune_amvd_newmv = 0; inter_sf->enable_enhanced_inter_mode_cache_reuse = 0; } diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 706ff724eb..4ba658bd9e 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -766,6 +766,11 @@ typedef struct INTER_MODE_SPEED_FEATURES { // 0: original cache reuse logic. // 1: enhanced cache reuse logic (more modes are searched). int enable_enhanced_inter_mode_cache_reuse; + + // When set, skip AMVD evaluation for NEWMV if the + // current best mode is not the same mode as the one being evaluated, because + // AMVD on top of these modes is unlikely to win over the non-AMVD best mode. + int prune_amvd_newmv; } INTER_MODE_SPEED_FEATURES; typedef struct INTERP_FILTER_SPEED_FEATURES { From d4e4db6235f1e9c010eb79639bc481d17ef10d48 Mon Sep 17 00:00:00 2001 From: jadhuran Date: Mon, 27 Jul 2026 18:36:31 -0500 Subject: [PATCH 34/51] Skip AMVD modes for NEAR NEWMV, NEW NEARMV modes (#5167) Skip AMVD modes for NEAR NEWMV, NEW NEARMV, NEAR NEWMV OPFL and NEW NEARMV OPFL Skip AMVD modes when tid level is greater than 3 Results: Anchor: 0d25d5803a23907057f2ef018462425bc823a9c2 ``` +---------+-------+-------+--------+-------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+-------+-------+--------+-------+----------+----------+ | A1 | 0.06% | 0.09% | 0.17% | 0.07% | 97.6% | 99.7% | | A2 | 0.04% | 0.13% | -0.04% | 0.04% | 97.1% | 101.3% | +---------+-------+-------+--------+-------+----------+----------+ ``` --- av2/encoder/rdopt.c | 3 +++ av2/encoder/speed_features.c | 2 ++ av2/encoder/speed_features.h | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 931917981b..af935eb8de 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -9260,6 +9260,9 @@ void av2_rd_pick_inter_mode_sb(struct AV2_COMP *cpi, continue; } + if (sf->inter_sf.skip_amvd_new_near_near_new_modes && amvd_inverted && + mbmi->use_amvd && cm->current_frame.pyramid_level > 3) + continue; if (sf->inter_sf.prune_amvd_newmv && cm->current_frame.pyramid_level >= 4 && (mbmi->mode == NEWMV)) { if (mbmi->use_amvd && search_state.best_mbmode.mode != mbmi->mode) { diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 955edb8e2d..521ca04694 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -341,6 +341,7 @@ static void set_good_speed_features_framesize_independent( sf->inter_sf.prune_newmv_modes_using_prior_rd = 1; sf->inter_sf.share_motion_mode_prune_pool = 1; sf->inter_sf.prune_compound_using_single_ref = 1; + sf->inter_sf.skip_amvd_new_near_near_new_modes = 1; // TODO (Yeqing Wu): need to be tuned for speed > 1. sf->inter_sf.skip_compound_prune_top_refs_num_ref0 = 1; sf->inter_sf.skip_compound_prune_top_refs_num_ref1 = 2; @@ -777,6 +778,7 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->skip_repeated_full_newmv = 0; inter_sf->inter_mode_rd_model_estimation = 0; inter_sf->prune_compound_using_single_ref = 0; + inter_sf->skip_amvd_new_near_near_new_modes = 0; inter_sf->skip_compound_prune_top_refs_num_ref0 = 0; inter_sf->skip_compound_prune_top_refs_num_ref1 = 0; inter_sf->prune_refinemv_by_ref_idx = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 4ba658bd9e..92bd8a363e 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -656,6 +656,10 @@ typedef struct INTER_MODE_SPEED_FEATURES { // the single reference modes, it is one of the two best performers. int prune_compound_using_single_ref; + // skip amvd for new near and near new modes for both regular + // and opfl modes by tid + int skip_amvd_new_near_near_new_modes; + // Top-ref0 / top-ref1 cutoffs used inside the prune_compound_using_single_ref // pruning. Compound pairs with refs[0] < // skip_compound_prune_top_refs_num_ref0 AND refs[1] < From e77afc095b22784b9b499987c01e2e8ffd885e5b Mon Sep 17 00:00:00 2001 From: jadhuran Date: Tue, 28 Jul 2026 00:53:17 -0500 Subject: [PATCH 35/51] Add warp interintra in winner based on wrl index (#5164) Search warp interintra in rough mode when wrl index is greater than or equal to 2 Search warp interintra in winner mode for remaing wrl indices if warp interintra is selected in rough mode Search warp interintra in winner mode for warpmv with mvd flag if warp interintra is selected in rough mode with warpmv with mvd flag off Anchor: ef64fa8137f58586f3e4c1a8ffcb34872e7f3c0d Results: ``` +---------+-------+--------+-------+-------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+-------+--------+-------+-------+----------+----------+ | A1 | 0.07% | -0.01% | 0.23% | 0.07% | 97.6% | 100.1% | | A2 | 0.05% | -0.03% | 0.28% | 0.06% | 96.8% | 99.0% | +---------+-------+--------+-------+-------+----------+----------+ ``` --- av2/encoder/rdopt.c | 17 ++++++++++++++--- av2/encoder/speed_features.c | 2 ++ av2/encoder/speed_features.h | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index af935eb8de..954466216b 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -3341,6 +3341,14 @@ static int64_t motion_mode_rd( warp_inter_intra++) { for (int warp_ref_idx = 0; warp_ref_idx < warp_ref_idx_limit; warp_ref_idx++) { + // Search warp interintra in winner mode for remaing wrl indices + // if warp interintra is selected in rough mode + if (cpi->sf.inter_sf.enable_warp_inter_intra_in_winner && + (eval_motion_mode != (warp_inter_intra && warp_ref_idx < 2))) + continue; + assert(IMPLIES(cpi->sf.inter_sf.enable_warp_inter_intra_in_winner && + !eval_motion_mode, + (!warp_inter_intra || warp_ref_idx >= 2))); for (int warpmv_with_mvd_flag = 0; warpmv_with_mvd_flag < 2; warpmv_with_mvd_flag++) { const MotionModeTrialParams trial = { @@ -8443,10 +8451,13 @@ static const unsigned int num_winner_motion_modes[3] = { 0, 10, 6 }; // Returns true if a mode is added to the winner mode check. static AVM_INLINE int is_check_in_winner(const AV2_COMP *cpi, const MB_MODE_INFO *const mbmi) { - if (!cpi->sf.inter_sf.enable_six_param_warp_in_winner_mode) return 0; PREDICTION_MODE this_mode = mbmi->mode; - - if (this_mode == WARP_NEWMV) return 1; + if (cpi->sf.inter_sf.enable_six_param_warp_in_winner_mode) { + if (this_mode == WARP_NEWMV) return 1; + } + if (cpi->sf.inter_sf.enable_warp_inter_intra_in_winner) { + if (this_mode == WARPMV && mbmi->warp_inter_intra) return 1; + } return 0; } // Adds a motion mode to the candidate list for motion_mode_for_winner_cand diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 521ca04694..425e40f86e 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -394,6 +394,7 @@ static void set_good_speed_features_framesize_independent( sf->tx_sf.adaptive_tcq_threshold_qidx = 185; sf->inter_sf.enable_enhanced_inter_mode_cache_reuse = 1; sf->inter_sf.skip_temporary_pred_for_opfl = 1; + sf->inter_sf.enable_warp_inter_intra_in_winner = 1; // Enable the optimized inter-SDP fast method (requires >=1 intra coded // block, prunes when inter-mode ratio exceeds 50%, and early skips when @@ -756,6 +757,7 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->adaptive_rd_thresh = 0; inter_sf->model_based_post_interp_filter_breakout = 0; inter_sf->skip_temporary_pred_for_opfl = 0; + inter_sf->enable_warp_inter_intra_in_winner = 0; inter_sf->reduce_inter_modes = 0; inter_sf->alt_ref_search_fp = 0; inter_sf->disable_switchable_refinemv = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 92bd8a363e..9b79d50fc3 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -745,7 +745,8 @@ typedef struct INTER_MODE_SPEED_FEATURES { // skip temporary predictions for opfl modes int skip_temporary_pred_for_opfl; - + // Enable warp inter intra in winner mode. + int enable_warp_inter_intra_in_winner; // Reuse compound type rd decision when exact match is found // 0: No reuse // 1: Reuse the compound type rd data From a19079e66337d2aa6a8367d69a33655d8b8a8727 Mon Sep 17 00:00:00 2001 From: Mudassir Galaganath Date: Tue, 28 Jul 2026 21:36:10 +0530 Subject: [PATCH 36/51] Improve readability of search_tx_type() (#5160) - Abstract distortion calculation into helper function get_tx_blk_distortion() returning RD_STATS. - Introduce get_ist_max_set_id() and get_ist_set_id() helper functions. - Improve readability of prune_rectangular_tx_type() by removing redundant tx_mask_32[][] lookup table. - Eliminate redundant call to av2_get_ext_tx_set_type() in search_tx_type() by reusing txfm_param.tx_set_type. - Add early loop exit for FSC mode when transform dimensions exceed FSC_MAXWIDTH / FSC_MAXHEIGHT on luma plane. No stats changed. --- av2/encoder/tx_search.c | 331 ++++++++++++++++++++++------------------ av2/encoder/tx_search.h | 3 + 2 files changed, 182 insertions(+), 152 deletions(-) diff --git a/av2/encoder/tx_search.c b/av2/encoder/tx_search.c index 8ba4d22809..0fd431cb61 100644 --- a/av2/encoder/tx_search.c +++ b/av2/encoder/tx_search.c @@ -1713,11 +1713,17 @@ static void prune_tx_2D(MACROBLOCK *x, BLOCK_SIZE bsize, TX_SIZE tx_size, *allowed_tx_mask = allow_bitmask; } -static INLINE uint16_t +static AVM_INLINE uint16_t get_tx_mask(const AV2_COMP *cpi, MACROBLOCK *x, int plane, int block, int blk_row, int blk_col, BLOCK_SIZE plane_bsize, TX_SIZE tx_size, const TXB_CTX *const txb_ctx, FAST_TX_SEARCH_MODE ftxs_mode, - int64_t ref_best_rd, TX_TYPE *allowed_txk_types, int *txk_map) { + int64_t ref_best_rd, int dc_only_blk, TX_TYPE *allowed_txk_types, + int *txk_map) { + if (dc_only_blk) { + *allowed_txk_types = DCT_DCT; + return ALLOW_TX_MASK(DCT_DCT); + } + const AV2_COMMON *cm = &cpi->common; MACROBLOCKD *xd = &x->e_mbd; MB_MODE_INFO *mbmi = xd->mi[0]; @@ -2146,6 +2152,41 @@ static AVM_INLINE bool prune_tx_search_by_eob( return false; } +// Returns the maximum number of IST set candidates to evaluate based on block +// properties. +static AVM_INLINE int get_ist_max_set_id(bool skip_stx, bool is_inter, int txw, + int txh, TX_TYPE primary_tx_type) { + if (skip_stx || is_inter) return 1; + const int max_set_id_ptx_type[4] = { IST_REDUCED_SEARCH_SET_SIZE, 1, 1, + IST_REDUCED_SET_SIZE }; + assert(primary_tx_type == DCT_DCT || primary_tx_type == ADST_ADST); + assert(IST_REDUCED_SEARCH_SET_SIZE <= IST_SET_SIZE); + return (txw < 8 || txh < 8) ? IST_REDUCED_SEARCH_SET_SIZE + : max_set_id_ptx_type[primary_tx_type]; +} + +// Maps candidate search set index to the actual IST set ID. +static AVM_INLINE uint8_t get_ist_set_id(int set_idx, bool is_inter, + PREDICTION_MODE intra_mode, int txw, + int txh, TX_TYPE primary_tx_type) { + if (is_inter) return (uint8_t)set_idx; + + const PREDICTION_MODE mode = AVMMIN(intra_mode, SMOOTH_H_PRED); + const int intra_stx_mode = stx_transpose_mapping[mode]; + if (txw < 8 || txh < 8) { + assert(set_idx < IST_REDUCED_SEARCH_SET_SIZE); + return ist_intra_stx_mapping[intra_stx_mode][set_idx]; + } else { + assert((primary_tx_type == DCT_DCT) ? set_idx < IST_REDUCED_SEARCH_SET_SIZE + : (primary_tx_type == ADST_ADST) ? set_idx < IST_REDUCED_SET_SIZE + : !set_idx); + if (primary_tx_type == ADST_ADST) + return ist_intra_stx_mapping_ADST_ADST[intra_stx_mode][set_idx]; + else + return ist_intra_stx_mapping[intra_stx_mode][set_idx]; + } +} + // Prune rectangular transform types for 32xN/Nx32 and 64xN/Nx64 blocks. static AVM_INLINE bool prune_rectangular_tx_type( int tx_idx, TxSetType tx_set_type, int plane, bool is_fsc, @@ -2153,12 +2194,6 @@ static AVM_INLINE bool prune_rectangular_tx_type( TX_TYPE *const primary_tx_type, TX_TYPE *const best_long_side_tx_type) { if (tx_set_type == EXT_TX_SET_LONG_SIDE_32 && plane == AVM_PLANE_Y && !is_fsc) { - // tx_mask_32[0:is_rect_horz==false, 1: is_rect_horz==true][0: - // long_side_tx_type==DCT_DCT: 1: long_side_tx_type==Identity] - const uint16_t tx_mask_32[2][2] = { - { 0x0425 & allowed_tx_mask, 0xAA00 & allowed_tx_mask }, - { 0x0813 & allowed_tx_mask, 0x5600 & allowed_tx_mask } - }; const TX_TYPE txk_map_rect_horz_32[TX_TYPES] = { DCT_DCT, V_DCT, ADST_DCT, DCT_ADST, ADST_ADST, FLIPADST_DCT, DCT_FLIPADST, FLIPADST_FLIPADST, @@ -2174,14 +2209,23 @@ static AVM_INLINE bool prune_rectangular_tx_type( assert(tx_idx < TX_TYPES); *primary_tx_type = is_rect_horz ? txk_map_rect_horz_32[tx_idx] : txk_map_rect_vert_32[tx_idx]; - if (tx_idx == 2) { + + if (tx_idx == 2) *best_long_side_tx_type = get_primary_tx_type(best_tx_type); - } - if (tx_idx > 1 && - tx_mask_32[is_rect_horz][*best_long_side_tx_type != DCT_DCT] != 0 && - (!(tx_mask_32[is_rect_horz][*best_long_side_tx_type != DCT_DCT] & - (1 << *primary_tx_type)))) { - return true; + + if (tx_idx >= 2) { + if (!(ALLOW_TX_MASK(*primary_tx_type) & allowed_tx_mask)) return true; + const TX_TYPE_1D best_long_side_1d = + is_rect_horz ? htx_tab[*best_long_side_tx_type] + : vtx_tab[*best_long_side_tx_type]; + const TX_TYPE_1D cand_long_side_1d = + is_rect_horz ? htx_tab[*primary_tx_type] : vtx_tab[*primary_tx_type]; + + // Prune the current transform if its long side doesn't match with best + // long side. + if (cand_long_side_1d != best_long_side_1d) { + return true; + } } } @@ -2200,6 +2244,65 @@ static AVM_INLINE bool prune_rectangular_tx_type( return false; } +// Calculate distortion for a given transform block +static AVM_INLINE RD_STATS get_tx_blk_distortion( + const AV2_COMP *cpi, MACROBLOCK *x, int plane, int block, int blk_row, + int blk_col, TX_SIZE tx_size, int64_t block_sse, int eob, int dc_only_blk, + int fsc_mode_in, int use_transform_domain_distortion) { + RD_STATS this_rd_stats; + av2_invalid_rd_stats(&this_rd_stats); + + if (eob == 0) { + // When eob is 0, pixel domain distortion is more efficient and + // accurate. + this_rd_stats.dist = this_rd_stats.sse = block_sse; + } else if (dc_only_blk || (fsc_mode_in && plane == AVM_PLANE_Y)) { + this_rd_stats.sse = block_sse; + this_rd_stats.dist = + dist_block_px_domain(cpi, x, plane, block, blk_row, blk_col, tx_size); + } else if (use_transform_domain_distortion) { + dist_block_tx_domain(x, plane, block, tx_size, &this_rd_stats.dist, + &this_rd_stats.sse); + } else { + int64_t sse_diff = INT64_MAX; + // high_energy threshold assumes that every pixel within a txfm block + // has a residue energy of at least 25% of the maximum, i.e. 128 * 128 + // for 8 bit. + const int64_t high_energy_thresh = + ((int64_t)128 * 128 * tx_size_2d[tx_size]); + const int is_high_energy = (block_sse >= high_energy_thresh); + if (tx_size == TX_64X64 || is_high_energy) { + // Because 3 out 4 quadrants of transform coefficients are forced to + // zero, the inverse transform has a tendency to overflow. sse_diff + // is effectively the energy of those 3 quadrants, here we use it + // to decide if we should do pixel domain distortion. If the energy + // is mostly in first quadrant, then it is unlikely that we have + // overflow issue in inverse transform. + dist_block_tx_domain(x, plane, block, tx_size, &this_rd_stats.dist, + &this_rd_stats.sse); + sse_diff = block_sse - this_rd_stats.sse; + } + + if (tx_size != TX_64X64 || !is_high_energy || + (sse_diff * 2) < this_rd_stats.sse) { + const int64_t tx_domain_dist = this_rd_stats.dist; + this_rd_stats.dist = + dist_block_px_domain(cpi, x, plane, block, blk_row, blk_col, tx_size); + // For high energy blocks, occasionally, the pixel domain distortion + // can be artificially low due to clamping at reconstruction stage + // even when inverse transform output is hugely different from the + // actual residue. + if (is_high_energy && this_rd_stats.dist < tx_domain_dist) + this_rd_stats.dist = tx_domain_dist; + } else { + assert(sse_diff < INT64_MAX); + this_rd_stats.dist += sse_diff; + } + this_rd_stats.sse = block_sse; + } + return this_rd_stats; +} + // Search for the best transform type for a given transform block. // This function can be used for both inter and intra, both luma and chroma. static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, @@ -2286,16 +2389,9 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, } // Bit mask to indicate which transform types are allowed in the RD search. - uint16_t tx_mask; - - // Use DCT_DCT transform for DC only block. - if (dc_only_blk) - tx_mask = 1 << DCT_DCT; - else - tx_mask = get_tx_mask(cpi, x, plane, block, blk_row, blk_col, plane_bsize, - tx_size, txb_ctx, ftxs_mode, ref_best_rd, - &txk_allowed, txk_map); - const uint16_t allowed_tx_mask = tx_mask; + const uint16_t allowed_tx_mask = get_tx_mask( + cpi, x, plane, block, blk_row, blk_col, plane_bsize, tx_size, txb_ctx, + ftxs_mode, ref_best_rd, dc_only_blk, &txk_allowed, txk_map); block_sse = ROUND_POWER_OF_TWO(block_sse, (xd->bd - 8) * 2); block_mse_q8 = ROUND_POWER_OF_TWO(block_mse_q8, (xd->bd - 8) * 2); @@ -2355,11 +2451,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, cpi->oxcf.q_cfg.quant_b_adapt, &quant_param); bool eob_found = false; - const TxSetType tx_set_type = av2_get_ext_tx_set_type( - tx_size, is_inter, cm->features.reduced_tx_set_used); - const bool is_rect_horz = txw > txh; - TX_TYPE best_long_side_tx_type = DCT_DCT; const int is_border_block = get_visible_dimensions( @@ -2372,8 +2464,13 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, const int max_eob = av2_get_max_eob(tx_size); // Iterate through all transform type candidates. for (int tx_idx = 0; tx_idx < TX_TYPES; ++tx_idx) { + if (is_fsc && (txw > FSC_MAXWIDTH || txh > FSC_MAXHEIGHT) && + plane == AVM_PLANE_Y) { + break; + } + TX_TYPE primary_tx_type = (TX_TYPE)txk_map[tx_idx]; - if (prune_rectangular_tx_type(tx_idx, tx_set_type, plane, is_fsc, + if (prune_rectangular_tx_type(tx_idx, txfm_param.tx_set_type, plane, is_fsc, is_rect_horz, allowed_tx_mask, best_tx_type, &primary_tx_type, &best_long_side_tx_type)) { continue; @@ -2389,10 +2486,6 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, } } - if (is_fsc && (txw > FSC_MAXWIDTH || txh > FSC_MAXHEIGHT) && - plane == AVM_PLANE_Y) { - break; - } const int skip_trellis_in = skip_trellis; av2_update_trellisq(!skip_trellis_in, skip_trellis_in ? xform_quant_b : AV2_XFORM_QUANT_FP, @@ -2407,65 +2500,46 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, (is_inter ? (primary_tx_type != DCT_DCT || txw < 16 || txh < 16) : intra_mode >= PAETH_PRED) || dc_only_blk || (eob_found) || !xd->enable_ist); - int init_set_id = 0; + bool skip_idx = false; - int max_set_id = (skip_stx || is_inter) ? 1 : IST_SET_SIZE; - int max_set_id_ptx_type[4] = { IST_REDUCED_SEARCH_SET_SIZE, 1, 1, - IST_REDUCED_SET_SIZE }; - if (max_set_id == IST_SET_SIZE) { - assert(primary_tx_type == DCT_DCT || primary_tx_type == ADST_ADST); - max_set_id = (txw < 8 || txh < 8) ? IST_REDUCED_SEARCH_SET_SIZE - : max_set_id_ptx_type[primary_tx_type]; - } - for (int set_idx = init_set_id; set_idx < max_set_id; ++set_idx) { + const int max_set_id = + get_ist_max_set_id(skip_stx, is_inter, txw, txh, primary_tx_type); + assert(max_set_id < IST_SET_SIZE); + + for (int set_idx = 0; set_idx < max_set_id; ++set_idx) { txfm_param.sec_tx_set_idx = set_idx; - uint8_t set_id = set_idx; - if (!is_inter) { - const PREDICTION_MODE mode = AVMMIN(intra_mode, SMOOTH_H_PRED); - int intra_stx_mode = stx_transpose_mapping[mode]; - if (txw < 8 || txh < 8) { - assert(set_idx < IST_REDUCED_SEARCH_SET_SIZE); - set_id = ist_intra_stx_mapping[intra_stx_mode][set_idx]; - } else { - assert((primary_tx_type == DCT_DCT || primary_tx_type == ADST_ADST) - ? set_idx < max_set_id_ptx_type[primary_tx_type] - : !set_idx); - if (primary_tx_type == ADST_ADST) - set_id = ist_intra_stx_mapping_ADST_ADST[intra_stx_mode][set_idx]; - else - set_id = ist_intra_stx_mapping[intra_stx_mode][set_idx]; - } - } + const uint8_t set_id = get_ist_set_id(set_idx, is_inter, intra_mode, txw, + txh, primary_tx_type); + const int max_stx = xd->enable_ist && !(eob_found) ? STX_TYPES : 1; const int init_stx = (set_idx > 0) ? 1 : 0; for (int stx = init_stx; stx < max_stx; ++stx) { - TX_TYPE tx_type = primary_tx_type; if (eob_found) skip_stx = true; - uint16_t stx_set = 0; - if (skip_stx && stx) continue; - set_secondary_tx_type(&tx_type, stx); + TX_TYPE packed_tx_type = primary_tx_type; + set_secondary_tx_type(&packed_tx_type, stx); txfm_param.tx_type = primary_tx_type; txfm_param.sec_tx_type = stx; - stx_set = (primary_tx_type == ADST_ADST && stx) ? set_id + IST_SET_SIZE - : set_id; - set_secondary_tx_set(&tx_type, stx_set); + const uint16_t stx_set = (primary_tx_type == ADST_ADST && stx) + ? set_id + IST_SET_SIZE + : set_id; + set_secondary_tx_set(&packed_tx_type, stx_set); txfm_param.sec_tx_set = stx_set; + if (txw < 8 || txh < 8) - assert(stx_set < IST_4x4_SET_SIZE); + assert(txfm_param.sec_tx_set < IST_4x4_SET_SIZE); else - assert(stx_set < IST_8x8_SET_SIZE); - assert(tx_type < (1 << (PRIMARY_TX_BITS + SECONDARY_TX_BITS + - SECONDARY_TX_SET_BITS))); + assert(txfm_param.sec_tx_set < IST_8x8_SET_SIZE); + assert(packed_tx_type < (1 << (PRIMARY_TX_BITS + SECONDARY_TX_BITS + + SECONDARY_TX_SET_BITS))); if (av2_use_qmatrix(&cm->quant_params, xd, mbmi->segment_id)) { - av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type, - &quant_param); + av2_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, + packed_tx_type, &quant_param); } - if (plane == AVM_PLANE_Y) xd->tx_type_map[tx_type_map_idx] = tx_type; - RD_STATS this_rd_stats; - av2_invalid_rd_stats(&this_rd_stats); + if (plane == AVM_PLANE_Y) + xd->tx_type_map[tx_type_map_idx] = packed_tx_type; int64_t sec_tx_sse_to_be_coded = INT64_MAX; int64_t *const sec_tx_sse_ptr = tx_sf->prune_tx_rd_eval_sec_tx_sse ? &sec_tx_sse_to_be_coded : NULL; @@ -2504,34 +2578,32 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, } } - const TX_CLASS tx_class = - tx_type_to_class[get_primary_tx_type(tx_type)]; - if (tcq_enable(cm->features.tcq_mode, is_lossless, plane, tx_class)) { + const TX_CLASS tx_class = tx_type_to_class[primary_tx_type]; + const bool use_tcq = tcq_enable(cpi->common.features.tcq_mode, + is_lossless, plane, tx_class); + if (use_tcq) { skip_trellis_based_on_satd[txfm_param.tx_type] = skip_trellis; - } else + } else { skip_trellis_based_on_satd[txfm_param.tx_type] = skip_trellis_opt_based_on_satd( x, &quant_param, plane, block, tx_size, cpi->oxcf.q_cfg.quant_b_adapt, qstep, txfm_params->coeff_opt_satd_threshold, skip_trellis_in, dc_only_blk); + } uint8_t fsc_mode_in = ((cm->seq_params.enable_fsc && is_fsc && plane == AVM_PLANE_Y) || - use_inter_fsc(cm, plane, tx_type, is_inter)); - int use_tcq = - tcq_enable(cpi->common.features.tcq_mode, - xd->lossless[xd->mi[0]->segment_id], plane, tx_class); + use_inter_fsc(cm, plane, packed_tx_type, is_inter)); const int use_tcq_deadzone_boost = use_tcq && quant_param.use_optimize_b && !fsc_mode_in && - cpi->sf.tx_sf.enable_adaptive_tcq_threshold && - cm->quant_params.base_qindex < - cpi->sf.tx_sf.adaptive_tcq_threshold_qidx; + tx_sf->enable_adaptive_tcq_threshold && + cm->quant_params.base_qindex < tx_sf->adaptive_tcq_threshold_qidx; av2_quant(use_tcq_deadzone_boost, x, plane, block, &txfm_param, &quant_param); + uint16_t *const eob = &mb_plane->eobs[block]; if (fsc_mode_in) { if (primary_tx_type == IDTX) { - uint16_t *const eob = &mb_plane->eobs[block]; if (*eob != 0) *eob = av2_get_max_eob(txfm_param.tx_size); } } @@ -2543,30 +2615,29 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // stx == 0 that quantized to all-zero can still win via skip // coding (bitstream signals the tx_type and elides the // coefficients). - uint16_t *const eob = &mb_plane->eobs[block]; if (prune_tx_search_by_eob(xd, blk_row, blk_col, tx_size, *eob, plane, is_inter, primary_tx_type, stx, &eob_found, tx_sf->prune_intra_ist_stx_by_zero_eob)) { continue; } if (fsc_mode_in && quant_param.use_optimize_b) { - av2_optimize_fsc(cpi, x, plane, block, tx_size, tx_type, txb_ctx, - &rate_cost); + av2_optimize_fsc(cpi, x, plane, block, tx_size, packed_tx_type, + txb_ctx, &rate_cost); } else if (quant_param.use_optimize_b) { - av2_optimize_b(cpi, x, plane, block, tx_size, tx_type, CCTX_NONE, - txb_ctx, &rate_cost); + av2_optimize_b(cpi, x, plane, block, tx_size, packed_tx_type, + CCTX_NONE, txb_ctx, &rate_cost); } else { - bool enable_parity_hiding = + const bool enable_parity_hiding = cm->features.allow_parity_hiding && !is_lossless && - plane == AVM_PLANE_Y && - ph_allowed_tx_types[get_primary_tx_type(tx_type)] && + plane == AVM_PLANE_Y && ph_allowed_tx_types[primary_tx_type] && (mb_plane->eobs[block] > PHTHRESH); if (enable_parity_hiding) - parity_hiding_trellis_off(cpi, x, plane, block, tx_size, tx_type); + parity_hiding_trellis_off(cpi, x, plane, block, tx_size, + packed_tx_type); rate_cost = - cost_coeffs(cm, x, plane, block, tx_size, tx_type, CCTX_NONE, - txb_ctx, cm->features.reduced_tx_set_used); + cost_coeffs(cm, x, plane, block, tx_size, packed_tx_type, + CCTX_NONE, txb_ctx, cm->features.reduced_tx_set_used); } // Post-trellis safety net: re-apply the same eob == 0 / eob == 1 // pre-skip logic in case trellis (RDOQ) adjusted the eob across @@ -2581,54 +2652,10 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // terminate early. if (RDCOST(x->rdmult, rate_cost, 0) > best_rd) continue; - // Calculate distortion. - if (eobs_ptr[block] == 0) { - // When eob is 0, pixel domain distortion is more efficient and - // accurate. - this_rd_stats.dist = this_rd_stats.sse = block_sse; - } else if (dc_only_blk || (fsc_mode_in && plane == AVM_PLANE_Y)) { - this_rd_stats.sse = block_sse; - this_rd_stats.dist = dist_block_px_domain(cpi, x, plane, block, - blk_row, blk_col, tx_size); - } else if (use_transform_domain_distortion) { - dist_block_tx_domain(x, plane, block, tx_size, &this_rd_stats.dist, - &this_rd_stats.sse); - } else { - int64_t sse_diff = INT64_MAX; - // High_energy threshold assumes that every pixel within a txfm block - // has a residue energy of at least 25% of the maximum, i.e. 128 * 128 - // for 8 bit. - const int64_t high_energy_thresh = - ((int64_t)128 * 128 * tx_size_2d[tx_size]); - const int is_high_energy = (block_sse >= high_energy_thresh); - if (tx_size == TX_64X64 || is_high_energy) { - // Because 3 out 4 quadrants of transform coefficients are forced to - // zero, the inverse transform has a tendency to overflow. sse_diff - // is effectively the energy of those 3 quadrants, here we use it - // to decide if we should do pixel domain distortion. If the energy - // is mostly in first quadrant, then it is unlikely that we have - // overflow issue in inverse transform. - dist_block_tx_domain(x, plane, block, tx_size, &this_rd_stats.dist, - &this_rd_stats.sse); - sse_diff = block_sse - this_rd_stats.sse; - } - if (tx_size != TX_64X64 || !is_high_energy || - (sse_diff * 2) < this_rd_stats.sse) { - const int64_t tx_domain_dist = this_rd_stats.dist; - this_rd_stats.dist = dist_block_px_domain( - cpi, x, plane, block, blk_row, blk_col, tx_size); - // For high energy blocks, occasionally, the pixel domain distortion - // can be artificially low due to clamping at reconstruction stage - // even when inverse transform output is hugely different from the - // actual residue. - if (is_high_energy && this_rd_stats.dist < tx_domain_dist) - this_rd_stats.dist = tx_domain_dist; - } else { - assert(sse_diff < INT64_MAX); - this_rd_stats.dist += sse_diff; - } - this_rd_stats.sse = block_sse; - } + RD_STATS this_rd_stats = get_tx_blk_distortion( + cpi, x, plane, block, blk_row, blk_col, tx_size, block_sse, + eobs_ptr[block], dc_only_blk, fsc_mode_in, + use_transform_domain_distortion); this_rd_stats.rate = rate_cost; @@ -2642,7 +2669,7 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, if (rd < best_rd) { best_rd = rd; *best_rd_stats = this_rd_stats; - best_tx_type = tx_type; + best_tx_type = packed_tx_type; best_txb_ctx = mb_plane->txb_entropy_ctx[block]; best_eob = mb_plane->eobs[block]; // Swap dqcoeff buffers. @@ -2654,13 +2681,13 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, #if CONFIG_COLLECT_RD_STATS == 1 if (plane == AVM_PLANE_Y) { PrintTransformUnitStats(cpi, x, &this_rd_stats, blk_row, blk_col, - plane_bsize, tx_size, tx_type, rd); + plane_bsize, tx_size, packed_tx_type, rd); } #endif // CONFIG_COLLECT_RD_STATS == 1 #if COLLECT_TX_SIZE_DATA - collect_tx_size_data(cpi, x, plane, blk_row, blk_col, plane_bsize, - tx_size, tx_type, rd); + record_tx_type_info(cpi, x, plane, block, plane_bsize, blk_row, blk_col, + tx_size, packed_tx_type, rd); #endif // COLLECT_TX_SIZE_DATA assert(tx_sf->adaptive_tx_type_search_idx < 6); diff --git a/av2/encoder/tx_search.h b/av2/encoder/tx_search.h index ccc316d6ba..8b804983f3 100644 --- a/av2/encoder/tx_search.h +++ b/av2/encoder/tx_search.h @@ -25,6 +25,9 @@ extern "C" { // Set this macro as 1 to collect data about tx size selection. #define COLLECT_TX_SIZE_DATA 0 +// Convert a transform type enum into a bitmask flag. +#define ALLOW_TX_MASK(tx) (1 << (tx)) + #if COLLECT_TX_SIZE_DATA #include #include "av2/encoder/random.h" From e0bac90e4051ce455bead1df85c41e6e08ce1192 Mon Sep 17 00:00:00 2001 From: Yixin Du Date: Tue, 28 Jul 2026 09:55:40 -0700 Subject: [PATCH 37/51] MLP intra mode pruning (#5162) * MLP intra mode pruning Replace HOG-based directional mode pruning with an MLP that predicts the top-5 most likely luma intra base modes per block. The 4-layer network (104->128->64->32->13) takes an 8x8 downsampled source patch, neighbor modes, QP, block size, and a 32-bin HOG histogram as inputs. Active in both all-intra (AI) and inter (RA/LD) frames; falls back to HOG for 4x4, 4x8, and 8x4 blocks. Enabled at speed >= 1 via sf.intra_sf.intra_pruning_with_mlp. Anchor: commit b4e5915 Performance of this change in isolation, Speed 1 (cpu-used=1), FG16 CTC (33 frames): AI: ``` +------------+-------+-------+-------+-------+---------+---------+ | Class | Y | Cb | Cr | wAvg | EncWall | DecWall | +------------+-------+-------+-------+-------+---------+---------+ | A1 | 0.14 | 0.05 | -0.02 | 0.13 | 91 | 101 | | A2 | 0.17 | 0.06 | -0.03 | 0.15 | 90 | 99 | +------------+-------+-------+-------+-------+---------+---------+ | Avg w/o B2 | 0.17 | -0.02 | 0.07 | 0.16 | 90 | 101 | +------------+-------+-------+-------+-------+---------+---------+ ``` RA: ``` +------------+-------+-------+-------+-------+---------+---------+ | Class | Y | Cb | Cr | wAvg | EncWall | DecWall | +------------+-------+-------+-------+-------+---------+---------+ | A1 | 0.13 | 0.17 | -0.58 | 0.09 | 97 | 100 | | A2 | 0.11 | 0.04 | 0.05 | 0.10 | 96 | 100 | +------------+-------+-------+-------+-------+---------+---------+ | Avg w/o B2 | 0.03 | 0.03 | -0.32 | 0.01 | 96 | 100 | +------------+-------+-------+-------+-------+---------+---------+ ``` STATS_CHANGED --- av2/av2.cmake | 6 + av2/common/av2_rtcd_defs.pl | 5 + av2/encoder/arm/neon/intra_mode_mlp_neon.c | 46 + av2/encoder/intra_mode_mlp.c | 140 + av2/encoder/intra_mode_mlp.h | 39 + av2/encoder/intra_mode_mlp_weights.h | 6063 ++++++++++++++++++++ av2/encoder/intra_mode_search.c | 128 +- av2/encoder/intra_mode_search.h | 34 +- av2/encoder/rdopt.c | 26 + av2/encoder/speed_features.c | 2 + av2/encoder/speed_features.h | 4 + av2/encoder/x86/intra_mode_mlp_avx2.c | 56 + av2/encoder/x86/intra_mode_mlp_sse2.c | 46 + test/av2_intra_mlp_layer_test.cc | 110 + test/intra_mode_mlp_test.cc | 239 + test/test.cmake | 2 + 16 files changed, 6925 insertions(+), 21 deletions(-) create mode 100644 av2/encoder/arm/neon/intra_mode_mlp_neon.c create mode 100644 av2/encoder/intra_mode_mlp.c create mode 100644 av2/encoder/intra_mode_mlp.h create mode 100644 av2/encoder/intra_mode_mlp_weights.h create mode 100644 av2/encoder/x86/intra_mode_mlp_avx2.c create mode 100644 av2/encoder/x86/intra_mode_mlp_sse2.c create mode 100644 test/av2_intra_mlp_layer_test.cc create mode 100644 test/intra_mode_mlp_test.cc diff --git a/av2/av2.cmake b/av2/av2.cmake index 3a3d95266d..5ed3a4a650 100644 --- a/av2/av2.cmake +++ b/av2/av2.cmake @@ -291,6 +291,9 @@ list( "${AVM_ROOT}/av2/encoder/intra_mode_search.c" "${AVM_ROOT}/av2/encoder/intra_mode_search.h" "${AVM_ROOT}/av2/encoder/intra_mode_search_utils.h" + "${AVM_ROOT}/av2/encoder/intra_mode_mlp.c" + "${AVM_ROOT}/av2/encoder/intra_mode_mlp.h" + "${AVM_ROOT}/av2/encoder/intra_mode_mlp_weights.h" "${AVM_ROOT}/av2/encoder/wedge_utils.c" "${AVM_ROOT}/av2/encoder/av2_noise_estimate.c" "${AVM_ROOT}/av2/encoder/av2_noise_estimate.h" @@ -396,6 +399,7 @@ list( "${AVM_ROOT}/av2/encoder/x86/encodetxb_sse2.c" "${AVM_ROOT}/av2/encoder/x86/highbd_block_error_intrin_sse2.c" "${AVM_ROOT}/av2/encoder/x86/highbd_temporal_filter_sse2.c" + "${AVM_ROOT}/av2/encoder/x86/intra_mode_mlp_sse2.c" "${AVM_ROOT}/av2/encoder/x86/model_rd_sse2.c" "${AVM_ROOT}/av2/encoder/x86/wedge_utils_sse2.c") @@ -419,6 +423,7 @@ list( "${AVM_ROOT}/av2/encoder/x86/highbd_fwd_txfm_avx2.c" "${AVM_ROOT}/av2/encoder/x86/wedge_utils_avx2.c" "${AVM_ROOT}/av2/encoder/x86/encodetxb_avx2.c" + "${AVM_ROOT}/av2/encoder/x86/intra_mode_mlp_avx2.c" "${AVM_ROOT}/av2/encoder/x86/rdopt_avx2.c" "${AVM_ROOT}/av2/encoder/x86/pickrst_avx2.c") @@ -426,6 +431,7 @@ list( APPEND AVM_AV2_ENCODER_INTRIN_NEON "${AVM_ROOT}/av2/encoder/arm/neon/ml_neon.c" + "${AVM_ROOT}/av2/encoder/arm/neon/intra_mode_mlp_neon.c" "${AVM_ROOT}/av2/encoder/arm/neon/rdopt_neon.c" "${AVM_ROOT}/av2/encoder/arm/neon/encodetxb_neon.c" "${AVM_ROOT}/av2/encoder/arm/neon/hybrid_fwd_txfm_neon.c") diff --git a/av2/common/av2_rtcd_defs.pl b/av2/common/av2_rtcd_defs.pl index a92d1ee256..497298ad04 100644 --- a/av2/common/av2_rtcd_defs.pl +++ b/av2/common/av2_rtcd_defs.pl @@ -310,6 +310,11 @@ () if (avm_config("CONFIG_EXCLUDE_SIMD_MISMATCH") ne "yes") { specialize qw/av2_nn_predict sse3 neon/; } + + add_proto qw/void av2_intra_mlp_layer/, " const float *input, int in_dim, const float *weights, const float *bias, float *output, int out_dim, int apply_relu"; + if (avm_config("CONFIG_EXCLUDE_SIMD_MISMATCH") ne "yes") { + specialize qw/av2_intra_mlp_layer sse2 avx2 neon/; + } } # end encoder functions diff --git a/av2/encoder/arm/neon/intra_mode_mlp_neon.c b/av2/encoder/arm/neon/intra_mode_mlp_neon.c new file mode 100644 index 0000000000..0118564f85 --- /dev/null +++ b/av2/encoder/arm/neon/intra_mode_mlp_neon.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include + +#include "config/av2_rtcd.h" + +// Processes 4 output neurons at a time. Assumes out_dim is a multiple of 4, +// true for all layer sizes this is called with (MLP_H1/H2/H3_DIM). +void av2_intra_mlp_layer_neon(const float *input, int in_dim, + const float *weights, const float *bias, + float *output, int out_dim, int apply_relu) { + for (int i = 0; i < out_dim; i += 4) { + float32x4_t sum0 = vld1q_f32(&bias[i]); + float32x4_t sum1 = vdupq_n_f32(0.0f); + int j = 0; + for (; j + 1 < in_dim; j += 2) { + float32x4_t w0 = vld1q_f32(&weights[(j + 0) * out_dim + i]); + float32x4_t w1 = vld1q_f32(&weights[(j + 1) * out_dim + i]); + float32x4_t f0 = vdupq_n_f32(input[j + 0]); + float32x4_t f1 = vdupq_n_f32(input[j + 1]); + sum0 = vmlaq_f32(sum0, f0, w0); + sum1 = vmlaq_f32(sum1, f1, w1); + } + sum0 = vaddq_f32(sum0, sum1); + for (; j < in_dim; j++) { + float32x4_t w = vld1q_f32(&weights[j * out_dim + i]); + float32x4_t f = vdupq_n_f32(input[j]); + sum0 = vmlaq_f32(sum0, f, w); + } + if (apply_relu) { + float32x4_t zero = vdupq_n_f32(0.0f); + sum0 = vmaxq_f32(sum0, zero); + } + vst1q_f32(&output[i], sum0); + } +} diff --git a/av2/encoder/intra_mode_mlp.c b/av2/encoder/intra_mode_mlp.c new file mode 100644 index 0000000000..61757dfcc5 --- /dev/null +++ b/av2/encoder/intra_mode_mlp.c @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2024, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this file, you can obtain it at + * aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include + +#include "avm_dsp/avm_dsp_common.h" + +#include "av2/encoder/intra_mode_mlp.h" +#include "av2/encoder/intra_mode_mlp_weights.h" + +#include "config/av2_rtcd.h" + +void intra_mode_mlp_prepare_features( + const uint16_t *src, int src_stride, int bd, int bw, int bh, int qp, + int neighbor_above_mode, int neighbor_above_delta, int neighbor_left_mode, + int neighbor_left_delta, int is_inter_frame, float *features) { + const float pixel_norm = (float)((1 << bd) - 1); + + // Nearest-neighbor downsample to 8x8 + for (int r = 0; r < 8; r++) { + const int src_r = (r * bh) >> 3; + for (int c = 0; c < 8; c++) { + const int src_c = (c * bw) >> 3; + features[r * 8 + c] = (float)src[src_r * src_stride + src_c] / pixel_norm; + } + } + + // Neighbor mode features (normalized) + int above_mode = (neighbor_above_mode < 0) ? 13 : neighbor_above_mode; + int left_mode = (neighbor_left_mode < 0) ? 13 : neighbor_left_mode; + int above_delta = (neighbor_above_mode < 0) ? 0 : neighbor_above_delta; + int left_delta = (neighbor_left_mode < 0) ? 0 : neighbor_left_delta; + + features[64] = (float)above_mode / MLP_NORM_NEIGHBOR_MODE; + features[65] = + ((float)above_delta + MLP_NORM_DELTA_OFFSET) / MLP_NORM_DELTA_RANGE; + features[66] = (float)left_mode / MLP_NORM_NEIGHBOR_MODE; + features[67] = + ((float)left_delta + MLP_NORM_DELTA_OFFSET) / MLP_NORM_DELTA_RANGE; + + // Block size and QP (normalized) + features[68] = (float)bw / MLP_NORM_BW; + features[69] = (float)bh / MLP_NORM_BH; + features[70] = (float)qp / MLP_NORM_QP; + + // is_inter_frame flag (binary, no normalization) + features[71] = (float)is_inter_frame; + + // HOG 32-bin histogram, appended after the 72 base features above. + float *hog = &features[72]; + for (int i = 0; i < 32; i++) hog[i] = 0.0f; + float hog_total = 0.1f; + for (int r = 1; r < bh - 1; r++) { + for (int c = 1; c < bw - 1; c++) { + const int idx_center = r * src_stride + c; + const int dx = + (int)src[idx_center + 1 - src_stride] + 2 * (int)src[idx_center + 1] + + (int)src[idx_center + 1 + src_stride] - + (int)src[idx_center - 1 - src_stride] - 2 * (int)src[idx_center - 1] - + (int)src[idx_center - 1 + src_stride]; + const int dy = (int)src[idx_center + src_stride - 1] + + 2 * (int)src[idx_center + src_stride] + + (int)src[idx_center + src_stride + 1] - + (int)src[idx_center - src_stride - 1] - + 2 * (int)src[idx_center - src_stride] - + (int)src[idx_center - src_stride + 1]; + if (dx == 0 && dy == 0) continue; + const int mag = abs(dx) + abs(dy); + hog_total += mag; + if (dx == 0) { + hog[0] += mag / 2; + hog[31] += mag / 2; + } else { + float angle = atan2f((float)dy, (float)dx); + if (angle < 0) angle += 3.14159265f; + int bin = (int)(angle * 32.0f / 3.14159265f); + if (bin >= 32) bin = 31; + if (bin < 0) bin = 0; + hog[bin] += mag; + } + } + } + for (int i = 0; i < 32; i++) hog[i] /= hog_total; +} + +// Scalar reference implementation of one fully-connected layer. +void av2_intra_mlp_layer_c(const float *input, int in_dim, const float *weights, + const float *bias, float *output, int out_dim, + int apply_relu) { + for (int i = 0; i < out_dim; i++) { + float sum = bias[i]; + for (int j = 0; j < in_dim; j++) sum += input[j] * weights[j * out_dim + i]; + output[i] = apply_relu ? AVMMAX(sum, 0.0f) : sum; + } +} + +void intra_mode_mlp_predict(const float *features, float *logits) { + float h1[MLP_H1_DIM], h2[MLP_H2_DIM], h3[MLP_H3_DIM]; + av2_intra_mlp_layer(features, MLP_INPUT_DIM, mlp_w1, mlp_b1, h1, MLP_H1_DIM, + 1); + av2_intra_mlp_layer(h1, MLP_H1_DIM, mlp_w2, mlp_b2, h2, MLP_H2_DIM, 1); + av2_intra_mlp_layer(h2, MLP_H2_DIM, mlp_w3, mlp_b3, h3, MLP_H3_DIM, 1); + // Layer 4: output dim=13, not a multiple of the SIMD widths above — scalar. + for (int i = 0; i < MLP_OUTPUT_DIM; i++) { + float sum = mlp_b4[i]; + for (int j = 0; j < MLP_H3_DIM; j++) + sum += h3[j] * mlp_w4[j * MLP_OUTPUT_DIM + i]; + logits[i] = sum; + } +} + +void intra_mode_mlp_get_topk(const float *logits, int k, int *modes) { + uint8_t used[MLP_OUTPUT_DIM] = { 0 }; + for (int t = 0; t < k; t++) { + float best_val = -1e30f; + int best_idx = -1; + for (int i = 0; i < MLP_OUTPUT_DIM; i++) { + if (used[i]) continue; + // First unused index is a NaN-safe fallback: logits[i] > best_val is + // always false when logits[i] is NaN, so without this best_idx could + // otherwise stay unset (or, previously, default to an already-used 0). + if (best_idx < 0) best_idx = i; + if (logits[i] > best_val) { + best_val = logits[i]; + best_idx = i; + } + } + modes[t] = best_idx; + used[best_idx] = 1; + } +} diff --git a/av2/encoder/intra_mode_mlp.h b/av2/encoder/intra_mode_mlp.h new file mode 100644 index 0000000000..15132f80a2 --- /dev/null +++ b/av2/encoder/intra_mode_mlp.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this file, you can obtain it at + * aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#ifndef AV2_ENCODER_INTRA_MODE_MLP_H_ +#define AV2_ENCODER_INTRA_MODE_MLP_H_ + +#include + +#include "av2/encoder/intra_mode_mlp_weights.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Fills all MLP_INPUT_DIM (104) features: 64 downsampled pixels, 4 neighbor +// mode/delta, 3 size/QP, 1 is_inter_frame flag, and a 32-bin HOG histogram. +void intra_mode_mlp_prepare_features( + const uint16_t *src, int src_stride, int bd, int bw, int bh, int qp, + int neighbor_above_mode, int neighbor_above_delta, int neighbor_left_mode, + int neighbor_left_delta, int is_inter_frame, float *features); + +void intra_mode_mlp_predict(const float *features, float *logits); + +void intra_mode_mlp_get_topk(const float *logits, int k, int *modes); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // AV2_ENCODER_INTRA_MODE_MLP_H_ diff --git a/av2/encoder/intra_mode_mlp_weights.h b/av2/encoder/intra_mode_mlp_weights.h new file mode 100644 index 0000000000..40b7270e5a --- /dev/null +++ b/av2/encoder/intra_mode_mlp_weights.h @@ -0,0 +1,6063 @@ +#ifndef INTRA_MODE_MLP_WEIGHTS_H +#define INTRA_MODE_MLP_WEIGHTS_H + +#define MLP_INPUT_DIM 104 +#define MLP_H1_DIM 128 +#define MLP_H2_DIM 64 +#define MLP_H3_DIM 32 +#define MLP_OUTPUT_DIM 13 +#define MLP_TOP_K 5 + +#define MLP_NORM_BW 128.0f +#define MLP_NORM_BH 128.0f +#define MLP_NORM_QP 255.0f +#define MLP_NORM_NEIGHBOR_MODE 13.0f +#define MLP_NORM_DELTA_OFFSET 3.0f +#define MLP_NORM_DELTA_RANGE 6.0f + +static const float mlp_w1[13312] = { + 0.17737798f, -0.1561107f, -0.013872765f, -0.0055373209f, + -0.53413951f, 0.076213501f, -0.061730616f, -0.028927729f, + -1.2440031f, -0.038547136f, 0.02111572f, 0.14673002f, + -0.83307439f, 0.10184125f, -0.43235195f, -0.0092930067f, + 0.30972514f, 1.831935f, -0.29676157f, 0.41224214f, + 1.4357947f, 0.06483914f, 0.20389302f, 0.1615268f, + -0.85993528f, -0.40446055f, 0.10356506f, 0.055708788f, + -0.11757834f, -0.50345427f, -0.75764674f, 0.11190297f, + -0.18862733f, 0.65100306f, 0.07679186f, 0.014537814f, + 0.19257659f, -0.19064981f, 0.045883354f, -0.0020593673f, + -0.10618062f, 0.73559809f, -0.20703243f, 0.10023515f, + -0.26876986f, -0.0047572553f, -0.050980464f, -0.13829954f, + 0.38159737f, 0.45210293f, -0.043461289f, -0.0075368173f, + 0.74155438f, 0.031956788f, 0.007025429f, 0.0032351357f, + 0.77250767f, 0.034152661f, 0.058898356f, -0.28023592f, + -0.10500064f, 0.0022570542f, -0.085772678f, -0.014561569f, + -0.055529982f, 0.11289185f, -0.32911849f, 0.56219983f, + 0.014043358f, -0.17800553f, 0.53773707f, -0.59729356f, + -0.059340432f, -0.049359154f, -0.044825643f, -0.014257497f, + 0.51902872f, 0.32219008f, -0.068632193f, 1.2133563f, + 0.083967231f, -0.0018024718f, -0.32353196f, -1.7328943f, + 0.89117992f, -1.1684462f, -0.59873551f, 0.017621636f, + 1.6599392f, -0.19513693f, 0.24721965f, 0.52598459f, + -1.9297857f, 0.95894879f, -0.55910289f, 0.22213544f, + -0.28185597f, -0.18776117f, 0.0016202215f, 0.0064618387f, + -0.030228604f, -0.3437334f, 0.17622325f, 0.47328109f, + 0.18824351f, 0.029583074f, 0.540631f, -0.093755595f, + -0.015510612f, 0.052101959f, -0.19369963f, 0.0063542794f, + 0.057250127f, -0.030848579f, 0.030420249f, -0.028051406f, + 0.65731174f, 0.020911399f, -1.0347539f, 0.26916376f, + 0.025774412f, 0.68601185f, 0.13106222f, -0.17248201f, + 0.99018764f, -0.061417542f, 0.0041520824f, 0.0040060775f, + 1.1100454f, 0.031893671f, -0.011769726f, 0.029926004f, + 0.004938337f, 0.5100832f, 0.19934863f, 0.041691933f, + 0.73097426f, -0.0044808858f, 0.0054330179f, 0.25520211f, + -0.56242436f, -0.024162525f, 0.41960722f, -0.016784448f, + -0.060247485f, 0.11156812f, -0.13575847f, -0.031994376f, + -0.28611368f, -0.18525158f, -0.4347882f, 0.14978234f, + 0.29457676f, 0.9650808f, 0.32974771f, -0.19416237f, + -0.1347536f, 0.18883407f, 0.44633138f, 0.026742944f, + -0.62288058f, 0.10422551f, -0.018461939f, -0.12256289f, + -0.055831417f, 0.13498937f, -0.085893936f, 0.010586221f, + 0.0069736619f, 0.44289505f, 0.092022464f, 0.2726056f, + 0.080857642f, -0.84575403f, 0.068345271f, 0.18591359f, + 0.26526532f, -0.0031543446f, 0.031470928f, 0.039250907f, + 0.1101921f, 0.10190034f, 0.015290121f, -0.016099364f, + -0.75364029f, 0.039620176f, 0.68343788f, -0.42663282f, + 0.11403301f, -0.024060357f, -0.024415599f, 0.082938001f, + -0.13859239f, -0.028449686f, -0.34059715f, 0.059708126f, + -0.0067142281f, -0.3811217f, 0.12194543f, -0.701684f, + 0.024416713f, -0.21784851f, 0.058617983f, 0.0044293264f, + 0.084234931f, -0.090525642f, 0.51792681f, 0.66573435f, + 0.21931644f, -0.11235578f, -0.059075747f, -0.98487228f, + 0.52120411f, 0.44154522f, -0.017577324f, -0.015082968f, + 0.6612128f, -0.023552783f, -0.25024033f, -0.3627212f, + -0.22018488f, 0.55578572f, -0.51416558f, 0.014518001f, + -0.0075687636f, -0.00066311221f, 0.039353509f, 0.0043803751f, + 0.040977158f, -0.11991261f, -0.098153874f, 0.067071401f, + -0.10968567f, -0.22791299f, -0.10408456f, 0.50604182f, + 0.25815725f, -0.018192485f, -0.078307472f, 0.032473076f, + -0.035179231f, 0.0089574223f, -0.23111513f, -0.014241488f, + -0.47551224f, -0.12191301f, 0.33059457f, -0.20466362f, + -0.021284143f, -0.016632471f, 0.070279479f, -0.075920954f, + -1.0091239f, 0.064078659f, 0.024335835f, 0.033879269f, + 1.0642718f, 0.10424954f, 0.11737838f, -0.029764056f, + 0.033541046f, -0.72645438f, 0.2462717f, -0.0058540707f, + 0.51764745f, 0.16668779f, 0.016274244f, -0.19072585f, + -0.504116f, -0.055189289f, 0.59680426f, 0.042080909f, + 0.064020514f, 0.054227661f, -0.01598672f, -0.16688386f, + -0.12171074f, -0.10460442f, -0.39823651f, 0.33994272f, + 0.2748453f, 0.87264842f, 0.25493953f, -0.1085732f, + -0.034617476f, 0.062427241f, 0.25166553f, 0.2733669f, + -0.35331535f, -0.21706107f, 0.056447268f, 0.062389076f, + 0.009465754f, 0.51509726f, 0.024776621f, -0.015062355f, + 0.080261655f, 0.42574251f, 0.14739123f, 0.2077771f, + -0.041519307f, -0.76547015f, -0.071012743f, 0.14445989f, + 0.4250268f, -0.12535615f, 0.032572668f, -0.11953216f, + -0.012709544f, 0.30070403f, 0.012472651f, 0.0053310241f, + -0.80089843f, 0.037226461f, 0.63279742f, 0.37592819f, + 0.022707725f, 0.073001795f, -0.11678543f, 0.028603626f, + 0.043853443f, 0.02456427f, -0.13192223f, 0.0028603855f, + 0.015391055f, -0.59867448f, -0.091056339f, -0.35031432f, + 0.13735461f, -0.50738633f, 0.010992547f, -0.0343704f, + 0.057667818f, 0.16482595f, -0.20789689f, 0.67738372f, + 0.17928398f, -0.052719217f, 0.10944238f, -0.72329324f, + 0.27877104f, 1.1366984f, -0.18347332f, 0.028282365f, + -0.19711028f, -0.17042032f, 0.0044234204f, -0.061260283f, + 0.23079751f, 0.30124161f, -0.3878884f, -0.042618431f, + -0.028621288f, -0.0080060726f, 0.13701008f, -0.01798737f, + -0.005025031f, -0.10808533f, 0.15107107f, -0.041252896f, + -0.021866808f, -0.31468052f, -0.15811031f, 0.40465784f, + 0.12970039f, 0.0025061406f, 0.007941992f, -0.015027796f, + 0.023469711f, -0.023558402f, -0.094120197f, 0.0034879914f, + -0.11093089f, -0.10183609f, 0.39221245f, -0.10213699f, + 0.01221031f, -0.3835507f, 0.14922415f, -0.11938486f, + -0.65025824f, -0.0041884873f, 0.012750758f, 0.092739403f, + 0.92630333f, -0.0087874522f, -0.016292114f, -0.085425876f, + 0.030437412f, -0.06043452f, -0.0093507348f, -0.02911062f, + 0.65011609f, -0.1862269f, -0.037985563f, -0.54468513f, + -0.48411226f, 0.010007249f, 0.49034739f, -0.10923675f, + 0.083669946f, 0.076551236f, 0.089814246f, -0.026001701f, + -0.052512575f, -0.05665103f, 0.048101783f, 0.30944672f, + -0.015991455f, 0.6796366f, 0.27113268f, -0.12129602f, + -0.075811207f, 0.096579939f, 0.21206579f, -0.13630196f, + 0.084360868f, -0.24125057f, -0.08716888f, 0.07158833f, + -0.051349968f, 0.57674593f, 0.0088210357f, -0.034667023f, + -0.069430113f, 0.4905729f, 0.088195823f, 0.32208478f, + -0.12067134f, -0.80912846f, -0.028899089f, -0.077997141f, + 0.3901284f, -0.42033002f, 0.071408674f, -0.12126859f, + -0.0087281577f, 0.16418712f, -0.029545071f, 0.0046975403f, + 0.33423012f, 0.11646362f, 0.16149569f, 0.89230227f, + -0.1761132f, -0.05624567f, 0.16390255f, -0.022358609f, + -0.11379658f, -0.0056671933f, 0.016747046f, 0.11045671f, + -0.0078404145f, -0.43155262f, 0.048246287f, -0.56198275f, + 0.06215091f, 0.133531f, 0.020299682f, -0.012706934f, + 0.12336056f, 0.050683904f, -0.61918175f, 0.73780465f, + -0.022501588f, 0.076361082f, 0.35298657f, -0.48049745f, + -0.07263092f, 0.638973f, -0.49663809f, 0.0028522233f, + -0.87322295f, -0.034147535f, 0.0065851137f, 0.70469648f, + 0.51450646f, 0.31447393f, 0.031246765f, 0.055996936f, + 0.12169229f, -0.040055819f, 0.12569074f, 0.00046158f, + 0.01926513f, -0.10719904f, 0.045842722f, 0.078450091f, + -0.19245952f, 0.091794491f, -0.40325338f, -1.0717717f, + 0.11109289f, 0.0058924351f, 0.14677849f, 0.013374325f, + -0.063702576f, 0.071957253f, -0.19647793f, -0.0039462685f, + -0.39544982f, -0.089285389f, 0.39836249f, 0.08387953f, + -0.013395789f, -0.76971936f, 0.020699736f, -0.055342138f, + 0.037979864f, -0.010286289f, -0.0083585894f, -0.26341867f, + 0.7014147f, -0.027208081f, 0.041555233f, 0.0017781792f, + -0.056072373f, 0.79509991f, -0.18439361f, 0.020424843f, + 0.75832433f, 0.082698204f, -0.017779408f, -0.75291222f, + -0.52178192f, 0.11589564f, 0.12513219f, -0.19244793f, + -0.21604431f, 0.0037707924f, -0.048438128f, 0.00262525f, + 0.12324759f, 0.0096194167f, -0.069241345f, 0.23795211f, + 0.00038967168f, 0.34327173f, 0.16185305f, -0.053711079f, + -0.10011836f, -0.069962762f, 0.39034617f, -0.57575715f, + 0.34957761f, 0.11504158f, -0.072871417f, 0.024409486f, + -0.1407045f, -0.21439546f, 0.054863695f, 0.029898494f, + -0.22294857f, 0.51014137f, 0.021393996f, 0.27612439f, + -0.21954803f, -0.44018477f, -0.080841109f, 0.047525648f, + 0.63866556f, -0.4734306f, -0.0010865966f, -0.05782228f, + -0.3027001f, -0.029066171f, 0.0016515962f, -0.027410787f, + 0.89088959f, 0.17238182f, 0.06079527f, 0.67351121f, + -0.35034341f, -0.050475869f, 0.13910809f, -0.033483919f, + 0.027569767f, -0.077321619f, 0.12048414f, 0.11430272f, + -0.01056168f, 0.18285693f, 0.069052249f, -0.18043056f, + 0.065750107f, 0.60089797f, -0.018008497f, -0.0059976727f, + 0.050853524f, -0.025681717f, -0.0095049897f, 0.57996356f, + -0.10613468f, -0.1472196f, -0.055001408f, -0.39690319f, + -0.1716141f, -0.40849081f, -0.46540982f, -0.027354959f, + -0.89695024f, -0.083748274f, 0.05027378f, 0.77389055f, + 0.53475392f, 0.16904835f, 0.38640088f, -0.30713153f, + 0.17976002f, 0.027397832f, 0.14660791f, -0.0013917604f, + -0.03651949f, -0.034294117f, -0.12662815f, 0.056762461f, + 0.019696459f, 0.48652214f, 0.076387592f, -0.78996909f, + -0.070061438f, 0.016098997f, 0.32504496f, 0.014217239f, + -0.0025554062f, 0.02803982f, -0.062341772f, 0.009595233f, + -0.61359966f, -0.2409049f, -0.0037219836f, 0.11220261f, + -0.007733894f, -0.64293939f, -0.10295341f, -0.10392882f, + 0.35239741f, -0.11642592f, -0.023052001f, -0.19481336f, + 0.48249969f, -0.082934231f, 0.060813215f, 0.050029557f, + 0.12189154f, 0.041818641f, -0.13826379f, -0.023524709f, + 1.0092827f, 0.0061184145f, 0.01110813f, -0.46907583f, + -0.58889753f, 0.033180635f, 0.24124636f, 0.037283964f, + -0.15431233f, 0.29367167f, -0.13919835f, 0.049790338f, + -0.028561715f, -0.031541586f, -0.47687998f, 0.26563728f, + -0.13978313f, -0.068286709f, 0.2682822f, -0.19133855f, + -0.10141551f, -0.028011421f, 0.22552621f, -0.70570999f, + 0.68708825f, 0.054549545f, -0.0040927478f, -0.030751713f, + -0.070053637f, -0.82074893f, 0.016111279f, 0.027728729f, + -0.092550956f, 0.42352498f, 0.0029132636f, 0.25132677f, + -0.03898428f, -0.45487311f, -0.099902287f, 0.020203214f, + 0.89251405f, 0.23683369f, 0.039739404f, 0.018036749f, + -0.38626805f, -0.048481315f, -0.024551991f, 0.0048309118f, + 0.14982799f, 0.12156249f, 0.16852881f, -0.12282108f, + -0.45939291f, -0.082481757f, 0.33313021f, -0.016629543f, + -0.083263554f, 0.11148994f, 0.25802886f, 0.12418094f, + -0.0082022129f, 0.59404093f, -0.011648189f, 0.61604619f, + -0.10762659f, 0.69187307f, -0.0018731999f, 0.044149552f, + -0.013657985f, -0.08656203f, 0.76043081f, 0.42731333f, + -0.11781889f, 0.046983313f, -0.28425863f, -0.1339355f, + 0.052414641f, -0.66388834f, -0.091180794f, -0.01231599f, + -0.42731369f, -0.15947002f, 0.037954047f, -0.091455743f, + 0.49980304f, -0.057329386f, 0.73188192f, -0.25369301f, + 0.1435415f, 0.14545047f, 0.20136759f, 0.010228579f, + 0.032308046f, 0.061993439f, 0.057814516f, 0.0041024988f, + 0.1377126f, 0.48630261f, -0.12646379f, 0.4035134f, + -0.26144299f, -0.010221017f, 0.64437521f, -0.0035624709f, + -0.013863221f, 0.099185206f, 0.18953884f, 0.014282199f, + -0.74958527f, -0.60137957f, 0.2763052f, 0.032588035f, + -0.011623956f, -0.23289768f, -0.044375382f, -0.073711552f, + 0.31705382f, -0.098400265f, 0.0091501456f, 0.21711263f, + 0.11933531f, 0.11904302f, 0.013301663f, 0.029956523f, + 0.41899836f, -1.2645292f, 0.11622371f, -0.11346393f, + 0.6562658f, 0.10291426f, -0.011679935f, -0.010966144f, + -0.50531018f, -0.0091576427f, 0.23828132f, -0.099036373f, + -0.11640458f, 0.26294655f, -0.093774937f, 0.023775091f, + 0.14914565f, -0.080447093f, -0.50690407f, 0.12945697f, + 0.11162316f, -0.53736073f, 0.20132574f, -0.27220109f, + 0.041337043f, 0.020869873f, 0.27034298f, 0.064443618f, + 0.083980598f, -0.068932362f, -0.048529457f, -0.037127361f, + 0.0017329379f, -0.41453588f, 0.017670393f, 0.040111344f, + 0.10181614f, 0.27181095f, -0.055996325f, 0.18700041f, + 0.0078513278f, -0.58233249f, -0.071478397f, -0.076391369f, + 0.69960344f, 0.38489634f, 0.056282066f, -0.07027705f, + -0.52852595f, 0.054233301f, -0.0084840665f, -0.0013399236f, + -0.47363141f, -0.23760077f, 0.97853452f, -0.62986934f, + -0.30205125f, -0.055363238f, 0.064445771f, 0.085390233f, + -0.024714349f, -0.0002691129f, 0.26036495f, -0.24982394f, + -0.0038992502f, 0.44841707f, -0.027307011f, 0.92746878f, + -0.051750682f, 0.15973446f, -0.016362229f, 0.017983388f, + 0.14450389f, 0.0053049168f, 0.41577128f, 0.21062721f, + -0.098329782f, 0.019229751f, -0.22243325f, -0.071809031f, + -0.16347818f, -0.20108244f, -0.014211453f, 0.0041778022f, + 0.085067011f, -0.27114069f, 0.11794338f, -0.609622f, + 0.3684862f, -0.41198647f, 1.0457724f, -0.03231122f, + 0.074728653f, 0.19168283f, -0.15684041f, -0.043890405f, + 0.017906146f, 0.18922465f, 0.12098996f, -0.017354043f, + -0.20409402f, -0.10683572f, -0.4921034f, 0.91929251f, + -0.086273938f, -0.0043185907f, 0.74701619f, -0.034245882f, + -0.019751318f, -0.051115923f, 0.2587603f, 0.011422788f, + -0.39899734f, -0.96102774f, 0.17275253f, -0.041231506f, + 0.012993785f, 0.25763184f, 0.054465976f, 0.044543672f, + 0.081567109f, -0.047280278f, 0.0065805633f, 0.60914332f, + -0.093558304f, 0.22781003f, 0.12367821f, -0.0061503607f, + 0.60394007f, 0.74383426f, 0.38932174f, 0.021905424f, + -0.49011433f, 0.16232736f, 0.014355064f, 1.5801724f, + -0.60552144f, -0.066150971f, 0.45942309f, 0.18137044f, + -0.28476086f, 0.33340749f, 0.11250301f, 0.051298577f, + -0.20870271f, 0.21246758f, 0.14991523f, 0.24535552f, + 0.03788447f, -0.74156356f, 0.2149923f, 0.3307901f, + -0.19954188f, 0.26210999f, -0.13581614f, -0.45347634f, + -0.57991219f, -0.47286913f, -0.10018554f, -0.16740449f, + 0.080569446f, 0.5208711f, -0.021953315f, -0.065993614f, + 0.22803581f, 0.4276095f, -0.074020334f, 0.09709277f, + -0.057746042f, -0.71593499f, -0.03381272f, 0.23737651f, + -0.14987983f, -0.56344175f, -0.0055962428f, 0.05542732f, + -0.59391057f, 0.12597163f, -0.011981506f, -0.0045149261f, + -0.13513196f, -1.4143244f, 0.41436669f, -1.5084689f, + -0.5356133f, 0.039829548f, -0.32178807f, -0.045569435f, + -0.2749888f, -0.021413773f, -0.011502539f, -0.8189562f, + -0.00092121528f, 0.093522049f, 0.28999656f, 0.63639003f, + 0.041754499f, -0.79919499f, -0.026049757f, 0.11330689f, + 0.089825898f, -0.19625339f, -1.0072776f, 0.23071045f, + -0.17066225f, -0.10785905f, 1.4073185f, 0.11313616f, + -0.96984148f, 0.17388821f, 0.25663161f, -0.0056466181f, + 0.29690993f, 0.53942776f, -0.30928868f, -0.39645147f, + -0.1048094f, -0.93192959f, 1.5606078f, 0.13267528f, + 0.50128174f, 0.12138738f, -0.70860839f, 0.0059213205f, + 0.040134538f, 0.37980151f, -0.057852853f, 0.01732647f, + 0.25638288f, -0.57252145f, -0.64420462f, -0.036625661f, + -0.1124623f, -0.0078337593f, 1.2230468f, 0.0098585216f, + 0.0170816f, 0.044114053f, 0.12424286f, 0.051069573f, + 0.12849928f, -1.4704472f, 0.1294537f, 0.066953003f, + 0.016667517f, 0.67294014f, -0.19891499f, 0.89685142f, + -0.18197812f, -0.1576483f, -0.025931051f, 0.13709305f, + -1.3437753f, -0.099008985f, 0.035371576f, -0.014744754f, + -0.13257025f, -0.11235475f, -0.051996827f, -0.020967264f, + -0.54540467f, 0.055208933f, -0.030406222f, 0.11798099f, + 0.67715096f, -0.021826634f, -0.11053622f, -0.10017804f, + 0.09646529f, 0.3225787f, -0.17432766f, 0.060986914f, + -0.097957075f, 0.40861687f, 0.6279462f, -0.27312654f, + -0.18008955f, 0.42628312f, -0.63486928f, 0.067848533f, + 0.25931737f, -0.059151415f, 0.21375914f, -0.077419311f, + 0.051814955f, 0.44496444f, -0.056476187f, 0.024157578f, + 0.031247409f, -0.1497439f, 0.052936528f, -0.02521988f, + -0.15453298f, 0.54318273f, 0.086713418f, -0.41000268f, + 0.028333567f, 0.53678685f, 0.014668604f, 0.0041924436f, + 0.036704767f, -0.075384438f, 0.0093836179f, -0.042646021f, + 0.24842121f, -0.025808521f, -0.0034249013f, 0.020569507f, + -0.063560598f, -0.071343035f, -0.12429927f, 0.2286378f, + -0.18841711f, 0.042021625f, 0.01771708f, -0.077342995f, + -0.19474974f, -0.060541268f, -0.057653524f, 0.075421154f, + -0.0063054459f, -1.0556407f, 0.24489871f, 0.58971435f, + 0.0419714f, -0.02783647f, 0.039017428f, 0.054140817f, + -0.061255239f, 0.007883722f, -0.15271348f, 0.17714238f, + -0.147039f, -0.1029197f, 0.0030689165f, -0.76045638f, + 0.27573973f, -0.68480021f, -0.16959429f, 0.020836262f, + -0.10722709f, 0.12135819f, 0.059607185f, 0.6851213f, + -0.87037808f, 0.90728557f, 0.50099552f, -0.12030022f, + -0.028527897f, -0.21023551f, -0.032024689f, 0.004080832f, + 0.0088927513f, 0.0086885067f, 0.014785405f, 0.077998437f, + -0.096164607f, -0.12402817f, 0.548832f, -0.036762223f, + 0.072488621f, -0.018108388f, -0.20447558f, -0.0026825264f, + -0.046960212f, -0.010704515f, -0.13897499f, 0.028420832f, + 0.14246613f, 0.31302041f, -0.14863858f, -0.034416627f, + -0.0066476502f, 0.66943794f, -0.08647541f, 0.12238201f, + 0.59239978f, 0.064611264f, -0.029445114f, 0.014092337f, + -0.43188283f, 0.018741464f, -0.042590708f, -0.087364167f, + 0.047236018f, 0.64182931f, 0.017193243f, -0.024159376f, + 0.48022786f, -0.17679992f, 0.023503091f, 0.24714886f, + 0.55573487f, 0.020029372f, -0.068283781f, 0.032787412f, + -0.062704444f, -0.29548812f, -0.18285689f, 0.073447958f, + -0.31288165f, -0.37166238f, -0.17623208f, -0.26166812f, + 0.18704055f, 0.090953901f, -0.61271191f, 0.1016204f, + 0.083733633f, 0.10432331f, 0.24484563f, 0.38611847f, + -0.040825091f, 0.15631801f, 0.039276704f, 0.07850267f, + -0.071460523f, -0.056414269f, 0.0034513874f, 0.011343725f, + 0.086598523f, 0.21017925f, 0.053859852f, -0.28486949f, + 0.13497792f, -0.10160115f, -0.031843044f, 0.010876791f, + 0.058582366f, -0.22190775f, -0.023814918f, 0.030251233f, + -0.17421328f, 0.0057430794f, -0.010089237f, -0.0034391547f, + -0.28659448f, -0.031879317f, 0.11428581f, -0.47006202f, + 0.16312298f, 0.051823691f, -0.018530874f, 0.029220313f, + 0.058345001f, -0.059198104f, -0.082244068f, -0.0088962242f, + -0.0077696783f, -0.23711969f, 0.083103448f, -0.093614802f, + -0.07984256f, -0.1505505f, -0.050105311f, -0.023156513f, + -0.17836201f, 0.12159229f, 0.32127839f, -0.31997806f, + -0.05183376f, -0.095012784f, -0.33975625f, 0.32022268f, + 0.17400998f, 0.55640012f, 0.40916449f, 0.023569901f, + -0.69176143f, -0.028476683f, 0.046467394f, -0.083811492f, + 0.57397187f, 0.2312468f, 0.55709076f, -0.13301669f, + 0.07903783f, 0.15415306f, 0.0077321078f, 0.027702453f, + -0.031866726f, 0.14810587f, -0.045550589f, -0.040752936f, + -0.019317944f, -0.029694155f, 0.22988994f, 0.45326596f, + -0.091144487f, 0.011643684f, -0.13566692f, -0.0031835421f, + -0.011387408f, 0.03821284f, -0.051994275f, 0.017327521f, + -0.31791863f, 0.089630418f, -0.005785042f, -0.039584398f, + 0.010555628f, -0.085757196f, -0.15007262f, 0.052023795f, + -0.77390021f, -0.081202038f, -0.028460028f, 0.021155532f, + -0.43406785f, 0.12784639f, 0.0028882129f, -0.070831656f, + 0.02545624f, -0.30304155f, 0.051708337f, 0.070695184f, + -0.55868596f, -0.054975089f, -0.0085686957f, 0.16148485f, + 0.6232906f, -0.002494131f, -0.28410426f, 0.045831837f, + 0.20738719f, -0.025236979f, -0.1790673f, 0.013241543f, + 0.056078818f, 0.04435043f, 0.10849927f, -0.34235987f, + 0.00094555196f, -0.40196642f, -0.49901906f, 0.34928164f, + 0.095943943f, 0.050702605f, -0.54530334f, 0.54630488f, + 0.25876197f, -0.041018642f, -0.06999848f, 0.020053796f, + 0.051956624f, 0.20796543f, -0.088201247f, 0.13274242f, + 0.27238756f, 0.2663615f, -0.03952872f, -0.29495671f, + 0.010515757f, -0.067362979f, 0.089679435f, -0.11146843f, + 0.097054474f, 0.34663534f, -0.055757586f, 0.13456836f, + -0.12809937f, -0.067910776f, -0.0044327811f, -0.007368139f, + 0.16811079f, 0.041518599f, 0.13436574f, -0.21995945f, + 0.27143469f, -0.095479906f, -0.062776975f, -0.078811489f, + 0.18641658f, 0.037264794f, 0.036431935f, -0.0039408919f, + 0.0057804314f, 0.043523319f, 0.012209559f, -0.23715083f, + 0.022282546f, -0.095575623f, 0.0046795802f, 0.00060906418f, + -0.16106246f, -0.025883252f, -0.047620811f, -0.17820163f, + 0.075400695f, 0.0024409725f, -0.19102536f, 0.27277711f, + 0.14290366f, 0.34489691f, 0.63951105f, -0.023133172f, + -0.41239658f, -0.054258849f, -0.12002662f, -0.14344978f, + 0.49506012f, 0.052134756f, 0.47835842f, 0.049488004f, + 0.033401765f, 0.06536983f, 0.020852253f, -0.00014020664f, + 0.021195024f, 0.10630494f, -0.050584033f, -0.1348822f, + 0.14280689f, -0.094465397f, 0.0041186023f, 0.25529921f, + -0.091615491f, 0.013180645f, -0.085230187f, -0.025117094f, + -0.0032962272f, 0.013506291f, -0.027223285f, 0.0083514564f, + -0.10308556f, -0.15323843f, -0.10509019f, 0.076978095f, + 0.0073454641f, -0.2219069f, 0.068219781f, -0.096112482f, + -0.11016303f, 0.048339725f, 0.00067112211f, 0.12339675f, + -0.33167487f, 0.079404198f, -0.014249505f, 0.014017239f, + 0.016515296f, -0.060241077f, -0.096317194f, -0.074213915f, + -0.48548484f, -0.13272975f, 0.0021529123f, 0.20081989f, + 0.49184403f, -0.07479009f, -0.40606529f, 0.023870718f, + 0.15965398f, 0.063706368f, -0.091346316f, -0.023564357f, + -0.043479461f, 0.12790263f, 0.039983194f, -0.41290766f, + 0.062666506f, -0.51072454f, -0.56162691f, 0.18868013f, + 0.15356661f, -0.0031535309f, -0.22247916f, 0.64634103f, + 0.064174011f, 0.12728605f, 0.032693695f, 0.0063482029f, + 0.031245306f, 0.4141241f, 0.0097397165f, -0.16956401f, + 0.043229137f, 0.24343403f, -0.040419668f, -0.44704738f, + -0.035460573f, -0.0549527f, -0.067015767f, -0.040761542f, + 0.13339828f, 0.28769073f, -0.048743077f, 0.063277408f, + -0.18898831f, -0.15245011f, -0.0083099371f, 0.0019807902f, + 0.53934997f, 0.10543253f, 0.36747018f, 0.010020692f, + 0.28622711f, 0.033145133f, -0.11396542f, -0.032449f, + -0.0098796925f, 0.013782804f, 0.027573364f, -0.010146799f, + 0.016245231f, 0.37184623f, 0.23829657f, -0.54247326f, + -0.027700284f, -0.16565542f, 0.0058283862f, -0.022511309f, + -0.085643463f, -0.059220813f, -0.25477028f, -0.2019918f, + -0.066219963f, 0.065728568f, 0.13320971f, 0.27277496f, + 0.11567014f, -0.13490744f, 0.45320013f, 0.0048008054f, + -0.14705998f, 0.21039611f, 0.014152396f, -0.16637875f, + 0.31181338f, -0.10654974f, 0.21921954f, 0.039349157f, + 0.037515953f, 0.0069268239f, 0.14293599f, -0.00098647561f, + 0.0073656449f, 0.10369151f, -0.085507356f, -0.2299504f, + 0.080408305f, -0.14157403f, -0.15613358f, -0.29975638f, + -0.13055016f, -0.01988633f, -0.15946546f, 0.032346833f, + 0.055765685f, -0.03799656f, 0.087063238f, 0.01635382f, + 0.25967774f, -0.12877724f, -0.036972277f, 0.092489325f, + -0.010424206f, -0.31581998f, 0.070965514f, -0.1010097f, + 0.27465224f, 0.0044179116f, -0.013104435f, -0.053562086f, + -0.1977917f, 0.075075589f, -0.039613158f, 0.0092999013f, + -0.069190681f, 0.61779845f, -0.12417265f, 0.052530728f, + -0.18969484f, -0.057139907f, 0.031258401f, 0.097678714f, + 0.55499339f, -0.10735302f, -0.32841936f, 0.013053485f, + 0.039587528f, -0.020449946f, -0.18516988f, 0.18012805f, + -0.22367547f, 0.13930193f, -0.052718986f, -0.38598526f, + 0.024931433f, -0.22089297f, -0.54667133f, -0.044680424f, + 0.10412083f, -0.021509493f, 0.13090254f, 0.060345802f, + 0.0998668f, 0.11835362f, -0.11428219f, -0.061109293f, + 0.026882078f, -0.077426903f, 0.064167663f, -0.0011300684f, + -0.078336403f, 0.21000643f, -0.075703241f, -0.43504292f, + -0.0055437363f, 0.082675546f, 0.027716244f, 0.028504752f, + 0.26844922f, 0.098545745f, -0.030934086f, -0.042824298f, + -0.058612913f, -0.15961544f, 0.014942184f, 0.020024959f, + 0.099285893f, 0.39359602f, 0.14960991f, 0.29432049f, + 0.29008242f, -0.02363006f, -0.031760205f, -0.075930178f, + 0.055511579f, -0.0073679043f, -0.045274489f, 0.19684403f, + 0.0077135763f, 0.51968342f, 0.16253731f, -0.696944f, + -0.023920743f, 0.066407576f, 0.013339908f, 0.053689126f, + -0.14446238f, -0.050404169f, -0.1570639f, -0.21816215f, + 0.061729681f, 0.042907555f, 0.14773625f, 0.13762473f, + 0.081300981f, -0.47751069f, 0.41301599f, 0.039194278f, + 0.24663512f, 0.072351962f, -0.071482159f, -0.38549832f, + 0.2880927f, -0.077344321f, -0.065921135f, 0.018486135f, + -0.0028348737f, 0.0018905824f, 0.11362818f, 0.054219291f, + -0.0031066937f, -0.078353353f, -0.11312409f, 0.015678104f, + -0.11913723f, 0.27176577f, 0.063881509f, 0.33382085f, + -0.17127362f, 0.014900069f, -0.16354562f, 0.021232678f, + 0.023573814f, 0.032769125f, -0.061945468f, 0.0012130018f, + 0.2249383f, 0.044593222f, -0.32423109f, -0.050719213f, + 0.012850842f, -0.18700168f, 0.05092391f, -0.070603922f, + 0.26840299f, -0.019196285f, 0.021546889f, 0.13471839f, + 0.044283632f, 0.0082735857f, 0.024348587f, -0.035533842f, + -0.1970696f, 0.26626357f, -0.21658865f, 0.096639298f, + -0.22490717f, -0.081685647f, 0.015091502f, -0.19077323f, + 0.56876296f, 0.082664616f, -0.17691226f, -0.0038947389f, + 0.040401649f, -0.066074751f, -0.1176908f, 0.10124389f, + -0.24576145f, 0.026377907f, -0.054530885f, -0.35151094f, + -0.12999815f, -0.21735428f, -0.53884012f, -0.048637047f, + 0.072588153f, -0.013366074f, 0.060003836f, 0.031155054f, + 0.28706023f, 0.11925715f, -0.047881499f, -0.029702215f, + 0.021580653f, -0.39127594f, -0.060037542f, -0.031183138f, + -0.045971725f, 0.14776166f, -0.026920864f, -0.39950931f, + -0.024931189f, 0.14449154f, -0.094687715f, -0.12185112f, + 0.3440547f, -0.13108224f, -0.034338359f, 0.020747941f, + 0.23405121f, -0.14507885f, 0.038901813f, 0.013489017f, + -0.41041797f, 0.68340582f, 0.17831141f, 0.47735056f, + 0.024116851f, 0.06365893f, 0.17946111f, -0.028068759f, + 0.028401632f, -0.031756941f, 0.087137982f, 0.20376742f, + 0.020958997f, 0.34593743f, -0.0020518918f, -0.46727967f, + -0.030353624f, 0.21842438f, 0.016499283f, -0.02098364f, + -0.052408822f, 0.040555242f, 0.22932942f, -0.08616972f, + 0.0029212926f, -0.028564645f, -0.19853118f, 0.092101559f, + 0.20681527f, -0.047234908f, 0.44455492f, 0.0060428339f, + 0.45369074f, 0.040269427f, 0.1048385f, -0.59312773f, + 0.021700213f, -0.36471742f, -0.43604004f, 0.25737059f, + -0.10752191f, 0.087871313f, 0.047031704f, 0.024476871f, + 0.0092694983f, -0.10749492f, -0.067996912f, 0.051330928f, + 0.13390945f, 0.34240511f, 0.013544935f, 0.51866078f, + -0.20039783f, 8.1731683e-05f, -0.18733761f, 0.02458101f, + 0.034305718f, 0.0091689164f, -0.027361104f, -0.0027671726f, + 0.18298055f, 0.061705593f, -0.14483389f, -0.23755644f, + 0.0089981668f, 0.093053065f, 0.0079661943f, -0.10226841f, + -0.022098277f, 0.069437779f, -0.0015841268f, 0.59924054f, + 0.44554886f, -0.20726782f, -0.0804011f, -0.065382704f, + -0.012878977f, -0.5908078f, -0.06049452f, 0.045530926f, + -0.34476167f, -0.1237476f, -0.0086398032f, -0.53056037f, + 0.5755192f, 0.035025492f, -0.20720772f, 0.00015907732f, + 0.1302233f, -0.013676145f, -0.045216095f, -0.10751105f, + 0.068953633f, -0.049182549f, -0.3000263f, -0.29754043f, + -0.16072297f, -0.22865671f, -0.50790107f, -0.017159749f, + 0.32924739f, 0.012517953f, -0.077225678f, 0.4971602f, + 0.23094471f, 0.10108223f, 0.057513032f, 0.081479318f, + -0.026315449f, -0.21828793f, 0.0051632989f, 0.0056248023f, + -0.055093795f, 0.05166322f, -0.020013692f, -0.18297558f, + -0.0089556109f, 0.201928f, -0.027747918f, -0.11187031f, + 0.22676854f, 0.056915008f, -0.019582989f, 0.081084549f, + 0.22857314f, -0.051541541f, 0.012127536f, 0.0013897334f, + -0.26621178f, 0.60338557f, 0.24869116f, 0.36428395f, + -0.13103744f, -0.022981199f, -0.1001212f, -0.066329077f, + 0.14386061f, -0.039369084f, 0.095124952f, 0.051591262f, + 0.0083764251f, 0.044211559f, -0.058109768f, 0.040348936f, + -0.087308146f, 0.21912543f, 0.0014579473f, -0.043671761f, + -0.066427119f, 0.17505379f, 0.37346035f, -0.036871392f, + 0.1183658f, -0.037806898f, -0.74870503f, 0.065166771f, + 0.2007637f, 0.28717861f, 0.33597863f, -0.0055149468f, + 0.27039659f, -0.20522739f, -0.049309287f, -0.29125136f, + -0.059438199f, -0.53047252f, -0.71321303f, 0.01531694f, + -0.24593464f, 0.016838623f, 0.059086539f, -0.017264783f, + -0.014803927f, -0.039024532f, 0.10031326f, -0.092255205f, + -0.03368137f, 0.1825393f, -0.14070086f, 0.51685667f, + 0.021084443f, -0.010971929f, -0.12691084f, -0.012982094f, + 0.00229557f, -0.093056783f, 0.14372532f, -0.016349752f, + 0.23533188f, -0.07040529f, -0.041891012f, -0.11279663f, + 0.00044361429f, 0.19630446f, 0.21161786f, -0.30511856f, + -0.10414063f, 0.17366971f, 0.01113754f, 0.49479353f, + 0.60451746f, -0.12623556f, -0.091138385f, -0.082898751f, + 0.1317154f, 0.40368858f, 0.03887536f, 0.0099838246f, + -0.39656845f, -0.091932088f, 0.0279344f, -0.22262776f, + 0.70439422f, -0.0020746307f, -0.32385489f, 0.063785091f, + 0.1347606f, -0.12928908f, -0.056997582f, 0.048233919f, + -0.33371964f, 0.034002185f, -0.0090268319f, -0.23483469f, + 0.026305852f, -0.10400786f, -0.55280513f, -0.10583585f, + 0.14926153f, -0.020484373f, -0.26106119f, -0.051309198f, + -0.29638091f, -0.031469852f, -0.050074268f, 0.1050384f, + -0.082088016f, 0.41971651f, -0.03203962f, 0.060899425f, + -0.15700781f, 0.059200563f, 0.042762894f, -0.31523627f, + -0.2200046f, -0.14306566f, 0.035713822f, 0.059805553f, + -0.18887788f, 0.20127244f, -0.0037354836f, -0.017350765f, + 0.097125158f, -0.0017471587f, -0.0075369747f, 0.0045715002f, + 0.23686993f, -0.031736013f, 0.070474274f, -0.00029108947f, + -0.65595978f, 0.018822283f, -0.26907545f, -0.046860304f, + -0.16066331f, -0.005623213f, 0.046918761f, -0.14544961f, + 0.012901711f, -0.24717091f, -0.0051738387f, 0.33958176f, + 0.020601241f, -0.083264209f, 0.017347191f, -0.042673912f, + -0.18645036f, 0.16633187f, -0.23880018f, -0.074989095f, + 0.17230241f, -0.076245353f, -0.4053975f, 0.090466127f, + -0.12274485f, 0.10075715f, 0.36812091f, -0.019266091f, + -0.048623968f, 0.019144125f, 0.044047941f, 0.31735557f, + -0.34192136f, -0.89723879f, -0.87320966f, -0.25726336f, + -0.20390098f, -0.01992256f, -0.26915482f, 0.022091478f, + 0.010803286f, -0.0071715219f, 0.069714934f, 0.0076880245f, + -0.093381435f, -0.19846052f, -0.3770659f, -0.26900744f, + -0.0022793363f, 0.028792104f, 0.25024742f, 0.018679878f, + -0.014427328f, -0.002577069f, 0.20633832f, 0.0058899545f, + 0.27420065f, -0.20805208f, -0.038836751f, 0.30986732f, + -0.039147731f, 0.34522322f, -0.024716889f, -0.096104942f, + -0.14415276f, 0.10834198f, 0.0070761796f, 0.22573654f, + -0.39983803f, -0.069378182f, -0.013825407f, -0.052287746f, + -0.051244408f, -0.36883307f, -0.080010526f, -0.0051574167f, + 0.087959468f, 0.10642793f, 0.010959086f, -0.19044679f, + 0.63647264f, 0.019250222f, 0.18989845f, -0.044114906f, + -0.12679735f, 0.1570532f, 0.013885902f, 0.12483708f, + -0.15848809f, 0.79640383f, 0.2869682f, 0.15062538f, + 0.065292388f, 0.88586479f, 0.26107919f, 0.09204264f, + -0.070695303f, 0.083985098f, 0.065184161f, -0.63928121f, + -0.44501442f, 0.31017292f, -0.060828742f, -0.014194785f, + 0.14233847f, -0.10174803f, -0.05124446f, 0.019886525f, + -0.051680513f, 0.34151086f, 0.0034280489f, -0.32520744f, + -0.20279443f, 0.30122468f, -0.060165588f, 0.24288054f, + -0.14188424f, -0.31117269f, 0.0026039465f, -0.039805844f, + -0.12927112f, 0.026987927f, 0.035457198f, 0.0019073518f, + -0.50557667f, -0.14073077f, -0.29733151f, 0.12474847f, + -0.27803195f, -0.056469042f, -0.034671325f, -0.068114385f, + -0.19670929f, -0.008197559f, -0.34616658f, 0.11302499f, + -0.011764429f, -0.77989322f, 0.17744727f, 0.74157637f, + 0.0919488f, 0.63740903f, 0.008582091f, 0.0052140662f, + -0.064524353f, -0.11968285f, -0.15429464f, -0.18831086f, + -0.27496773f, -0.071782351f, 0.39823428f, -0.36887035f, + 0.35542116f, -0.39827067f, -0.10383669f, 0.0056675863f, + -0.63108987f, 0.13009141f, 0.0091436952f, -0.34197071f, + -0.2345625f, 0.64788342f, 0.30542013f, 0.087266102f, + 0.075638793f, -0.50872362f, 0.072879136f, -0.026037408f, + 0.020356551f, 0.0061253388f, -0.093109965f, 0.048999846f, + -0.086337432f, -0.09949185f, 0.46316284f, -0.29548976f, + 0.084069103f, 0.00683332f, -0.25182721f, -0.027479606f, + 0.0053621917f, -0.0015403329f, -0.062678546f, -0.016297817f, + 0.085219048f, 0.12679094f, 0.1905185f, -0.1020946f, + 0.013275808f, 0.69231218f, -0.094603144f, 0.1393231f, + 0.50916028f, -0.027615566f, -0.0096511068f, -0.11700621f, + -0.14855137f, -0.11778621f, 0.10719332f, -0.035909526f, + 0.17119814f, 0.18583317f, -0.0064286762f, 0.042761207f, + 0.61620343f, -0.0043120459f, -0.020233782f, 0.14424533f, + 0.15967339f, 0.08055342f, -0.15316412f, 0.03320393f, + -0.15706693f, -0.11505452f, 0.077395163f, 0.17351685f, + 0.018420614f, -0.4487431f, 0.11849824f, 0.16083531f, + 0.024698503f, -0.32198793f, 0.062286161f, -0.09882357f, + -0.19808097f, 0.066057496f, -0.4359695f, 0.33196321f, + -0.066587664f, -0.0031561509f, -0.081798069f, 0.039866298f, + -0.058103818f, -0.0013986749f, 0.07002911f, -0.034299634f, + -0.056465406f, 0.15510835f, -0.04605503f, -0.21320157f, + 0.050348733f, -0.18343037f, 0.020829838f, -0.046075784f, + 0.15179215f, -0.25187951f, 0.01867068f, -0.032024249f, + -0.12022445f, -0.11240615f, -0.008763738f, -0.00057182339f, + 0.18525209f, -0.12493791f, 0.045769662f, -0.27224541f, + -0.029545184f, -0.086362176f, 0.041618556f, 0.017059203f, + -0.045923743f, -0.00061991817f, 0.15181237f, -0.0449351f, + 0.0024688523f, 0.27143875f, 0.16734177f, -0.024327539f, + -0.03912155f, 0.4452424f, -0.013612485f, 0.031615596f, + -0.049146116f, -0.060884554f, 0.26931298f, -0.3562465f, + 0.025964489f, 0.14449385f, -0.056227844f, 0.38579673f, + 0.068535149f, 0.25002152f, 0.4579986f, -0.022002963f, + -0.33346739f, 0.012612161f, 0.073041007f, -0.27658537f, + 0.25235742f, 0.20070565f, 0.11842387f, 0.20212545f, + 0.15044749f, 0.086320132f, 0.034577936f, -0.019469084f, + -0.016686279f, 0.17915158f, -0.012191715f, 0.0036329105f, + 0.16440575f, 0.26616395f, 0.39326733f, 0.033670597f, + -0.047480993f, 0.011499006f, -0.23803316f, -0.001501075f, + 0.040777236f, 0.073988803f, 0.096517324f, -0.0033943371f, + -0.20007104f, -0.043447334f, 0.31412956f, -0.038045321f, + -0.042510826f, -0.084156781f, -0.084888995f, 0.11697356f, + -0.71322137f, 0.028752413f, 0.01568622f, -0.29888356f, + -0.50533813f, -0.029866224f, 0.063596614f, -0.076509148f, + -0.013862053f, -0.52152306f, -0.012461018f, 0.041665226f, + -0.14978799f, 0.17416626f, 0.018111082f, 0.087403141f, + 0.10735387f, -0.03348555f, -0.27078176f, -0.012836196f, + -0.12108521f, -0.061368357f, -0.075934418f, 0.065803334f, + -0.11160614f, -0.15024672f, 0.22899212f, 0.12401284f, + 0.057029355f, -0.43443826f, 0.11883919f, -0.12654601f, + 0.035611112f, 0.055495303f, -0.48881385f, 0.37775716f, + 0.24152726f, -0.086537495f, 0.00044267406f, -0.0092839105f, + -0.088353127f, 0.20998316f, 0.059735239f, -0.044846788f, + -0.061102506f, 0.18966602f, 0.10338835f, -0.15479411f, + 0.038516704f, -0.10523438f, 0.028552016f, 0.028647045f, + -0.068202309f, -0.22221263f, 0.00090305001f, -0.019552685f, + 0.050814029f, 0.056486379f, -0.0029328351f, 0.0022932948f, + 0.45102623f, -0.026188137f, -0.38386127f, -0.14366308f, + 0.16135928f, -0.056664463f, 0.13647416f, -0.025950408f, + 0.14697398f, -0.016228577f, 0.14164172f, -0.070059933f, + 0.0093530035f, 0.41452432f, 0.033606093f, 0.0037025947f, + 0.043666955f, 0.29268384f, 0.022219755f, 0.0050817905f, + -0.097360894f, -0.071187124f, 0.033951409f, -0.34315339f, + -0.056037482f, 0.009522602f, -0.020802183f, 0.19764167f, + 0.10415332f, 0.083346874f, 0.56597179f, -0.002890052f, + 0.077447347f, 0.015313541f, -0.144269f, -0.11432461f, + -0.028296672f, 0.10187818f, -0.082547173f, -0.067971438f, + 0.050152309f, 0.11706162f, -0.052834935f, -0.0056866645f, + -0.0076826368f, 0.022895779f, 0.088454589f, 0.029443832f, + -0.060787186f, 0.046406064f, -0.00019303783f, -0.33364275f, + -0.14361463f, -0.056119736f, -0.1475087f, 0.0067112581f, + 0.0073669725f, -0.020406142f, 0.22217706f, -0.0025109393f, + -0.054102868f, -0.15886678f, 0.21504925f, 0.1982719f, + 0.03121078f, -0.33541808f, 0.034369759f, 0.032554924f, + -0.012547334f, 0.029924246f, 0.022111204f, -0.17244761f, + -0.21926257f, 0.065024547f, -0.0033872207f, -0.021595653f, + 0.20061922f, -0.28120434f, 0.18595324f, -0.0070948382f, + -0.082923688f, -0.015982039f, -0.015240188f, 0.24944848f, + 0.078469038f, 0.014130221f, -0.026521033f, 0.077945404f, + 0.11884207f, -0.023571162f, 0.062194411f, 0.01995869f, + -0.098623134f, -0.09738782f, 0.26966599f, 0.15620066f, + -0.032570299f, -0.19432048f, 0.24384695f, -0.13607918f, + -0.087669894f, -0.060970306f, -0.13084239f, 0.34599003f, + -0.03117051f, -0.14360279f, -0.0048892996f, -0.057387512f, + -0.036504716f, 0.39720371f, -0.014927314f, 0.0010104069f, + -0.041171879f, 0.1117042f, 0.0077820015f, -0.097098f, + -0.088667877f, -0.23619962f, 0.051209658f, -0.043802824f, + 0.044583745f, 0.63309991f, -0.00081130629f, 0.053319737f, + 0.024026345f, -0.035239827f, 0.0036710997f, -0.01413883f, + 0.12645762f, 0.036409829f, -0.22048663f, 0.018091729f, + 0.11989666f, -0.01595599f, 0.094627239f, 0.0074298233f, + 0.12567875f, -0.019707544f, 0.073913395f, 0.03446532f, + -4.4121582e-05f, 0.34929883f, -0.050605543f, 0.21578984f, + -0.054189224f, -0.27426443f, -0.030208068f, 0.0081052687f, + 0.048696909f, -0.11708041f, -0.17468382f, -0.31172872f, + -0.0063912994f, -0.10888397f, -0.17791748f, 0.065935917f, + 0.044682667f, -0.088298902f, 0.42686287f, -0.057030264f, + 0.30276754f, -0.031145923f, 0.057106495f, -0.30156946f, + -0.036158431f, -0.017244114f, -0.25710937f, -0.12766248f, + -0.080946185f, 0.044603001f, -0.14083989f, -0.0065940712f, + -0.045578934f, 0.049954601f, 0.1132937f, -0.088807866f, + 0.089789718f, 0.095499694f, -0.10021325f, -0.4664143f, + 0.10247778f, 0.013405713f, -0.2588599f, -0.027535725f, + -0.026287826f, -0.066418275f, -0.029388288f, -0.038112193f, + 0.29007149f, -0.21816432f, 0.18529034f, 0.054528814f, + -0.011554761f, -0.37264314f, -0.018492687f, -0.080431089f, + 0.18406279f, -0.002638266f, 0.0095324423f, -0.1064245f, + -0.06954775f, 0.07662379f, -0.0050159199f, -0.053771008f, + -0.0057740095f, 0.18548891f, 0.025642168f, 0.058159482f, + -0.025416793f, 0.17136651f, 0.0030171962f, 0.26721987f, + 0.10168042f, -0.047271829f, 0.028731218f, -0.02105294f, + 0.071503058f, -0.086045846f, -0.042449005f, -0.093017578f, + 0.063561969f, -0.0425229f, -0.039872769f, 0.12715855f, + 0.015185724f, 0.011263358f, 0.19464929f, 0.011164744f, + -0.01080649f, 0.029265862f, 0.46771967f, 0.29318726f, + -0.20420773f, -0.10368004f, 0.001924981f, -0.015294404f, + -0.0080209989f, -0.11689939f, -0.0073973266f, 0.011256498f, + -0.041333444f, 0.073462076f, 0.052908529f, -0.17265016f, + 0.0093132649f, -0.11970732f, -0.04600108f, -0.15385479f, + -0.0039016653f, 0.24338636f, -0.030047288f, 0.08345516f, + 0.052398186f, 0.0051175389f, 0.0066937543f, 0.0028346444f, + -0.20234078f, 0.24395873f, 0.32678527f, 0.079110429f, + 0.2182115f, 0.084075242f, -0.046018496f, -0.089221872f, + -0.018815555f, 0.0035298148f, 0.17581972f, 0.093098201f, + -0.0022805699f, 0.16297951f, -0.02511544f, -0.086141199f, + 0.082865693f, -0.60391325f, 0.01000235f, -0.071654685f, + -0.041993171f, -0.0043132133f, -0.15870656f, -0.28905892f, + 0.012884711f, -0.031260915f, 0.092034429f, 0.010649554f, + 0.0092364019f, -0.0055341963f, 0.28820649f, 0.030714411f, + 0.47603777f, -0.032623794f, -0.13469683f, -0.30605689f, + 0.1028792f, -0.081199393f, -0.19964738f, 0.18319081f, + 0.00042358873f, 0.11936491f, -0.029138023f, 0.011826665f, + 0.039819051f, 0.050001554f, -0.10876027f, 0.012306384f, + -0.055326574f, 0.1308164f, -0.0052206125f, -0.30351597f, + 0.063889921f, -0.023225846f, -0.24911597f, 0.015704684f, + 0.00096266263f, -0.05651886f, 0.00088316691f, -0.023434149f, + 0.43056569f, -0.22751269f, -0.13110742f, -0.10518619f, + 0.019746738f, -0.23336552f, -0.019844946f, 0.068647183f, + 0.1762408f, 0.019592479f, 0.01706419f, -0.012461587f, + 0.090071134f, -0.05475954f, -0.019282134f, 0.06152175f, + -0.011968409f, -0.049354047f, -0.055732276f, -0.045647178f, + -0.28453082f, -0.0057657808f, -0.0053890003f, 0.17689075f, + 0.088842168f, -0.036764618f, 0.072160348f, 0.088891961f, + 0.019834826f, -0.035465986f, -0.025024747f, -0.16857325f, + -0.21733446f, -0.010772684f, 0.049681164f, 0.1630408f, + -0.19517429f, 0.10080395f, 0.14772178f, 0.025034089f, + -0.081618436f, -0.054097816f, 0.15355113f, 0.27816197f, + -0.17461057f, -0.12799709f, -0.08419919f, 0.034749601f, + -0.010543418f, -0.38726544f, 0.038338777f, 0.092504248f, + 0.04257397f, 0.094177f, -0.028919967f, -0.23129629f, + -0.048366848f, -0.085639574f, -0.051747873f, -0.072754063f, + 0.041364938f, -0.14612089f, 0.044582088f, 0.067897856f, + -0.0035473297f, -0.012064255f, -0.012315891f, -0.028791899f, + -0.26886982f, 0.33142337f, -0.3402566f, 0.18530729f, + 0.12822326f, 0.0081827175f, 0.065898314f, -0.048312139f, + -0.071390852f, 0.00076784816f, 0.17591077f, 0.11149811f, + -0.019545481f, -0.042370517f, -0.069951877f, -0.35418901f, + 0.027481556f, -0.49614921f, 0.0010892544f, -0.082891978f, + -0.18708253f, -0.040156502f, 0.048364431f, -0.24213561f, + 0.027995601f, 0.00017279052f, 0.22016141f, 0.10727899f, + -0.1119635f, 0.2105249f, 0.25836957f, -0.031436615f, + 0.16621201f, 0.06044618f, 0.11132894f, 0.15986857f, + 0.059493236f, -0.18675871f, -0.31469062f, -0.12888113f, + -0.065887503f, 0.047745701f, 0.22531918f, -0.035526745f, + 0.016647872f, -0.10286362f, 0.00058122951f, 0.054023862f, + -0.072303765f, 0.27464715f, 0.12864491f, 0.051853456f, + 0.15656753f, 0.010490845f, -0.25215578f, -0.022445841f, + -0.023295537f, 0.026143208f, -0.010534219f, 0.013942447f, + 0.15672064f, -0.12129117f, -0.15722027f, -0.20157716f, + -0.030671807f, -0.028591784f, -0.063412353f, 0.02098869f, + 0.041469175f, 0.080083787f, -0.021153785f, 0.095237263f, + 0.049377114f, 0.1108567f, 0.014403543f, -0.093306035f, + -0.022253741f, -0.67387283f, 0.038004857f, 0.0025340412f, + -0.53303844f, 0.054726992f, 0.0075189658f, -0.10086695f, + 0.015468624f, -0.07316003f, 0.13602668f, -0.15573658f, + 0.13766831f, -0.23957439f, -0.080644779f, -0.14469136f, + 0.14972147f, -0.022454999f, -0.029332105f, 0.22682077f, + 0.039770715f, -0.011479881f, 0.1027329f, 0.067271926f, + -0.16200392f, 0.033868335f, 0.02715726f, 0.59647137f, + -0.25632846f, 0.0011859211f, -0.010157485f, -0.025361547f, + -0.033067066f, -0.16416629f, 0.014234489f, -0.032635238f, + -0.016348444f, 0.085013486f, 0.0039283992f, -0.12101649f, + 0.13016908f, 0.13971184f, -0.030307623f, -0.11979999f, + -0.097393766f, -0.27640283f, -0.055947624f, -0.04048517f, + 0.072842434f, 0.098103829f, 0.022405285f, -0.0021032537f, + 0.010528006f, 0.13331325f, -0.052266698f, 0.31957838f, + 0.020137521f, -0.084997341f, 0.10593625f, 0.050221112f, + -0.067718521f, 0.059767697f, 0.19166279f, 0.18364555f, + -0.010123167f, 0.011774546f, -0.23844075f, -0.39785638f, + 0.15617324f, -0.16527517f, 0.04024069f, 0.026113676f, + -0.011707763f, 0.037426434f, 0.34314001f, -0.14102308f, + -0.070524439f, 0.027936604f, -0.024723217f, 0.018281648f, + -0.0400455f, 0.1512493f, 0.098437324f, 0.0038316566f, + -0.0092396894f, -0.22768462f, 0.012796065f, 0.41929501f, + -0.028619856f, -0.37040651f, -0.42415208f, -0.084713981f, + -0.095274225f, 0.063491717f, -0.034018211f, 0.031975482f, + -0.021323044f, 0.020974705f, 0.0026936554f, 0.080671653f, + 0.030182844f, 0.094729379f, 0.038762555f, -0.11519086f, + 0.22842446f, 0.0028587454f, -0.29715565f, 0.010733023f, + 0.022782421f, -0.0028672179f, 0.040143315f, -0.024093283f, + -0.089376785f, 0.1778388f, 0.070082188f, -0.037334744f, + 0.010465144f, 0.1167322f, 0.031387039f, -0.049609773f, + 0.014910205f, 0.064177729f, 0.012081055f, -0.20832321f, + 0.42990944f, -0.051021896f, -0.015808692f, -0.014505049f, + 0.1473942f, 0.080815628f, -0.040103074f, -0.042053312f, + -0.49403244f, 0.070764914f, -0.026352907f, -0.37705311f, + 0.15502754f, -0.046455417f, -0.12190183f, -0.050495327f, + 0.008730595f, -0.33808094f, -0.14543556f, 0.21514964f, + 0.18843482f, -0.03637157f, 0.15099631f, 0.14714487f, + 0.084883548f, 0.028372759f, 0.11412565f, -0.18404041f, + -0.053757563f, -0.15108652f, 0.1940977f, 0.38027424f, + -0.045497846f, -0.03651784f, 0.014483728f, 0.036605172f, + 0.0086497925f, 0.25920385f, -0.010465873f, -0.050164502f, + 0.10868282f, 0.061664548f, -0.026711984f, -0.16725594f, + -0.016400678f, -0.087614298f, 0.018788183f, -0.12026688f, + -0.031153517f, 0.24652338f, 0.036134262f, -0.053021114f, + 0.041276917f, 0.021462006f, -0.012749595f, 0.0017512904f, + 0.14325948f, -0.30556613f, -0.1544627f, -0.024468862f, + -0.42553326f, 0.080140568f, -0.060285609f, 0.016821912f, + -0.012434325f, -0.011085237f, 0.056302421f, 0.089099497f, + 0.0019958469f, 0.012082741f, -0.05250534f, 0.13827588f, + -0.024217509f, 0.14775303f, -0.013956954f, 0.025872018f, + -0.017371437f, -0.087109856f, -0.20941328f, -0.10186563f, + 0.011633124f, -0.059714645f, -0.50571913f, -0.065346316f, + -0.16078451f, -0.094840415f, 0.05592066f, 0.013792405f, + -0.23735669f, -0.084668711f, -0.023807637f, 0.3136673f, + -0.19577116f, -0.62421668f, -0.47555584f, -0.065267697f, + -0.24482067f, 0.026606098f, -0.148458f, -0.014514706f, + -0.016513631f, -0.04012065f, 0.020538062f, 0.045382995f, + -0.014234803f, 0.053550251f, -0.40499425f, -0.58552152f, + 0.12708391f, -0.0063589625f, 0.00930175f, -0.051321823f, + 0.012706817f, -0.038834494f, 0.06565699f, -0.030821808f, + 0.046309371f, 0.15232104f, -0.01184642f, 0.25511703f, + 0.011761046f, 0.27638075f, 0.092504159f, -0.1740368f, + -0.036392994f, 0.0888156f, -0.0063045491f, -0.036827885f, + -0.31830704f, 0.14080243f, 0.075197674f, 0.039094429f, + -0.19183752f, -0.055581979f, -0.11329791f, 0.033291176f, + 0.31921577f, 0.1340865f, 0.017506549f, -0.50305963f, + 0.14845847f, -0.034828182f, -0.028041303f, -0.075462565f, + 0.20023023f, 0.034268893f, 0.20582803f, 0.064064234f, + 0.040921852f, 1.2474422f, -0.41325846f, 0.0045764842f, + 0.20393325f, 0.6873194f, 0.88174039f, 0.39657184f, + 0.090088926f, -0.036578938f, 0.14841893f, -0.96222878f, + -0.16986653f, 0.25656614f, -0.052675791f, 0.018436989f, + 0.20064016f, -0.32225099f, -0.049671289f, -0.027606472f, + -0.18821816f, 0.2521351f, 0.04793537f, 0.071810283f, + -0.094625093f, 0.34688303f, -0.079384856f, 0.1934164f, + -0.058775444f, -0.13608508f, -0.081767388f, 0.042144801f, + 0.30211529f, 0.24793555f, 0.012914439f, 0.010451543f, + -0.5379076f, -0.16273105f, 0.014957445f, 0.072607853f, + -0.069973968f, 0.0069546471f, -0.12720133f, 0.010527776f, + -0.21022274f, 0.0030391496f, -0.70509118f, 0.12050018f, + 0.0071483185f, 0.29311669f, -0.22056928f, 0.68632233f, + 0.080119118f, 0.48037672f, 0.024665406f, -0.013722155f, + -0.053182501f, -0.022241f, -0.20823026f, -0.46327063f, + -0.10375974f, 0.01383832f, 0.30970576f, -0.3193171f, + 0.34159729f, 0.13488542f, 0.006266247f, -0.03184915f, + -0.58792853f, 0.16881792f, -0.058267742f, -1.397277f, + -0.013711041f, 0.50473446f, -0.04749484f, -0.03235548f, + -0.073458813f, -0.71754938f, 0.084354244f, -0.019954389f, + -0.053553049f, -0.048553921f, 0.064717375f, -0.026989808f, + -0.043646324f, -0.24971019f, 0.36000961f, -0.075908467f, + 0.010393898f, -0.011875345f, 0.22528686f, 0.031782094f, + 0.013744853f, -0.081925169f, -0.28134418f, 0.016496712f, + 0.41559878f, 0.38917175f, -0.020579761f, -0.030937506f, + -0.023768974f, 0.66595632f, 0.012727298f, -0.079797611f, + 0.38062906f, -0.021789417f, 0.029945245f, -0.02841069f, + -0.2926743f, 0.12866133f, -0.036771946f, -0.045591556f, + 0.079103723f, 0.45693052f, -0.045059595f, 0.035465401f, + 0.3239288f, 0.081363216f, 0.01075694f, 0.068149731f, + -0.16286425f, 0.032699123f, -0.019523075f, -0.073790535f, + -0.17705256f, -0.05537178f, 0.1310802f, 0.06067808f, + 0.059122708f, -0.72373003f, 0.50894302f, -0.0066971099f, + 0.089367278f, -0.45525008f, 0.45822793f, -0.098679043f, + -0.0060155736f, -0.034966648f, -0.29567125f, -0.28775519f, + 0.25989339f, -0.10456544f, 0.051417019f, -0.12978311f, + 0.020951673f, 0.060711991f, -0.0066101607f, 0.048331201f, + 0.11430655f, 0.036157958f, 0.030384863f, -0.18258797f, + 0.020139743f, -0.088513032f, -0.049696848f, -0.017609637f, + -0.060080681f, 0.29482949f, 0.031606603f, -0.088365525f, + 0.0017253571f, -0.0065622483f, -0.021297345f, -0.019975824f, + 0.42266408f, -0.11983827f, 0.11624102f, -0.5170759f, + -0.14664362f, 0.057604585f, 0.17982024f, -0.0051995236f, + -0.072460689f, 0.021812448f, 0.4104411f, -0.039809961f, + 0.00030516018f, 0.51460594f, -0.10676676f, 0.0063009025f, + -0.0029799594f, 0.36724466f, -0.0022561392f, -0.024643237f, + -0.022488382f, -0.025110792f, 0.35323566f, -0.34006873f, + 0.095871136f, -0.13147984f, -0.18707216f, 0.33866996f, + 0.085724771f, 0.1324622f, 0.17235106f, -0.0095112063f, + 0.011611086f, 0.026234748f, 0.08826793f, -0.10330611f, + -0.1495703f, 0.1314922f, -0.098856181f, -0.12779748f, + 0.054526888f, 0.080669329f, 0.02906407f, 0.021468297f, + 0.0063800164f, 0.090201713f, -0.083166316f, 0.14735137f, + 0.091184117f, 0.064072371f, -0.018274615f, 0.016826417f, + -0.1849061f, 0.014324261f, -0.26618767f, 0.014795935f, + -0.045272633f, -0.0010723398f, 0.12742379f, -0.0074387142f, + 0.25860971f, 0.009909655f, 0.093463793f, -0.011119536f, + 0.02847179f, -0.20418797f, -0.18083899f, 0.044818137f, + -0.59197783f, -0.015707338f, -0.023597859f, -0.11790786f, + -0.36318406f, -0.047303021f, -0.015857f, -0.049658868f, + -0.010429949f, -0.2893596f, 0.025946049f, -0.030541785f, + 0.1141111f, -0.091508165f, -0.0096157752f, 0.26364571f, + -0.049658764f, -0.018166097f, -0.076578565f, -0.03877664f, + -0.25300875f, -0.038205288f, -0.11188482f, -0.16361095f, + 0.0020655338f, -0.34844467f, 0.50785339f, -0.054037124f, + 0.1384429f, -0.15200317f, 0.47101155f, -0.12271539f, + -0.045917675f, -0.053386215f, -0.18934359f, -0.22413237f, + 0.23955382f, 0.030582314f, -0.094402842f, 0.12436175f, + -0.13367826f, 0.33806348f, 0.018128833f, 0.0064417864f, + -0.14763492f, 0.085893996f, -0.045369763f, -0.065218218f, + 0.056610599f, 0.095925711f, 0.068997145f, -0.043709658f, + -0.050043419f, 0.34610489f, 0.049813155f, 0.069158159f, + 0.048007216f, -0.02685545f, -0.0035540843f, -0.00012824062f, + 0.38609111f, 0.07019116f, -0.19259058f, -0.093782529f, + -0.11957791f, -0.090912364f, -0.18253276f, -0.054654166f, + 0.054607127f, -0.017055122f, 0.13768554f, -0.031242382f, + 0.010095585f, 0.30682448f, -0.19557388f, -0.12029585f, + 0.036177598f, 0.0071197771f, 0.021834165f, 0.008639602f, + 0.052974805f, 0.03609629f, 0.027315592f, -0.35154361f, + 0.10316098f, -0.0220719f, 0.037811548f, 0.18313856f, + -0.067291953f, -0.13621514f, 0.24301569f, 0.023547431f, + 0.22307876f, -0.017574128f, 0.14208674f, 0.16785878f, + -0.16684064f, 0.049554665f, -0.095395237f, -0.086769082f, + 0.10029644f, 0.12047232f, 0.044219598f, 0.038337294f, + -0.0055617113f, 0.05317992f, -0.12682864f, 0.044619508f, + -0.13064046f, 0.087467298f, -0.092375293f, -0.22783543f, + -0.17090613f, 0.026106341f, -0.13846523f, -0.017959306f, + 0.0099050794f, -7.8265228e-05f, 0.1077747f, -0.018690934f, + 0.16901456f, -0.0029486476f, 0.11811167f, 0.15256391f, + -0.019626884f, -0.26511693f, -0.0091026165f, 0.033517417f, + 0.030344069f, 0.092363387f, -0.001030284f, 0.27374277f, + -0.088595159f, -0.055070218f, 0.0034791715f, -0.094385222f, + 0.055447917f, -0.018296104f, 0.081199534f, -0.073371254f, + -0.017467584f, -0.12658706f, -0.0026550998f, 0.2074731f, + -0.044011407f, 0.048866071f, -0.014462227f, -0.052633245f, + -0.02192639f, 0.091032475f, 0.029383063f, -0.053469714f, + -0.055294503f, -0.15313143f, 0.46751904f, 0.034518018f, + 0.13479908f, 0.19842981f, 0.3829338f, -0.11462662f, + 0.0088887494f, 0.0094576664f, 0.18901873f, -0.25855801f, + 0.22262529f, -0.022867184f, -0.07995002f, 0.020034285f, + -0.08816091f, 0.21781687f, -0.052052703f, -0.036746107f, + -0.14753282f, 0.044817675f, -0.00042425873f, -0.10323938f, + 0.21180183f, -0.044231024f, -0.08285179f, -0.074586064f, + -0.037350569f, 0.44223472f, 0.020740997f, -0.13683371f, + -0.1594341f, -0.0051775635f, -0.0030123799f, 0.003189649f, + -0.029981181f, 0.14841902f, -0.16210777f, -0.028834492f, + 0.025180953f, -0.032379534f, 0.010251699f, 0.068543851f, + 0.091431282f, 0.040814217f, 0.088376276f, 0.072696745f, + 0.0050743213f, 0.10542393f, -0.19365159f, 0.038443521f, + 0.011529519f, -0.30757833f, -0.0022249823f, 0.029085623f, + 0.014921389f, -0.013725318f, -0.22155677f, -0.28939748f, + 0.037783485f, 0.043115824f, 0.13318437f, 0.05541404f, + 0.0378168f, -0.22817233f, -0.042625718f, -0.0097664613f, + 0.28908855f, -0.030910039f, 0.034844384f, 0.077062249f, + 0.013759133f, 0.013918248f, -0.15046436f, 0.067982204f, + 0.10324843f, 0.050312221f, -0.11544022f, -0.027275762f, + 0.031140804f, 0.11922835f, 0.061667025f, 0.037814904f, + -0.048140135f, 0.026252942f, 0.023488056f, -0.2293525f, + -0.07153745f, -0.013857696f, -0.19478491f, -0.019784098f, + 0.0071475762f, -0.023269985f, 0.029378176f, 0.0022567175f, + 0.19847168f, -0.062000591f, -0.018738454f, 0.0080410922f, + -0.0022511219f, -0.21541512f, 0.0099009974f, -0.01936334f, + 0.15709357f, -0.025885837f, -0.0060464549f, 0.23610926f, + -0.063174382f, -0.10858611f, -0.076179177f, 0.065199964f, + 0.0052554905f, 0.33080351f, 0.036806077f, 0.051065907f, + 0.027357904f, 0.051377032f, 0.014204293f, 0.26221091f, + -0.13077265f, -0.045505255f, 0.085508853f, -0.010954021f, + -0.13885145f, -0.078364566f, 0.051960979f, 0.11907285f, + 0.00029363498f, -0.056404542f, 0.23835662f, 0.028513221f, + 0.15716802f, 0.11777501f, 0.39858592f, -0.2039519f, + 0.021396622f, 0.033341888f, 0.50572151f, -0.32786992f, + 0.12477819f, 0.0083834538f, -0.055095538f, 0.087891094f, + -0.0355752f, -0.22803393f, 0.0064017158f, 0.079297379f, + 0.017820699f, -0.024481513f, -0.042215973f, -0.073219955f, + 0.15530673f, 0.094069757f, -0.042958103f, -0.05555404f, + 0.044616126f, -0.37307498f, 0.010811945f, 0.026332652f, + 0.083314151f, -0.011874026f, -0.001882331f, 0.0032543815f, + -0.33894485f, 0.14609638f, 0.27232406f, 0.13677733f, + -0.015836686f, -0.049920637f, 0.020232489f, -0.045501854f, + 0.022181243f, 0.0009739938f, 0.020016432f, 0.043936465f, + -0.0055651208f, -0.042557757f, -0.14072482f, 0.042423617f, + 0.043193992f, -0.55048513f, 0.0058073844f, 0.0085158283f, + -0.0047307662f, 0.1361524f, -0.16205366f, -0.28274208f, + 0.058904208f, -0.01013676f, 0.093330435f, 0.054709688f, + -0.10312972f, 0.042759791f, -0.05619802f, -0.0001453299f, + 0.23434721f, 0.024895456f, 0.028486803f, 0.11191059f, + 0.030769791f, 0.015419939f, -0.080278218f, 0.11592754f, + 0.046346243f, 0.10623524f, -0.086045861f, 0.0044403644f, + -0.038178459f, -0.044611841f, -0.16285791f, -0.036950529f, + -0.026160406f, -0.067931995f, -0.2920934f, 0.019403705f, + -0.039416108f, 0.042181425f, -0.23383817f, -0.0097203376f, + -0.00031746752f, -0.021672735f, -0.01314733f, -0.0011491885f, + 0.22643171f, 0.091945142f, -0.18765302f, -0.048005681f, + -0.0058291759f, -0.19839095f, 0.073281564f, 0.034662206f, + 0.078833193f, 0.026141681f, 0.005506997f, -0.14941025f, + -0.0091698021f, -0.13308954f, 0.035012815f, -0.10841392f, + -0.13923548f, 0.094024092f, 0.086243898f, 0.03241761f, + -0.19662407f, -0.19943316f, -0.033118773f, 0.099561386f, + -0.053639717f, 0.042345602f, 0.12939221f, 0.10897914f, + -0.10597505f, -0.016449325f, 0.013523181f, 0.2012215f, + -0.18450524f, 0.056895573f, 0.26980972f, -0.027196437f, + 0.037012558f, 0.045600601f, 0.35361019f, -0.12915182f, + -0.03375712f, 0.033122495f, -0.0060768435f, -0.097213812f, + -0.073035039f, 0.018533047f, 0.0052690995f, -0.12072659f, + -0.011468729f, -0.36819404f, -0.0087216534f, -0.046607871f, + -0.015943f, 0.038977306f, 0.037489463f, -0.068324909f, + -0.056601062f, 0.079446994f, 0.086617574f, 0.060863551f, + -0.05478093f, -0.29377311f, -0.0089189084f, -0.011956458f, + -0.21505818f, 0.044498395f, 0.030270452f, 0.015068873f, + -0.086192437f, 0.12221194f, -0.33295041f, 0.2016478f, + -0.16852634f, -0.10537563f, 0.12441675f, -0.0055083232f, + -0.059582528f, -0.059483722f, 0.26032209f, 0.077048339f, + -0.012455289f, -0.18639413f, -0.31256387f, -0.17504059f, + -0.015807375f, -0.28857428f, 0.014465875f, 0.0016953059f, + -0.0011301658f, 0.0064305072f, 0.15302952f, -0.21053948f, + -0.088885255f, -0.19197589f, 0.28848916f, 0.067036882f, + -0.015842892f, 0.12466326f, -0.15438455f, 0.033069216f, + 0.084717646f, 0.067954488f, 0.0072929305f, 0.34722969f, + 0.051223341f, -0.081897862f, -0.001903941f, -0.061200958f, + 0.084463537f, 0.15937495f, 0.15541479f, 0.0095698508f, + -0.0066254064f, -0.019076576f, -0.027503721f, -0.14731148f, + 0.031302683f, -0.087186731f, 0.072506659f, 0.14897563f, + -0.18593298f, -0.011357795f, -0.16265541f, 0.0052269441f, + 0.0025513654f, 0.083003454f, -0.03243858f, 0.060369462f, + 0.024480294f, 0.1644682f, -0.17883323f, 0.02540982f, + -0.0015299151f, -0.092874706f, -0.098095253f, 0.18384826f, + -0.032525647f, -0.075697392f, 0.009172719f, -0.18047111f, + -0.17677605f, 0.015081247f, 0.064198636f, -0.024960011f, + -0.16891541f, -0.33534664f, -0.0084272204f, -0.044449508f, + -0.32857266f, -0.012069382f, -0.011583069f, -0.016994724f, + -0.076496422f, 0.075478338f, 0.0080906823f, 0.037063289f, + -0.012049289f, -0.10409402f, -0.043965708f, 0.47293788f, + 0.26780063f, 0.022674736f, 0.13985315f, -0.019863784f, + 0.10293131f, 0.006074572f, 0.34583727f, -0.034125414f, + -0.02986519f, 0.037995383f, -0.26343605f, 0.28122491f, + -0.042825133f, -0.062527612f, 0.035883538f, -0.054208234f, + 0.012841734f, -0.17501579f, -0.0058515845f, -0.0028739625f, + 0.13603075f, -0.0022721835f, 0.0044629155f, -0.12246499f, + 0.043378588f, 0.074076325f, -0.082638741f, -0.061921641f, + -0.31707659f, -0.46392584f, 0.00013399631f, -0.0094845798f, + -0.036680628f, 0.026772797f, -0.036343627f, -0.0048531867f, + 0.064423256f, -0.084938236f, -0.073010266f, 0.31302014f, + -0.21142243f, -0.01998671f, 0.12265605f, 0.049590513f, + -0.057046119f, -0.033547174f, 0.2150792f, -0.0043075024f, + 0.011607289f, -0.18875164f, -0.25141093f, -0.2434842f, + -0.094025165f, -0.010572129f, -0.051602643f, -0.007031207f, + 0.051081445f, 0.018194452f, 0.19104773f, -0.14523901f, + -0.057173353f, 0.036128581f, 0.37006611f, 0.069895618f, + -0.20748845f, -0.015776243f, -0.12902167f, -0.022525987f, + -0.061389182f, 0.0043662204f, -0.30469897f, 0.33418247f, + 0.04133999f, -0.14123827f, -0.044159267f, -0.021431254f, + 0.020874003f, 0.14674604f, 0.028243244f, -0.011087305f, + 0.030999828f, 0.04845399f, -0.059704002f, 0.017019577f, + 0.012803303f, -0.14011039f, -0.074396305f, 0.053213712f, + 0.060208835f, -0.00045820492f, -0.2892465f, 0.009925534f, + -0.034329981f, -0.044272881f, -0.010007272f, -0.003086641f, + -0.14005515f, 0.38683909f, 0.0010958512f, 0.040817227f, + -0.013071286f, 0.031440984f, -0.065346278f, 0.046448503f, + -0.055940669f, -0.074666172f, -0.016372416f, -0.43963474f, + 0.12822747f, 0.0011049995f, -0.089919597f, -0.018873563f, + -0.22128415f, 0.25136796f, 0.002226487f, -0.10375933f, + -0.15662345f, -0.14360598f, 0.010522478f, -0.21351045f, + -0.16638145f, 0.037130035f, 0.074200757f, -0.03562998f, + 0.0098397415f, -0.21358037f, 0.081971385f, 0.11125028f, + -0.22630115f, -0.03852063f, 0.095366612f, -0.043066729f, + 0.14916566f, 0.087474205f, 0.40442616f, -0.36943826f, + -0.060581859f, -0.10328505f, -0.29364151f, 0.19143559f, + 0.37174997f, -0.082818776f, -0.039670628f, 0.030101473f, + 0.0048186267f, 0.17490707f, -0.011094363f, 0.012809157f, + 0.07703843f, 0.03936119f, 0.021511313f, -0.013653985f, + -0.079381265f, 0.009133541f, 0.092703447f, 0.033245534f, + -0.17726301f, 0.0065790457f, -0.023851326f, -0.11107012f, + 0.014790374f, 0.0081738187f, 0.0023113694f, 0.016794806f, + 0.14674343f, -0.39607471f, 0.25893441f, 0.015585741f, + -0.64356339f, -0.10610931f, -0.31398359f, 0.064908288f, + -0.0075018536f, 0.066527694f, -0.0082905218f, 0.022757573f, + 0.0025368033f, -0.17969015f, -0.23966025f, 0.039363284f, + -0.12556112f, 0.33389753f, 0.0047992528f, -0.022939553f, + 0.073417574f, -0.021184014f, -0.10658645f, -0.25547603f, + 0.059005119f, -0.022997264f, -0.075360909f, 0.0017978824f, + -0.18349642f, -0.032177478f, -0.10623042f, 0.016209817f, + -0.18504088f, -0.052019712f, 0.0043850727f, 0.18053888f, + -0.14122878f, -0.33256248f, -0.1814401f, 0.17486319f, + -0.05142976f, 0.067750253f, -0.10741917f, -0.0055353269f, + -0.039756041f, 0.060193807f, -0.045410842f, -0.035513986f, + -0.2184041f, -0.22092733f, -0.34127808f, -0.55853963f, + -0.025605591f, -0.001095549f, -0.14734012f, 0.015456444f, + -0.0094413487f, -0.053780161f, -0.079823121f, 0.0045806309f, + -0.00087538327f, 0.59852004f, -0.061025377f, 0.29257116f, + -0.0044688317f, 0.22436465f, -0.036383964f, -0.0042773965f, + -0.062784903f, -0.070252232f, 0.020896252f, 0.17656474f, + 0.011931998f, -0.090243675f, -0.028479317f, -0.033921435f, + -0.10115558f, 0.1428901f, -0.1527562f, 0.081937686f, + 0.25928599f, -0.024393884f, 0.022007793f, -0.55030692f, + -0.1730376f, 0.016275078f, 0.047681797f, -0.017301125f, + 0.3793841f, 0.13642906f, 0.030147295f, -0.19318567f, + 0.16265851f, 1.2968328f, -1.1161833f, -0.10880425f, + -0.054530259f, 0.1944678f, 0.035192031f, 0.21044198f, + 0.14021529f, -0.34980172f, 0.41281155f, -0.081121355f, + -0.28944686f, 0.24042287f, -0.014728174f, -0.029906111f, + 0.043644097f, -0.27414078f, 0.070834137f, 0.026967227f, + -0.17021419f, 0.050512638f, 0.040012423f, 0.78088778f, + -0.21931559f, 0.22574294f, -0.055648066f, 0.083885401f, + -0.29156801f, -0.22480273f, -0.030762861f, 0.14770903f, + 0.70165557f, 0.42351294f, 0.0060538617f, -0.017503152f, + -0.19604248f, -0.074601382f, 0.45677114f, 0.26729381f, + 0.11505033f, -0.030453272f, -0.01888602f, 0.077064112f, + -0.15481497f, 0.015208898f, -0.82059938f, 0.26499322f, + 0.0094783828f, 1.0172418f, -0.28478071f, 0.40459725f, + -0.0067860824f, -0.93497634f, -0.011744315f, -0.080381401f, + -0.016584516f, -0.030250037f, -0.13297072f, -0.55197167f, + -0.045097299f, -0.10556156f, 0.10280353f, -0.33570147f, + 0.38354731f, 0.50020379f, 0.16474093f, -0.014402667f, + -0.18711022f, -0.021138873f, -0.16302891f, -0.83289236f, + -0.15376033f, 0.3204205f, 0.078610107f, -0.088836692f, + -0.16929887f, -0.79623181f, 0.25108576f, -0.0055403686f, + 0.0086340718f, -0.11163231f, 0.12217908f, 0.0024911216f, + -0.10647231f, -0.22290517f, 0.078209892f, 0.43440768f, + 0.064320624f, 0.0064570806f, 0.38527414f, 0.0042407224f, + 0.0053104879f, -0.027230943f, -0.25058293f, -0.0021604514f, + 0.81995368f, 0.27083573f, -0.19408955f, -0.1746681f, + 0.028965734f, 0.47385108f, 0.24971697f, -0.28078851f, + 0.35870251f, 0.004828875f, -0.02275967f, 0.28112626f, + -0.11497205f, -0.01845634f, 0.0075249686f, -0.11509672f, + 0.034451395f, 0.47360379f, -0.093172103f, 0.045136198f, + 0.27941662f, -0.032106925f, -0.01321551f, -0.089598633f, + -0.23024964f, -0.026222106f, 0.012022197f, 0.058214732f, + -0.068291366f, -0.10499399f, -0.14876015f, -0.060996879f, + -0.062995307f, -0.80335331f, 0.18266892f, -0.11857773f, + -0.16473299f, -0.14934185f, -0.040326849f, 0.31623954f, + -0.022517933f, -0.026816808f, -0.052997481f, -0.0069634262f, + -0.12987362f, -0.14218558f, -0.066408902f, -0.11600652f, + 0.14067629f, 0.095223695f, -0.068845578f, -0.070508674f, + -0.042664904f, -0.070568971f, -0.01136506f, 0.2778905f, + -0.043645397f, -0.088790156f, -0.012218999f, -0.10656158f, + 0.11752042f, 0.35583407f, -0.0013558976f, -0.016810734f, + 0.09880051f, -0.15643229f, -0.033531826f, 0.0025714361f, + 0.27929264f, -0.22981593f, 0.14910845f, -0.41251853f, + -0.049217232f, -0.057735495f, -0.18328084f, 0.035679359f, + 0.10846651f, -0.010340681f, 0.61010891f, 0.024942769f, + -0.014039923f, 0.2593185f, -0.10374393f, 0.18348353f, + -0.035554189f, -0.06399212f, 0.016508481f, 0.014965654f, + -0.021797534f, 0.12007097f, 0.47493488f, -0.29880244f, + 0.070895948f, 0.11477858f, -0.49133804f, 0.2496504f, + 0.10934578f, -0.15245366f, 0.00061086059f, 0.038809255f, + 0.095156282f, -0.034056418f, 0.012354343f, 0.35224226f, + -0.10160334f, 0.10883579f, 0.030002689f, -0.085935898f, + -0.018694464f, 0.046820864f, 0.10293165f, -0.0026044734f, + 0.021841509f, 0.040128294f, 0.040265355f, 0.085950501f, + -0.078670233f, 0.073442817f, 0.029939f, 0.44268328f, + -0.15585354f, -0.016836394f, -0.38857156f, -0.022534132f, + -0.024708115f, 0.014021264f, -0.17290783f, 0.0055177896f, + 0.38243973f, 0.11803322f, 0.12671274f, 0.11018722f, + -0.03177581f, -0.11521649f, -0.1225685f, -0.084103853f, + -0.52870595f, -0.0011025907f, -0.016764447f, 0.02650781f, + -0.13243631f, -0.046659585f, 0.027840754f, 0.051138256f, + 0.21469052f, -0.18375339f, -0.026671985f, -0.0055679302f, + 0.06407176f, 0.076677904f, 0.007080656f, 0.12685409f, + -0.1405737f, -0.0043610702f, 0.054582559f, -0.049153022f, + -0.087153912f, 0.010101264f, -0.11131462f, -0.052514903f, + 0.039836481f, -0.44797069f, 0.16005953f, -0.082834333f, + -0.021661492f, 0.029838523f, -0.069979727f, 0.55770993f, + 0.072204776f, -0.027549498f, -0.36195633f, -0.25844756f, + -0.083334073f, 0.005146191f, -0.051764064f, -0.007823512f, + -0.12866622f, 0.34221911f, -0.014554419f, 0.051966008f, + -0.13416146f, -0.010286723f, -0.010335099f, 0.34849018f, + 0.15087104f, 0.07425274f, -0.089156941f, 0.037715614f, + -0.018507792f, 0.26307675f, -0.022008728f, -0.15830593f, + -0.18060499f, -0.16297555f, 0.011233189f, 0.012104372f, + 0.26138031f, -0.14064208f, 0.18190522f, -0.075392842f, + -0.16976f, -0.011494699f, -0.082413211f, 0.0061269575f, + 0.11511787f, 0.028831813f, 0.29749155f, 0.016839474f, + -0.000412163f, -0.1114114f, -0.12913193f, 0.1064461f, + 0.0072597368f, 0.3040837f, 0.0028665015f, -0.012349932f, + -0.0056536915f, 0.014108145f, 0.10298516f, -0.29648674f, + 0.11198446f, -0.086428143f, -0.32729855f, 0.19484395f, + 0.092019133f, -0.33177873f, -0.0034600766f, -0.0056975242f, + 0.028041249f, -0.032537714f, 0.053971529f, 0.37694603f, + -0.087351844f, 0.074065343f, -0.0024289531f, -0.0019881963f, + -0.020535531f, 0.08838781f, 0.0055771153f, -0.0089607732f, + -0.0016300894f, 0.10822757f, 0.091160655f, 0.054795556f, + 0.048904981f, -0.021247581f, -0.10093695f, 0.10522015f, + -0.020755025f, -0.00076844502f, -0.21740235f, 0.014222576f, + 0.0087187281f, 0.0031895842f, -0.031549655f, 0.022717969f, + 0.076015867f, 0.086678013f, -0.027294928f, 0.13425936f, + 0.0030492267f, -0.17582507f, -0.053610478f, 0.10294171f, + 0.0563659f, -0.026213301f, -0.011601558f, 0.16203582f, + -0.044375274f, 0.031535272f, -0.055985615f, 0.03893337f, + 0.11506263f, -0.0090458384f, 0.036753137f, -0.013954493f, + 0.07890451f, -0.067026585f, 0.0016096144f, 0.16041465f, + -0.13501525f, -0.049781755f, 0.05268449f, 0.046431512f, + -0.003470361f, 0.071468174f, -0.073787645f, -0.26405829f, + 0.058108911f, -0.10618886f, 0.21906504f, -0.10244498f, + -0.059764296f, 0.025795164f, -0.068401158f, 0.29732707f, + -0.021343615f, -0.10626505f, -0.33790502f, -0.42121249f, + 0.37562314f, 0.023909265f, 0.064523645f, -0.017347319f, + -0.082002349f, 0.34233353f, -0.037300523f, 0.0074246172f, + 0.20673974f, -0.014897079f, -0.058030367f, 0.2449819f, + -0.066412203f, 0.12089051f, -0.087346256f, -0.04038237f, + -0.035545632f, -0.18200441f, 0.0063020359f, 0.029724848f, + -0.33266756f, -0.025709189f, 0.0057688453f, -0.01089981f, + -0.21887331f, 0.09087085f, 0.43070194f, -0.09505216f, + -0.017300429f, -0.047056969f, 0.044099331f, -0.082051322f, + 0.14809462f, 0.076969653f, 0.025774989f, 0.048010316f, + -0.011957183f, -0.14023715f, 0.013285551f, 0.12233843f, + -0.089179434f, 0.015602225f, -0.016931219f, 0.040073719f, + 0.0022159046f, 0.054855827f, -0.095402971f, -0.2494316f, + -0.00134209f, 0.011992154f, -0.11652123f, 0.13414042f, + -0.018496966f, -0.12001062f, -0.15841888f, -4.5413246e-05f, + 0.098314382f, 0.046956621f, -0.051321395f, 0.16307501f, + 0.055536039f, -0.017290683f, 0.085926466f, 0.019335823f, + -0.14830627f, 0.068727732f, -0.0077490825f, 0.0022131037f, + -0.024406858f, 0.091255121f, 0.076988846f, -0.011469786f, + 0.004974274f, 0.11181756f, -0.034288567f, 0.10152115f, + 0.055065624f, 0.0010990815f, -0.1912699f, -0.010626411f, + 0.0014074871f, -0.0030603139f, -0.044230003f, 0.010427037f, + 0.088089779f, 0.061708648f, 0.16310014f, 0.018536758f, + 0.012919486f, -0.21605282f, -0.09009546f, -0.016578035f, + 0.13494574f, -0.0102724f, -0.030559117f, 0.059036035f, + -0.037201107f, -0.03241197f, -0.036869682f, -0.095511891f, + 0.018825991f, 0.30439964f, -0.044883665f, 0.0085793817f, + 0.065482244f, 0.097669937f, -0.017537339f, 0.15599938f, + -0.055606321f, 0.035628702f, 0.18508394f, 0.024455015f, + -0.0079353591f, -0.025779324f, 0.098875791f, -0.19382814f, + -0.11670347f, -0.11613155f, 0.17340823f, -0.093227409f, + 0.069408141f, -0.074080177f, -0.11202618f, -0.066930264f, + -0.032161105f, -0.032034677f, 0.042517755f, -0.47670093f, + 0.10635159f, 0.021979744f, 0.043212332f, -0.048925791f, + 0.04508514f, -0.16323163f, -0.035026953f, -0.028828131f, + 0.15516487f, 0.0042001544f, 0.005567668f, 0.33336064f, + -0.084802903f, 0.014244128f, -0.055281397f, -0.046793874f, + -0.038612567f, 0.019395947f, -0.025236385f, -0.11331924f, + -0.10497408f, -0.04180292f, -0.0044000451f, 0.018296702f, + -0.36894506f, 0.20872468f, 0.22919096f, 0.12499749f, + -0.062737294f, 0.040258251f, -0.12379123f, -0.051655803f, + -0.050486125f, -0.03997812f, 0.11635597f, 0.14422227f, + -0.011406606f, -0.32692942f, -0.088715024f, 0.11010005f, + 0.030334411f, 0.093055941f, 0.039415006f, 0.019882275f, + 0.085917093f, 0.024533056f, -0.22847156f, -0.22819859f, + -0.0051312754f, -0.0022903825f, -0.32933113f, 0.071828954f, + -0.11021399f, 0.14835842f, -0.25491801f, 0.017669505f, + 0.046371069f, 0.10763066f, -0.044462051f, 0.17522626f, + -0.0011663004f, -0.041631419f, 0.0088135405f, 0.16815946f, + -0.049460225f, 0.11962362f, 0.041693676f, 0.0007479387f, + 0.026780413f, -0.023541117f, 0.036865503f, -0.070475154f, + 0.11757002f, -0.081595615f, -0.1463352f, 0.46379292f, + -0.030169239f, -0.011717211f, -0.15777861f, -0.0037231429f, + -0.035749417f, -0.053138476f, -0.060435776f, -0.018868206f, + 0.14743419f, 0.2542921f, 0.016475707f, -0.0047506192f, + -0.032050926f, -0.17217925f, -0.010672654f, 0.079409301f, + 0.10109455f, -0.0012631888f, -0.013809094f, -0.27442229f, + -0.11201154f, -0.050568908f, 0.097606882f, -0.013576377f, + -0.10509051f, 0.1371513f, -0.053178377f, 0.016896849f, + -0.14959341f, 0.034096055f, 0.026335269f, 0.046076961f, + -0.026809877f, -0.018945688f, -0.05461356f, 0.031318568f, + -0.018129032f, -0.047473479f, -0.031981945f, -0.39328286f, + -0.081297927f, 0.021998249f, 0.35581547f, -0.11076947f, + -0.13820274f, -0.14765507f, -0.044226281f, -0.19342853f, + 0.018385749f, -0.02639107f, 0.019919643f, -0.20200653f, + -0.273763f, -0.0073187076f, 0.054826912f, -0.030178381f, + 0.053566039f, -0.31896582f, -0.030855959f, -0.038837556f, + 0.049083557f, -0.00040728148f, -0.026581084f, 0.35258844f, + -0.0051642926f, -0.089807719f, -0.069674194f, 0.11010848f, + -0.16989727f, -0.032670405f, 0.0081298556f, -0.06867291f, + -0.094975896f, 0.026046384f, -0.0159497f, -0.015491709f, + 0.042294659f, 0.12795839f, 0.2409658f, 0.17638995f, + -0.17404327f, -0.0047738831f, 0.10880005f, -0.11494941f, + -0.01195144f, 0.0019326452f, 0.24370264f, 0.08548408f, + 0.0082481811f, -0.28492317f, -0.17635067f, 0.086156003f, + -0.045862388f, 0.056501973f, 0.0069318833f, -0.0023905719f, + -0.064759061f, -0.024016337f, 0.11443934f, -0.14469562f, + -0.0074180663f, -0.11535922f, -0.098459207f, 0.12912332f, + -0.23304632f, 0.096749038f, -0.16075377f, -0.019281683f, + -0.016967652f, 0.16997665f, 0.14617608f, 0.42912385f, + 0.063586734f, -0.049138092f, 0.16688097f, 0.3137407f, + 0.023573203f, 0.21109493f, 0.06937369f, -0.014785641f, + 0.033990227f, 0.016120572f, 0.085025705f, 0.015998239f, + 0.095167868f, 0.19985698f, 0.036114533f, 0.47303677f, + -0.1601553f, -0.0080653187f, -0.094465211f, 0.00027854607f, + 0.0020197451f, 0.088976994f, -0.11205663f, -0.010312862f, + -0.050933197f, 0.34957248f, 0.066887394f, -0.025601672f, + -0.012809113f, 0.014171567f, -0.013586945f, 0.0870068f, + -0.027405055f, 0.021176014f, 0.011465641f, -0.39362958f, + -0.14036444f, 0.14033042f, 0.0038445459f, -0.092565775f, + -0.28666472f, -0.2448552f, 0.0060222978f, 0.058400691f, + -0.32862544f, 0.096739605f, -0.0040946486f, 0.10793714f, + 0.0061827987f, -0.092093721f, -0.095087864f, 0.048586428f, + -0.0058160881f, -0.0089211045f, 0.00046020863f, -0.31397662f, + 0.0028327266f, -0.011486795f, 0.38647869f, -0.10264781f, + 0.031707764f, -0.040427968f, -0.079143099f, -0.19348513f, + 0.043590862f, 0.062655762f, -0.014610735f, -0.056957047f, + -0.42392716f, -0.051736712f, -0.1014178f, -0.0035509947f, + 0.01960679f, -0.14303492f, -0.0081997374f, -0.0047283662f, + 0.23613086f, 0.04256539f, -0.026995923f, 0.30303621f, + -0.10413358f, -0.093438134f, 0.027026078f, 0.045104168f, + -0.1323459f, 0.14798066f, -0.036166903f, 0.0019626715f, + -0.014452736f, -0.0048578563f, 0.025573425f, 0.0096426364f, + 0.1953388f, -0.09622775f, 0.12865067f, 0.16916916f, + -0.16941662f, 0.003522177f, 0.22563869f, -0.073247574f, + 0.014433156f, -0.0017578501f, 0.074973822f, 0.10038343f, + -0.017652081f, -0.19126394f, 0.0023926026f, -0.19143119f, + 0.0075302119f, 0.18240598f, -0.00038841588f, -0.038634196f, + 0.030940754f, 0.084639937f, 0.2382374f, -0.1528943f, + -0.075144239f, -0.084488355f, 0.11096895f, 0.055674706f, + -0.30978951f, -0.023216816f, -0.15249906f, 0.01875655f, + -0.0091433162f, 0.063422933f, 0.010510592f, 0.096628077f, + 0.12517631f, -0.10827465f, 0.17118022f, 0.0033330931f, + 0.023574892f, 0.2123265f, 0.057047095f, 0.0092238253f, + -0.047706649f, -0.019714806f, 0.12453446f, 0.024595784f, + 0.1072822f, 0.067427181f, -0.16801968f, 0.51945132f, + -0.073958397f, 0.039200928f, -0.16626479f, -0.013170823f, + 0.027541462f, 0.0074749202f, -0.057270315f, 0.0020791609f, + -0.22424307f, 0.33916253f, 0.19559011f, 0.073397957f, + 0.014636388f, 0.11360655f, 0.013931455f, 0.080280073f, + 0.0059568183f, -0.085963614f, 0.014248176f, -0.1346214f, + 0.06287495f, -0.082368113f, -0.040777646f, -0.015076944f, + -0.29863837f, 0.24821344f, -0.020302704f, -0.02080215f, + -0.16126853f, 0.11331284f, -0.006090885f, -0.0030424197f, + -0.11152532f, -0.069953866f, -0.13874599f, 0.087610856f, + -0.10532913f, -0.13518366f, -0.052692048f, -0.3708356f, + -0.069343239f, -0.035978857f, 0.4122034f, -0.093225159f, + -0.15400201f, 0.0093682623f, 0.0013896491f, -0.4366529f, + -0.045638774f, -0.1260199f, 0.32903558f, -0.32846829f, + -0.1010372f, -0.047196783f, -0.105873f, -0.046253093f, + -0.032082621f, 0.23979823f, 0.074137866f, -0.03120371f, + 0.2806921f, -0.028969094f, 0.076818153f, 0.35346922f, + 0.019163236f, -0.18290369f, -0.087338813f, 0.049822625f, + 0.0035176855f, 0.13449845f, 0.01438257f, 0.10674632f, + 0.028998312f, -0.070578009f, -0.0012466238f, -0.0261354f, + 0.0084863035f, -0.41370052f, 0.4613992f, -0.072498284f, + -0.29663333f, 0.010881759f, -0.10241909f, -0.059203587f, + -0.0040445356f, 0.033712897f, -0.094209813f, 0.054150809f, + 0.0086626364f, -0.039479993f, -0.10343084f, -0.25584772f, + -0.064016335f, 0.26373148f, 0.022623751f, -0.029456526f, + 0.001412841f, 0.050710965f, -0.15528843f, -0.24192238f, + 0.032036941f, 0.016258191f, 0.027092271f, -0.074750543f, + -0.20184369f, -0.041324601f, -0.084138289f, -0.017903376f, + -0.0032651906f, 0.053509511f, 0.11557946f, 0.018903784f, + -0.0090398919f, -0.2448907f, 0.076549612f, 0.16016439f, + 0.0053509921f, 0.25222817f, 0.029317185f, 0.0079132896f, + 0.004221281f, 0.030401791f, 0.011094435f, 0.066527389f, + 0.087004095f, -0.01236558f, -0.44562885f, 0.098536693f, + -0.1816657f, -0.019703688f, -0.09178292f, 0.0035261335f, + 0.0024692644f, 0.052391846f, -0.119669f, -0.0057264981f, + -0.10952247f, 0.67205316f, 0.032934494f, 0.33778182f, + 0.0015291322f, 0.20517026f, 0.005481232f, -0.15530677f, + 0.0034370357f, 0.06361004f, -0.0034896219f, 0.3778801f, + -0.083300658f, 0.15288967f, 0.033670347f, 0.062403653f, + 0.12881219f, -0.45476264f, 0.12301509f, -0.052338f, + 0.17167707f, 0.012597645f, 0.0040749339f, -0.27631328f, + -0.17821647f, 0.018953215f, 0.091349773f, -0.034730643f, + 0.052508734f, 0.33131185f, -0.020751085f, 0.2101967f, + -0.15292223f, 0.75896949f, -0.70758343f, 0.11797882f, + 0.063024826f, -0.51749283f, -0.52048802f, -0.61443007f, + -0.00081338652f, -0.097920172f, -0.14360018f, 0.60600948f, + 0.050893493f, 0.14402384f, 0.05231024f, 0.10346432f, + -0.35935733f, -0.42179435f, -0.0017322034f, 0.042953447f, + -0.051632512f, -0.3273783f, 0.052432101f, 0.72611529f, + 0.14568934f, 0.37930405f, -0.031844154f, 0.078557059f, + -0.18903203f, -1.6507285e-05f, -0.043220952f, -0.026294149f, + 0.42512992f, 0.36256096f, 0.0061085401f, -0.0034417207f, + 0.032197371f, -0.058991514f, 0.34670213f, 0.40434623f, + 0.12834284f, -0.0057799309f, 0.15470661f, -0.086437628f, + 0.081781432f, -0.029619159f, -0.70500559f, 0.16092448f, + -0.00044207365f, 0.86771923f, -0.055787437f, 0.0050840834f, + 0.027761634f, -1.248933f, 0.0070093968f, 0.024797244f, + 0.14424643f, 0.0054390188f, -0.32202104f, -0.34367043f, + 0.11419107f, 0.024540592f, 0.49692416f, -0.11798171f, + 0.39024946f, 0.7530008f, 0.31373867f, -0.0030230039f, + -0.069641598f, -0.076890133f, -0.15261202f, 0.47430053f, + -0.2078712f, 0.18818624f, -0.040959723f, 0.17052105f, + -0.10315631f, -0.89073199f, 0.13724773f, -0.0037543355f, + 0.017956527f, -0.14302543f, -0.026664592f, -0.16185975f, + -0.27777666f, -0.022446997f, 0.46886206f, -0.1447514f, + -0.057222601f, 0.0045843525f, 0.81111956f, -0.00095062016f, + 0.0030725361f, -0.027084319f, -0.074666001f, 0.0045754313f, + 0.19151756f, -0.077328496f, -0.12785921f, -0.23261844f, + 0.0077852295f, 0.34820059f, 0.11280721f, -0.070663773f, + 0.41428643f, 0.013101467f, 0.04309063f, 0.33831799f, + -0.063275672f, 0.098670602f, 0.0012924381f, 0.044258513f, + -0.11112759f, 0.28990415f, 0.033606488f, -0.12815583f, + -0.0027650103f, -0.060211401f, -0.020753305f, -0.12929359f, + -0.021420369f, 0.007753063f, -0.039237075f, -0.060174022f, + -0.16882771f, -0.084319673f, 0.038790688f, 0.063012719f, + -0.17074075f, -0.55908537f, -0.14665844f, 0.05804174f, + -0.089179657f, -0.1012359f, -0.20173822f, 0.30705404f, + -0.093091406f, 0.0027106167f, -0.11921687f, 0.19614127f, + -0.03401304f, -0.012530805f, -0.11301166f, -0.09989842f, + 0.3448059f, 0.13586339f, 0.13888338f, 0.06381651f, + 0.015009481f, -0.29212251f, -0.016655773f, 0.54239672f, + 0.024935314f, 0.20121635f, -0.081358783f, -0.076161444f, + 0.094514005f, 0.080337018f, 0.059408005f, 0.072505191f, + -0.15904877f, -0.13065712f, -0.019195257f, 0.0066915718f, + 0.22952396f, -0.1305459f, 0.2866163f, -0.5034669f, + -0.018486042f, 0.078530386f, -0.14198966f, -0.056281433f, + 0.18618833f, 0.030152442f, 0.63000703f, 0.073705994f, + 0.0082377149f, -0.12041847f, -0.11259282f, 0.29446527f, + -0.024828279f, -0.29166985f, -0.027811734f, 0.0026449368f, + 0.086363167f, -0.052866146f, 0.40783384f, 0.049253326f, + 0.013046707f, -0.072049379f, 0.049092237f, 0.30701661f, + -0.17734364f, -0.31508547f, -0.12953253f, -0.015796384f, + 0.018406397f, -0.044421487f, 0.030050874f, 0.69387096f, + 0.054273434f, 0.054331578f, 0.054811705f, 0.10746592f, + 0.068474948f, -0.1151249f, 0.018865183f, -0.022189943f, + 0.01152936f, 0.040230103f, -0.2371324f, 0.055820152f, + 0.19122991f, 0.24775444f, 0.17443526f, -0.0010269451f, + -0.26111564f, -0.027848277f, -0.44434166f, 0.0072035198f, + -0.022276346f, 0.03313604f, 0.018124472f, -0.0183047f, + 0.21548724f, -0.20616475f, -0.15129119f, 0.26255178f, + 0.010138075f, -0.082117885f, -0.068396315f, 0.10183737f, + -0.58568263f, -0.03781984f, 0.00070717948f, 0.071840875f, + -0.071414165f, -0.071021579f, -0.061043829f, 0.063452102f, + 0.25265789f, -0.42380914f, 0.10512545f, -0.015817847f, + -0.052664287f, -0.052505068f, -0.0017017947f, 0.029264588f, + 0.021945775f, 0.015800115f, 0.008306805f, -0.0015340782f, + 0.0080236299f, 0.039535139f, -0.035723761f, -0.033818182f, + -0.0074936724f, -0.14512289f, -0.11095692f, 0.046578202f, + -0.014607199f, 0.066659912f, -0.22069228f, 0.44885555f, + -0.062377911f, 0.062417552f, 0.29205179f, 0.017982727f, + -0.088045336f, -0.031665817f, -0.081018604f, 0.040010888f, + 0.086377867f, 0.31112126f, -0.1543068f, 0.030972004f, + -0.026559379f, -0.267147f, 0.015109458f, 0.49510574f, + -0.08555562f, 0.12427782f, -0.094117165f, -0.094322369f, + 0.08708176f, -0.76943696f, 0.015187236f, 0.1025098f, + -0.32238191f, -0.16993289f, 0.018431326f, -0.016605245f, + -0.066258408f, -0.036148306f, 0.031328607f, -0.29638398f, + 0.094974734f, -0.039128412f, -0.098770544f, -0.10027229f, + 0.23016912f, -0.013930017f, 0.11829955f, -0.051061448f, + -0.023194328f, -0.18610394f, -0.021823123f, 0.28121859f, + 0.023549985f, 0.42094105f, 0.0014556054f, -0.018853135f, + -0.05736145f, 0.035728708f, -0.047264569f, 0.074495248f, + -0.0047638654f, 0.038974669f, -0.13604681f, 0.19404432f, + 0.031640757f, -0.47003868f, -0.011276567f, 0.0093310811f, + -0.026190309f, -0.17353436f, 0.1372599f, 0.17880495f, + 0.055947617f, 0.043534558f, -0.039002117f, 0.07112205f, + -0.054717798f, -0.028785191f, 0.038296871f, 0.010951385f, + 0.013799938f, 0.083239421f, -0.18707119f, -0.092482261f, + 0.0027181222f, 0.069290072f, 0.098716095f, -0.19444567f, + -0.03550924f, 0.019815344f, -0.20856906f, -0.017051755f, + 0.010114656f, -0.071174987f, 0.11164937f, -0.02402493f, + -0.013316815f, -0.078418292f, -0.28984505f, 0.24600428f, + 0.020758025f, -0.12189491f, 0.024015769f, -0.025391277f, + 0.005729401f, 0.092050672f, -0.0017437888f, -0.23271456f, + 0.11142281f, 0.21178035f, 0.0057647256f, -0.015478649f, + 0.28055269f, -0.27195945f, 0.18864474f, 0.056607291f, + 0.13591918f, -0.047941599f, -0.0027701173f, 0.099343441f, + -0.018289059f, -0.025484364f, 0.073096655f, 0.034797128f, + 0.011688341f, 0.048065662f, 0.069798656f, 0.24523424f, + 0.040133849f, -0.17709905f, -0.3098762f, 0.034076244f, + -0.1075741f, 0.06718754f, -0.18198541f, 0.39866692f, + -0.0059220199f, 0.053310506f, 0.071386859f, -0.23365751f, + -0.1275084f, -0.020869164f, 0.013317349f, -0.042009003f, + -0.018884517f, 0.32494411f, 0.025610693f, -0.072643414f, + 0.26087156f, -0.1883314f, -0.014211756f, 0.36211753f, + 0.05175053f, -0.076782979f, 0.042763986f, -0.096817903f, + 0.051153053f, -0.96751344f, -0.00018850924f, 0.011554595f, + -0.19332455f, -0.080336623f, -0.015299019f, 0.032070167f, + -0.23196863f, 0.18929161f, 0.23177467f, -0.04211f, + 0.15827076f, -0.033750545f, -0.035177495f, 0.032299254f, + 0.092840411f, -0.04402357f, -0.0057630897f, 0.053756058f, + 0.02376201f, -0.16004358f, 0.00089911721f, 0.20534872f, + -0.035570972f, 0.39836204f, -0.024715405f, 0.03564021f, + 0.084074803f, -0.036772329f, -0.16779166f, 0.063887045f, + -0.010366553f, -0.018243685f, -0.16922136f, 0.11760043f, + -0.068795882f, -0.13983086f, -0.12955061f, 0.030749394f, + 0.11084451f, -0.060306869f, 0.039486207f, -0.18119659f, + 0.043250166f, -0.014161757f, -0.056647521f, 0.036586035f, + 0.048382174f, 0.059182834f, -0.022709975f, 0.010412471f, + -0.040368602f, 0.0049312068f, 0.015961748f, -0.073229104f, + 0.13238946f, -0.013289051f, 0.12024757f, -0.053564064f, + -0.003022098f, -0.0044321385f, -0.090366475f, 0.024986805f, + 0.004476211f, -0.074817494f, 0.17393246f, 0.0035446214f, + 0.024727844f, -0.0078251362f, -0.14686111f, 0.041429043f, + 0.0011945171f, -0.20771936f, 0.031186992f, 0.10064661f, + 0.16057119f, 0.0043035238f, 0.052575793f, -0.089485355f, + -0.038125981f, -0.13417394f, 0.036114432f, -0.050038125f, + 0.11950605f, 0.19866717f, 0.14309421f, 0.030996166f, + -0.047825512f, 0.032373246f, 0.028426118f, 0.075931683f, + 0.0024299196f, -0.010662935f, -0.018229151f, -0.10607573f, + 0.036198247f, 0.0013389054f, 0.15521948f, 0.26851538f, + 0.060810398f, -0.058571249f, -0.16981296f, 0.050189618f, + 0.060348611f, -0.0088874344f, -0.1971011f, 0.26730439f, + -0.03046431f, -0.017561866f, -0.26886228f, -0.15080398f, + -0.03028122f, -0.12154026f, -0.075161211f, 0.052848205f, + 0.051145926f, -0.18010925f, -0.012628936f, 0.03217946f, + 0.062534258f, -0.14511566f, -0.015209552f, 0.36397359f, + -0.024108393f, -0.016868083f, -0.09855815f, 0.032518931f, + -0.010181519f, 0.067219578f, -0.027235758f, 0.0044092992f, + 0.082218111f, 0.046367735f, 0.016498676f, -0.0031578001f, + -0.24759483f, 0.24817693f, 0.064302228f, 0.066107608f, + 0.19468175f, 0.0001385057f, -0.039847061f, -0.041174874f, + 0.07421761f, -0.027773332f, 0.11475687f, -0.060987175f, + 0.002652352f, -0.27510846f, -0.015691163f, 0.18624893f, + -0.0084791193f, 0.32851845f, -0.014737192f, -0.020690614f, + 0.020365844f, -0.075873129f, -0.23976637f, 0.034173895f, + 0.03122307f, 0.041510656f, -0.10645664f, 0.15784664f, + -0.089832112f, 0.19140293f, -0.10313692f, -0.020142883f, + 0.081713766f, 0.071671642f, -0.09145686f, -0.25458243f, + -0.008990244f, 0.041494858f, -0.10050225f, 0.053322513f, + -0.054051179f, 0.10902815f, -0.081740223f, -0.00093206973f, + -0.019881569f, 0.031931326f, -0.097641453f, -0.012939213f, + -0.031284783f, -0.10529856f, -0.091331884f, -0.041267466f, + 0.023457121f, -0.00015507787f, -0.10093013f, 0.016789338f, + 0.022264142f, 0.014861671f, 0.046385087f, -0.0031522261f, + 0.029538168f, -0.012881895f, -0.11344684f, -0.064521253f, + -0.0012689504f, -0.16411991f, 0.0079541449f, 0.12351646f, + 0.032132741f, -0.032830507f, 0.026616028f, -0.026203027f, + -0.055295952f, -0.027507883f, -0.014856271f, 0.0051288581f, + -0.0047008726f, -0.18010953f, 0.098273017f, -0.02463641f, + -0.048265133f, -0.12647566f, -0.019356944f, -0.042429883f, + 0.057791568f, -0.02177624f, 0.064558357f, -0.031615298f, + 0.0295153f, -0.043286532f, -0.035238571f, -0.40629339f, + -0.11292586f, 0.042546961f, -0.01001685f, 0.019069325f, + -0.033528093f, -0.033563092f, -0.14260356f, 0.19626476f, + 0.012482773f, -0.012742842f, 0.076096833f, 0.057828333f, + -0.26749498f, -0.04719121f, 0.077650942f, 0.061949387f, + 0.0090154493f, -0.31479675f, 0.024570676f, 0.021245226f, + -0.1575588f, -0.14069694f, -0.043437403f, 0.35179037f, + -0.046108246f, -0.26939732f, 0.039769173f, 0.0076886569f, + -0.10463245f, 0.047183473f, 0.0011471394f, 0.082027026f, + -0.091345944f, 0.14672278f, 0.0029751353f, 0.011356808f, + 0.16192308f, 0.19642106f, 0.10583636f, 0.10034723f, + 0.22010164f, -0.076455489f, 0.17434521f, -0.11758476f, + 0.071981825f, 0.039458774f, 0.02416008f, 0.049970847f, + 0.015481438f, -0.18700761f, -0.0095627103f, -0.029678313f, + -0.016954463f, 0.053805426f, 0.018907448f, 0.073214285f, + -0.025928946f, -0.071627736f, 0.076157123f, 0.083573043f, + 0.042041767f, 0.05059664f, 0.087434605f, 0.074701376f, + -0.24145234f, 0.066868268f, -0.015804626f, -0.0059429817f, + 0.07170973f, 0.1215167f, -0.080251925f, -0.039506514f, + 0.027873706f, 0.026249565f, -0.12357549f, -0.13831036f, + -0.021883853f, 0.29707021f, 0.011193943f, -0.026589017f, + 0.027077777f, -0.028511068f, -0.014896563f, -0.059305694f, + -0.046229184f, 0.014125846f, 0.18356639f, -0.024558617f, + 0.033004966f, -0.011124307f, -0.038662586f, 0.011659124f, + -0.0016968033f, -0.017864492f, 0.090237737f, 0.036376927f, + -0.023384774f, 0.064256795f, -0.0456177f, 0.063539021f, + 0.021788321f, -0.063986592f, -0.056218293f, 0.055853907f, + -0.056596357f, -0.080015339f, -0.014634962f, 0.057021365f, + -0.10472675f, -0.088515639f, -0.063756108f, -0.11113141f, + -0.061573561f, -0.4633539f, -0.012972392f, -0.03476521f, + -0.17169572f, -0.079512931f, -0.0015828601f, -0.07150171f, + 0.054364152f, -0.049222052f, -0.036308311f, -0.021828407f, + 0.071700819f, -0.01792858f, 0.13476956f, 0.32027879f, + 0.12848549f, -0.049548473f, -0.04192267f, 0.090029299f, + 0.090467371f, 0.098181151f, -0.16118766f, 0.31873515f, + -0.013106297f, 0.044661392f, -0.14297478f, 0.0031879919f, + -0.20344174f, 0.0414146f, -0.11261887f, 0.031803325f, + 0.072335258f, -0.10898581f, -0.014650621f, -0.030276129f, + -0.035547558f, -0.077516809f, -0.064569727f, 0.26507524f, + -0.038382333f, -0.15101509f, 0.047549378f, 0.11924168f, + -0.1253996f, 0.59274048f, 0.025971413f, -0.08726792f, + 0.04792342f, 0.022037946f, -0.0021071993f, -0.014417749f, + 0.2172672f, 0.020607736f, -0.13237359f, 0.24565025f, + 0.17149775f, -0.10105985f, 0.084919028f, -0.076255098f, + 0.064635679f, -0.023290174f, -0.075648367f, -0.10886326f, + 0.0034513683f, -0.16656607f, 0.043286908f, -0.041587804f, + 0.014040859f, 0.043162912f, -0.039364222f, 0.0015042366f, + -0.013360206f, -0.12894851f, 0.23209924f, 0.089460298f, + 0.044859845f, 0.014635383f, 0.12871243f, 0.086147591f, + -0.19205941f, 0.022759108f, -0.03684872f, -0.024157403f, + -0.039844375f, 0.058176685f, -0.082900047f, -0.050308276f, + 0.046107687f, -0.11517268f, -0.094991237f, -0.28734985f, + 0.018558105f, 0.25033581f, 0.065556645f, -0.016766673f, + 0.025401145f, -0.08123371f, -0.15777488f, -0.07187479f, + 0.0027664218f, -0.053631134f, -0.21064432f, -0.1651812f, + 0.13746293f, -0.013807723f, -0.10898145f, -0.026208242f, + -0.00041016287f, 0.047606312f, -0.039919388f, -0.025350465f, + -0.14028297f, 0.1251148f, 0.033966869f, -0.043915205f, + 3.3477962e-05f, 0.026727309f, 0.087634221f, 0.098741002f, + -0.019830532f, -0.038210262f, -0.014585622f, -0.078782044f, + 0.0076225363f, -0.18443848f, -0.030440066f, 0.016338088f, + -0.22178356f, 0.12854451f, 0.087870009f, -0.061643369f, + 0.24829432f, -0.00035684044f, 0.0025272886f, -0.14455168f, + -0.041852899f, 0.060144603f, -0.21387362f, -0.002377491f, + 0.044294447f, -0.23111448f, -0.055276975f, 0.48047706f, + 0.0017940594f, 0.041542962f, 0.11020902f, -0.033590842f, + -0.089124322f, 0.092030182f, -0.31695521f, -0.014601234f, + 0.085557833f, -0.093365118f, 0.18022348f, -0.23850943f, + -0.14489689f, -0.12577453f, 0.045578461f, -0.015145334f, + 0.056015216f, 0.11322316f, -0.018118059f, 0.047359075f, + -0.20236038f, -0.16754515f, 0.067938596f, 0.39761952f, + -0.16665977f, -0.020737553f, 0.010665665f, 0.014033545f, + 0.024591113f, 0.43342704f, -0.007573335f, -0.029377859f, + 0.14124444f, 0.068929911f, -0.012070616f, 0.011849932f, + -0.12737413f, -0.359458f, 0.12234838f, -0.10805269f, + 0.071959287f, -0.078671947f, -0.21502756f, -0.043964937f, + 0.069268517f, -0.0077156783f, -0.069054991f, -0.12273895f, + 0.0022111207f, 0.033488058f, 0.13975571f, -0.23445711f, + 0.019454531f, 0.36493367f, 0.024555255f, -0.014552085f, + -0.04422839f, -0.14550139f, -0.10090887f, 0.11292481f, + 0.10667825f, -0.11612549f, 0.089620262f, 0.046495609f, + -0.11746836f, -0.02913562f, -0.041137725f, 0.01176509f, + -0.027710639f, -0.081260487f, 0.04163957f, -0.2462073f, + -0.089145206f, -0.19455266f, -0.084583297f, -0.3222146f, + -0.087122723f, 0.22108823f, -0.11077996f, 0.001305504f, + -0.034956861f, -0.073056281f, -0.10739017f, 0.03950135f, + -0.034209199f, 0.1947459f, -0.17502676f, -0.30767143f, + 0.15136313f, -0.01305093f, 0.029009514f, 0.0202145f, + -0.0014164131f, 0.049169648f, -0.096554548f, -0.016821319f, + -0.083584212f, 0.39999053f, 0.15426446f, -0.031579152f, + -0.00041610387f, 0.1895929f, 0.049323246f, -0.089170784f, + -0.039679568f, 0.012726019f, 0.023737872f, 0.11418902f, + -0.16921581f, 0.038689494f, 0.042357907f, 0.041467268f, + 0.02348491f, -0.15778628f, -0.082302086f, -0.023419799f, + 0.27231702f, 0.12808339f, -0.014468648f, -0.027340589f, + -0.085209094f, 0.052078199f, -0.033535138f, -0.10221013f, + -0.020753181f, 0.43905541f, 0.036127552f, -0.26443556f, + -0.18925083f, -0.010179508f, 0.14364025f, 0.025730554f, + 0.27794591f, -0.70269704f, -0.64031547f, -0.75751382f, + 0.086904339f, 0.082733892f, -0.29073003f, 0.39529872f, + 0.34100717f, -0.024793286f, -0.086660765f, -0.0041391081f, + -0.95386255f, -0.51397437f, -0.052945223f, 0.011423296f, + 0.029872041f, -0.57445526f, -0.026893502f, -0.090241313f, + -0.18149132f, 0.39393228f, -0.066323474f, 0.038010821f, + -0.14165989f, 0.24071531f, 0.070430063f, -0.089362949f, + 0.20829737f, 0.0068781483f, -0.026453115f, -0.01137232f, + -0.023972502f, -0.070720389f, -0.21049544f, 0.36357576f, + -0.12699524f, 0.041931927f, 0.13759442f, 0.015999367f, + 0.051298078f, 0.0089453282f, -0.29934388f, 0.058262598f, + -0.0038816568f, 0.31896093f, 0.00088104978f, -0.54487556f, + -0.22797406f, -0.0086333007f, -0.037441291f, -0.022814207f, + 0.13116629f, 0.1165693f, -0.43755576f, -0.037046544f, + 0.038650721f, -0.22286566f, 0.4990007f, -0.046179555f, + 0.091010384f, 0.674977f, 0.17613345f, -0.0032745784f, + -0.10580309f, -0.14125107f, 0.13408484f, 0.84966439f, + -0.21929996f, 0.113648f, -0.069546022f, 0.084215641f, + 0.035236336f, -0.76080132f, -0.14230831f, 0.031520173f, + 0.041689713f, 0.085462838f, 0.28406993f, -0.33319348f, + 0.053093877f, -0.090333559f, 0.28167209f, -0.60149276f, + -0.041489985f, -0.0026734404f, 0.69653648f, -0.013558565f, + -0.0097052157f, 0.016919145f, -0.13761684f, -0.006347259f, + -0.40159872f, -0.059565719f, 0.15903305f, -0.26388997f, + 0.024725083f, 0.3447544f, -0.066792294f, 0.029110719f, + 0.33367184f, -0.031281371f, -0.029195542f, 0.15220247f, + 0.11987072f, -0.10418367f, 3.3778226e-05f, -0.028266435f, + -0.016843898f, 0.41889805f, -0.18923108f, 0.075732887f, + -0.14150938f, -0.024042223f, 0.0090885358f, -0.48418468f, + 0.020962218f, -0.11673486f, -0.14706706f, 0.10682641f, + -0.10500552f, -0.19603954f, 0.030488096f, 0.070057094f, + 0.042489715f, -0.050060865f, -0.53795981f, -0.064780593f, + -0.023533979f, 0.045206595f, -0.3162632f, 0.058573976f, + -0.044979978f, 0.065083526f, 0.16966769f, 0.35767245f, + 0.34941339f, -0.12038619f, -0.085209891f, 0.031444203f, + 0.5337612f, 0.15701032f, 0.031220118f, -0.0083923889f, + 0.099932969f, -0.33716261f, -0.066649653f, 0.15879455f, + 0.16282292f, 0.43576536f, -0.089102916f, -0.0085827466f, + 0.029467866f, -0.0091822408f, -0.026712351f, 0.05778446f, + -0.22748077f, -0.083450787f, 0.026414908f, 0.013771105f, + 0.099507757f, 0.00032147579f, -0.26260662f, -0.45921984f, + 0.057408184f, 0.065640844f, -0.0058127795f, -0.054807868f, + 0.037782863f, 0.0062462646f, 0.39028791f, 0.028260499f, + -0.0048690191f, -0.10792262f, 0.28937027f, 0.086609207f, + -0.10105714f, -0.073411085f, 0.0068449317f, 0.0065962314f, + -0.032307155f, -0.084665447f, 0.51379013f, 0.24310735f, + 0.0041113612f, -0.0094530396f, 0.73171264f, 0.26352495f, + -0.21986006f, -0.413261f, -0.49280062f, 0.007219099f, + -0.049870729f, 0.064979844f, -0.22787008f, 0.19394606f, + 0.23830472f, -0.053593379f, -0.064876609f, 0.031992618f, + 0.037239369f, -0.29613164f, -0.040270969f, -0.0047897571f, + -0.022224538f, 0.10374701f, -0.050618771f, -0.081236497f, + -0.055627197f, -0.0083052749f, 0.12447654f, -0.34930459f, + 0.033645511f, 0.020379141f, -0.37304252f, 0.012354812f, + 0.023863364f, 0.023761898f, -0.12974364f, 0.025548982f, + 0.15995227f, -0.10525051f, -0.10463121f, 0.18590346f, + -0.031823821f, 0.012660676f, -0.092733622f, -0.011519541f, + -0.42165378f, -0.026665f, 0.0048159175f, -0.13219355f, + 0.01726694f, -0.14132057f, 0.037154045f, -0.044399172f, + 0.17369062f, -0.23995659f, -0.12238596f, -0.038609218f, + 0.05616302f, 0.045533076f, 0.029701564f, -0.10795777f, + 0.068243347f, 0.025954163f, -0.35353759f, 0.024760675f, + -0.071335919f, -0.12287125f, 0.026654845f, -0.18072341f, + 0.15848824f, 0.1024728f, -0.510463f, -0.050452996f, + 0.11416008f, -0.10992361f, -0.31054658f, -0.072780713f, + 0.0726097f, 0.12856622f, 0.4577544f, 0.11179785f, + 0.10427023f, -0.11607425f, 0.045783918f, -0.034916624f, + 0.26929301f, 0.27441683f, -0.053078402f, -0.03080051f, + 0.11808357f, -0.26440614f, -0.035575155f, 0.020431167f, + 0.10305984f, 0.1661443f, -0.050616965f, -0.047324955f, + 0.015005269f, -0.21453622f, -0.0092386501f, -0.041018385f, + -0.1118127f, -0.10824775f, 0.022445288f, 0.024456616f, + 0.0071838205f, 0.10187818f, -0.19228013f, -0.38988265f, + 0.20990492f, -0.015913576f, -0.1031851f, -0.0096261511f, + -0.071011826f, 0.023355028f, -0.0030069167f, -0.14604557f, + 0.0097098229f, -0.11857948f, 0.16660279f, 0.18338592f, + 0.013398996f, 0.14053316f, -0.0077699251f, -0.014981661f, + 0.0041887504f, 0.061522998f, 0.1159514f, 0.19992335f, + -0.010488648f, -0.06254334f, 0.34953538f, 0.19734998f, + 0.13676327f, -0.36511451f, -0.26190469f, 0.019193107f, + -0.041848056f, -0.072105341f, -0.056612939f, -0.27429426f, + -0.0048957751f, -0.00430346f, -0.029531909f, 0.056802019f, + -0.069395147f, -0.064653762f, 0.070689231f, 0.013306175f, + -0.022169126f, 0.035710063f, 0.049032472f, -0.20750074f, + -0.016219383f, -0.031734437f, -0.1416918f, -0.56071043f, + 0.15285264f, -0.010803407f, -0.22752903f, 0.017715711f, + 0.018654088f, -0.029987661f, 0.080488779f, 0.0017851265f, + -0.041522183f, -0.0059564584f, 0.078907162f, -0.13108617f, + 0.017081378f, -0.068012275f, 0.10635238f, 0.019329406f, + 0.025948156f, -0.024156997f, 0.022014968f, 0.11048877f, + 0.012465646f, -0.05343394f, -0.043302231f, -0.027064038f, + 0.13079855f, -0.047925834f, -0.040850889f, -0.027792566f, + 0.18829291f, -0.075308464f, -0.012813032f, 0.031016557f, + 0.0040943902f, -0.10665118f, 0.0080954563f, -0.095858239f, + 0.17570429f, 0.015905149f, -0.086807616f, -0.11907196f, + 0.17642488f, -0.042071424f, -0.31073007f, 0.043725971f, + 0.037727498f, 0.028828232f, -0.20798728f, -0.064352848f, + 0.033720966f, 0.08703135f, -0.14334497f, -0.27813604f, + 0.18299662f, -0.10006654f, -0.060193624f, -0.068982407f, + 0.16630845f, 0.27876931f, 0.043705046f, -0.016189316f, + 0.21689323f, -0.17320104f, 0.0059297178f, -0.033754732f, + 0.18614726f, -0.099432521f, 0.06454435f, 0.043871596f, + -0.11214449f, -0.045592476f, 0.029081732f, 0.0028729911f, + 0.033449851f, -0.096236236f, -0.020186776f, -0.029410373f, + -0.1538635f, 0.24660195f, -0.12049115f, -0.13366571f, + 0.39186382f, -0.018306473f, -0.0030953398f, 0.0005599467f, + -0.055328794f, 0.0079302033f, -0.16767325f, -0.14367147f, + -0.0015678975f, -0.073327892f, 0.076443106f, 0.12484454f, + 0.006322097f, 0.34550825f, 0.00050105283f, 0.031521637f, + 0.05046282f, 0.068883725f, -0.21434698f, 0.11939751f, + -0.036724459f, -0.15215477f, 0.17086394f, 0.14013784f, + -0.097881839f, -0.072148785f, -0.28618169f, 0.0059776888f, + 0.00088139973f, -0.024253616f, -0.13892977f, -0.32534328f, + -0.028685318f, -0.024538223f, -0.11970492f, -0.14136565f, + -0.025667122f, 0.061770476f, 0.10954863f, 0.034978021f, + 0.0097771147f, 0.0091487262f, 0.080727652f, -0.11990442f, + 0.11076814f, -0.19741584f, 0.1221559f, -0.30282876f, + 0.14820904f, 0.0041803597f, -0.10393316f, -0.0049569113f, + -0.018840991f, 0.014083013f, 0.1112919f, -0.02031038f, + -0.082538962f, 0.038397685f, -0.13958833f, -0.12188518f, + -0.042491615f, -0.15483384f, -0.014336654f, -0.028370015f, + 0.14579946f, -0.011253605f, -0.064313583f, 0.32379511f, + -0.097694159f, 0.053207636f, 0.043432306f, -0.051922105f, + 0.2158502f, 0.31236491f, 0.047050186f, -0.022895072f, + -0.14483747f, 0.13882245f, -0.023568137f, 0.067168422f, + 0.027589153f, -0.093909688f, 0.13304353f, 0.014515225f, + 0.079866454f, -0.053009428f, 0.14870813f, 0.13400951f, + -0.069081709f, -0.1908389f, -0.32047215f, 0.039309029f, + 0.028706351f, -0.11844221f, -0.25569236f, 0.11258619f, + -0.015814388f, -0.031691f, -0.55965436f, -0.10521114f, + 0.031602453f, 0.005652226f, -0.059192255f, 0.062537901f, + 0.098472267f, -0.15939331f, -0.049262166f, 0.00012114476f, + 0.19627006f, -0.18437505f, -0.10082301f, 0.0036480082f, + -0.12466019f, -0.23699415f, -0.00085736695f, 0.058780491f, + -0.19301584f, 0.38834387f, -0.028089328f, -0.044098541f, + 0.25040531f, -0.053848632f, -0.003122638f, 0.011122889f, + -0.12170938f, 0.34255981f, -0.048718072f, 0.039637618f, + 0.55134434f, -0.016724003f, -0.02918884f, -0.04878642f, + -0.046508789f, 0.024017576f, 0.038598653f, -0.21881302f, + -0.0039072982f, -0.1599935f, 0.095658801f, 0.29354262f, + 0.0090287244f, 0.10013132f, -0.01391715f, -0.024779441f, + -0.044686008f, -0.040043946f, -0.2600891f, 0.044826228f, + 0.027145665f, 0.024862286f, 0.10387837f, 0.15888041f, + -0.22464032f, 0.16095822f, -0.23800284f, -0.020931643f, + 0.048264153f, -0.052800015f, 0.16407667f, -0.23316339f, + -0.0058506303f, 0.038766082f, -0.08243566f, 0.073903173f, + -0.0090402812f, 0.20687473f, -0.17201601f, -0.04597839f, + 0.023715936f, 0.060905959f, 0.095841333f, -0.10273389f, + -0.036984172f, -0.25298452f, -0.16005524f, -0.023395861f, + 0.022413692f, -0.021299608f, -0.17996468f, -0.015178293f, + 0.004007489f, 0.0046022083f, -0.046756674f, 0.021223014f, + -0.094834723f, -0.12694025f, -0.037899636f, -0.20423813f, + 0.029610137f, -0.18952142f, -0.10093374f, 0.11785958f, + -0.010667476f, -0.012772636f, 0.0085878409f, -0.032590177f, + -0.037995942f, 0.083662912f, 0.063727781f, -0.039121754f, + 0.1841725f, 0.16046786f, 0.012560768f, -0.0053459806f, + -0.15490499f, 0.01669623f, 0.014420583f, 0.065120921f, + 0.0016512153f, 0.044354685f, 0.061817225f, 0.084285676f, + 0.069251463f, -0.0030546391f, -0.030621991f, -0.14013839f, + 0.037721831f, -0.0047879354f, -0.22753043f, 0.0066360431f, + -0.041887302f, 0.051954806f, -0.23836851f, 0.44188824f, + 0.0626911f, 0.090100311f, -0.10771076f, 0.10577706f, + -0.20156397f, 0.020988435f, -0.10773864f, -0.042842552f, + -0.0090369685f, -0.2789675f, 0.014893203f, 0.034706783f, + -0.083557926f, -0.13073318f, -0.034124821f, -0.0097446544f, + -0.16418557f, -0.19073336f, -0.02335421f, 0.064451165f, + -0.18423294f, 0.24450704f, 0.053772002f, 0.092463106f, + 0.0076472112f, 0.062204774f, -0.0051420913f, -0.0096862717f, + 0.12250492f, 0.16873749f, -0.060169253f, 0.1113943f, + 0.43846223f, -0.052299578f, -0.032156311f, -0.071794175f, + -0.079206571f, -0.033040471f, -0.086543798f, -0.1670398f, + -0.0091757094f, -0.10235826f, 0.14262713f, 0.077353388f, + 0.048242386f, -0.17818291f, -0.0075574913f, 0.019327508f, + -0.059867416f, 0.034546569f, 0.15979713f, 0.079641737f, + 0.031229353f, -0.13495199f, -0.073666111f, 0.11257502f, + -0.19216907f, 0.07247296f, -0.13632683f, 0.016196283f, + 0.048465505f, -0.09211994f, 0.087408006f, -0.13430028f, + 0.009612795f, -0.0040942528f, -0.025184607f, -0.079536222f, + -0.089734927f, 0.24190009f, 0.0043186215f, 0.023216547f, + -0.029350203f, 0.013097236f, 0.035753056f, -0.094057709f, + 0.1049476f, -0.052318834f, 0.22210063f, 0.067056052f, + 0.075828046f, -0.0015316583f, -0.10379232f, 0.016578004f, + -0.0034985072f, 0.017480927f, -0.077516563f, -0.030850014f, + -0.066505313f, 0.10845886f, 0.051914409f, -0.15016361f, + -0.025659926f, -0.042933062f, 0.03184836f, 0.08990325f, + -0.0063569369f, -0.073913805f, -0.023300933f, -0.23102251f, + -0.030541508f, 0.076722398f, -0.047631525f, -0.099984631f, + 0.086408079f, -0.28463483f, -0.24029423f, -0.01136388f, + -0.079540916f, -0.10205994f, 0.005238214f, 0.053784281f, + 0.045823462f, 0.11178763f, 0.16625309f, -0.0077567478f, + 0.010786452f, -0.028376697f, 0.015057999f, 0.2810562f, + 0.13376036f, 0.077413626f, -0.22573374f, 0.049765166f, + -0.037708562f, 0.11627903f, -0.10651999f, 0.42962173f, + -0.051622942f, 0.0037287092f, 0.16382542f, 0.071820684f, + 0.35224649f, 0.13240381f, 0.038908027f, 0.042828586f, + -0.06293384f, -0.0090183821f, 0.062762722f, 0.021594068f, + -0.23859335f, -0.071785599f, -0.090211079f, -0.067491636f, + 0.025003858f, -0.20572804f, 0.093327262f, -0.021288574f, + -0.19902492f, -0.56932706f, -0.0076242629f, 0.061469749f, + -0.058956429f, -0.004925868f, -0.0023894056f, 0.024676275f, + 0.14320797f, -0.10437836f, -0.57641309f, 0.09203776f, + 0.53306967f, 0.060386021f, 0.026157994f, -0.096350618f, + 0.079123057f, 0.031522579f, -0.10954148f, -0.18697567f, + -0.0012768138f, -0.096662015f, 0.24146347f, -0.039608825f, + -0.071183696f, -0.22710586f, -0.011822877f, -0.025412425f, + -0.023429718f, 0.073794052f, 0.22484101f, 0.023006992f, + -0.075102769f, 0.0057501676f, -0.0093306098f, 0.0479756f, + -0.051917344f, -0.10134705f, -0.11967035f, 0.012585446f, + 0.013372624f, -0.038368549f, -0.0058750701f, 0.03051248f, + 0.10873027f, 4.007214e-05f, 0.043110322f, -0.061906062f, + 0.079517975f, 0.38229567f, -0.09639471f, -0.013940621f, + -0.025320791f, -0.10735353f, 0.21675681f, 0.02721067f, + -0.022010311f, -0.17243296f, -0.020873271f, -0.059708808f, + 0.16455948f, 0.0070109582f, -0.099987179f, -0.0050128107f, + -0.011320522f, -0.032590792f, 0.035302978f, -0.0091556609f, + -0.14767762f, 0.035930052f, 0.029512059f, -0.010479788f, + 0.00040158551f, -0.047960885f, 0.045022551f, 0.092052214f, + 0.010597417f, 0.092329338f, 0.023574766f, -0.47954509f, + 0.14480601f, -0.018015942f, -0.0051922039f, 0.028784987f, + -0.14795791f, 0.22320199f, -0.23324509f, 0.0043374998f, + 0.023466835f, -0.027567225f, 0.0093156137f, -0.0088632926f, + 0.007851528f, -0.020352056f, -0.1583662f, -0.02643778f, + 0.024041094f, -0.29081628f, 0.0020635049f, -0.21269305f, + 0.037084401f, -0.055710867f, 0.059402939f, 0.081084579f, + 0.095660664f, 0.16625872f, -0.19061984f, 0.38078174f, + -0.01419424f, 0.052231796f, 0.23393291f, -0.3566865f, + 0.072345428f, 0.08495722f, -0.045201447f, -0.012994065f, + -0.026060967f, 0.23606682f, 0.013707311f, -0.00036922735f, + -0.16130514f, -0.17823008f, -0.030901801f, 0.040357042f, + 0.00093694864f, -0.12599871f, -0.018811366f, -0.080104902f, + -0.061048791f, 0.04865586f, 0.0099000102f, 0.0094204899f, + -0.039305415f, -0.14711398f, -0.018159939f, -0.013333757f, + -0.11075471f, -0.3447749f, -0.033500113f, -0.092492826f, + 0.62719136f, 0.030659072f, -0.18570991f, 0.05347525f, + 0.014452123f, -0.013972853f, -0.037924282f, 0.045797605f, + 0.0054698153f, -0.033014588f, 0.33961615f, -0.20855322f, + 0.071693465f, -0.055598754f, 0.00118224f, 0.0011549086f, + 0.058645803f, 0.11095775f, -0.13308527f, 0.013023951f, + -0.044617463f, 0.073497728f, -0.44005054f, 0.0078695733f, + 0.097130626f, -0.031042244f, -0.11396312f, -0.024832131f, + 0.0186584f, -0.10312366f, 0.2578508f, -0.016537318f, + -0.0093803117f, -0.052767813f, 0.1223511f, 0.082161687f, + 0.039921697f, 0.31222332f, 0.0060843895f, 0.016765969f, + -0.012347418f, -0.08119645f, -0.021580478f, -0.11163866f, + -0.044919539f, 0.22708192f, -0.2068374f, -0.10078827f, + 0.15556134f, 0.027290192f, 0.048673075f, 0.0086493641f, + 0.0029131842f, 0.02521559f, -0.11072427f, -0.014230072f, + -0.10950811f, 0.18285432f, 0.15971546f, -0.16240539f, + -0.0076807989f, 0.13098143f, 0.031934798f, -0.21512654f, + 0.026255319f, -0.0082562985f, -0.013709172f, -0.1326094f, + 0.015836056f, 0.16395028f, -0.030613499f, -0.064646885f, + 0.027997119f, 0.1623171f, 0.071082123f, -0.051238231f, + 0.50058138f, -0.059462827f, -0.016092377f, 1.0848987f, + -0.10404827f, 0.07758902f, 0.30094633f, -0.026706047f, + -0.13192689f, 0.84754884f, 0.36701208f, 0.12132024f, + -0.78233761f, -0.26592362f, 1.6286242f, -0.0031957305f, + 0.1527016f, -0.52482724f, 0.47786689f, 0.17951787f, + -0.095929883f, 0.27237707f, -0.065231815f, 0.10966983f, + 0.078730159f, 0.051925953f, -0.091926165f, -0.090415873f, + -1.9351186f, -0.60993087f, 0.011611055f, -0.0046346467f, + 0.076627783f, -0.99552244f, 0.021641189f, -1.2067186f, + -0.36831886f, 0.46845615f, -0.0052526882f, -0.18248254f, + 0.0046503036f, 0.019169809f, 0.023991928f, 0.0066790925f, + -0.14139482f, -0.24726757f, -0.001194632f, 0.025894595f, + 0.11848386f, -0.57052583f, -2.2878833f, 1.0256157f, + -0.78312641f, -0.10353225f, 0.36693051f, -0.07445576f, + 0.15375063f, -0.034898195f, -0.072189964f, 0.23004088f, + -0.0036075539f, -0.39414689f, -0.18552388f, -0.69238806f, + 0.16593626f, 1.2344528f, -0.036111061f, 0.036897358f, + 0.080023222f, -0.0010727249f, -0.64986694f, 0.25929242f, + -0.080017015f, -0.046673667f, -1.2282281f, 0.13534664f, + -0.0049035125f, 0.20868449f, 0.23583604f, 0.054616269f, + 0.20011379f, 0.033585757f, 0.23104574f, 0.25890824f, + 0.1137422f, 0.21459538f, 0.053289823f, 0.16786876f, + 0.20909455f, -0.78634316f, -0.13320795f, -0.022591729f, + -0.04683131f, 0.057383087f, -0.15109503f, -0.40500599f, + 0.15915328f, 0.025673902f, -0.027654117f, 0.24364565f, + 0.012838678f, -0.015255561f, 1.3005444f, -0.0023622846f, + 0.021734387f, -0.028605066f, 0.16270092f, 0.012478122f, + -1.0922436f, -0.23076719f, 0.085491344f, 0.10954281f, + 0.019475115f, 0.46319962f, 0.083655939f, 0.20259003f, + 0.21196181f, 0.010469458f, -0.0019110987f, 0.047552288f, + 0.12680553f, 0.062860206f, -0.0053056893f, -0.064757712f, + -0.056694049f, 0.29940531f, -0.063863561f, 0.006923418f, + -0.18470871f, -0.090653837f, 0.01228186f, -0.063423149f, + 0.067038305f, 0.064304657f, 0.10996268f, 0.020756556f, + -0.070927262f, -0.23136915f, 0.13455923f, 0.31252983f, + -0.022624286f, 0.25807133f, 0.043428838f, 0.0032038039f, + -0.16029908f, 0.11865752f, 0.33240315f, -0.036939416f, + -0.0024309049f, 0.056862466f, 0.14850692f, -0.016064331f, + -0.065650918f, -0.15242258f, 0.06394089f, -0.0099619115f, + 0.40704349f, 0.32161379f, -0.081826724f, -0.035382356f, + -0.17263146f, -0.54716015f, -0.047673866f, -0.40403622f, + -0.08130873f, 0.91611081f, 0.023237927f, 0.11951555f, + -0.065391064f, -0.1038001f, -0.025007488f, 0.034112338f, + -0.084476031f, -0.080417596f, 0.006815874f, 0.00069920399f, + 0.0069536371f, -0.29500216f, -2.2373295f, -0.20806843f, + -0.19067506f, -0.0020816731f, 0.086665854f, -0.078415029f, + -0.058943279f, -0.069107771f, 0.17991863f, 0.13859256f, + -0.0037005532f, -0.033125665f, 0.015628219f, -0.03185774f, + -0.0028265994f, -0.1541478f, 0.020791674f, -0.013947391f, + -0.12074175f, -0.026418675f, 0.5360226f, 0.31743604f, + -0.18447681f, -0.01908524f, -0.044419341f, 0.27968222f, + -0.078795604f, -0.37560621f, -0.41017732f, -0.0087963082f, + 0.04565018f, 0.13080736f, -0.053235788f, -0.2309563f, + 0.28617102f, -0.016512541f, 0.016412828f, -0.34147018f, + 0.074076034f, -0.59498882f, -0.038349357f, 0.0031980579f, + 0.0052856077f, -0.032706723f, 0.036177594f, -0.053747211f, + 0.011388752f, -0.080332093f, 0.52679116f, 0.44527948f, + 0.15945376f, 0.0086977612f, 0.23367324f, 0.0251396f, + -0.020776207f, 0.092287555f, -0.17860951f, 0.010682963f, + -0.10049441f, 0.041344337f, 0.097885564f, -0.062904343f, + -0.020772744f, -0.018710334f, -0.094069257f, 0.11350382f, + -0.52094972f, 0.0084395073f, -0.0015102992f, -0.064616702f, + 0.080887452f, -0.13176005f, -0.04171735f, -0.07830558f, + -0.16495723f, -0.45016438f, 0.066041276f, 0.07396476f, + 0.091846146f, 0.09718205f, -0.012610423f, -0.13429791f, + -0.031776875f, 0.016998855f, -0.011660682f, 0.033287007f, + 0.053377092f, -0.32131499f, 0.14663696f, -0.11218856f, + 0.035623811f, 0.19696407f, -0.018963451f, -0.021866439f, + -0.055358417f, 0.094887532f, 0.27059615f, -0.61762929f, + 0.099783733f, -0.034887712f, 0.55603427f, -0.034411244f, + -0.10678107f, -0.10396962f, -0.10346498f, 0.072930299f, + 0.4975034f, 0.57621312f, 0.091916688f, 0.014624501f, + 0.019666282f, -0.46469548f, 0.055886306f, -0.38569579f, + -0.169462f, 0.85081762f, 0.039622314f, -0.0096130902f, + -0.21598679f, 0.25130048f, 0.047557484f, 0.016112672f, + 0.046019059f, -0.032540653f, -0.010785227f, -0.012094024f, + -0.063488759f, -0.035891745f, -1.5822506f, -0.28632534f, + 0.0088096941f, 0.0037261089f, 0.035367168f, 0.044695653f, + -0.24068841f, -0.0046724291f, -0.1775872f, 0.081677109f, + 0.0044413516f, 0.15628521f, -0.0044719181f, 0.0062764795f, + 0.088293321f, -0.35385129f, 0.011627432f, -0.031562056f, + -0.092634179f, -0.037253156f, 0.34298322f, 0.28514218f, + -0.11141951f, 0.017314043f, 0.0079798028f, 0.17992072f, + 0.15276386f, -0.26383054f, -0.24643551f, -0.035701077f, + 0.039278265f, 0.15863907f, 0.090329215f, -0.20885076f, + 0.013949547f, -0.033430491f, 0.0489606f, -0.10122415f, + -0.13855976f, -0.32363406f, 0.029557217f, 0.0005588624f, + 0.043201603f, -0.068657368f, -0.013219078f, -0.019279044f, + -0.074106395f, 0.0933173f, 0.10298301f, 0.24480884f, + 0.16081093f, 0.010452769f, 0.26251146f, -0.024331272f, + -0.0053296969f, -0.031484526f, 0.082074024f, -0.018082166f, + 0.085410923f, 0.09484762f, 0.18130082f, -0.29268724f, + -0.0030437198f, -0.17033598f, 0.022544352f, -0.052867167f, + -0.036807917f, 0.05855025f, 0.00090980279f, -0.12988847f, + 0.009179295f, 0.027613727f, -0.068614379f, -0.094559953f, + -0.067957327f, -0.18315187f, 0.044769146f, -0.044549186f, + -0.14260334f, -0.029123759f, 0.002904752f, -0.14069298f, + 0.043196756f, -0.012311774f, -0.040447284f, 0.053672556f, + 0.084303223f, -0.28784251f, 0.1035684f, 0.044838347f, + 0.051697791f, 0.13166529f, 0.15787406f, -0.042684369f, + -0.052428529f, 0.0063666832f, 0.21377066f, -0.90303922f, + 0.032871194f, -0.14577113f, 0.064216845f, -0.37701833f, + -0.28552502f, -0.0647268f, -0.057327066f, 0.073763154f, + 0.48306757f, 0.46824667f, 0.011765787f, 0.054167241f, + 0.085996903f, -0.32628068f, -0.023530683f, -0.34287572f, + -0.032553192f, 0.58291125f, -0.015409646f, 0.10776246f, + -0.45433307f, 0.2224158f, -0.05451069f, 0.028529653f, + 0.10655186f, 0.092252247f, 0.014413889f, -0.011254801f, + -0.12472474f, 0.3327097f, -1.3355311f, -0.18915954f, + 0.097819999f, -0.081503399f, 0.0025568735f, 0.056219306f, + -0.24308304f, -0.052448917f, -0.3183538f, 0.00943485f, + -0.0016213451f, -0.071923144f, 0.044152454f, 0.12427946f, + 0.069905899f, -0.13781989f, 0.02540281f, 0.035607558f, + -0.13338055f, -0.10629809f, -0.14595518f, 0.1674754f, + -0.11506929f, -0.057909723f, -0.044905666f, 0.049582604f, + -0.017584231f, 0.1168911f, -0.28954509f, -0.014913995f, + 0.058459684f, 0.071938895f, -0.14131622f, -0.24811655f, + -0.06616126f, -0.1109706f, 0.04715452f, 0.070132338f, + -0.049622301f, -0.21997853f, 0.043496907f, -0.0060401317f, + -0.01069637f, -0.1186865f, 0.13640784f, 0.044245545f, + -0.043959346f, -0.1141243f, 0.12853427f, 0.21574773f, + -0.010266164f, -0.017121229f, 0.21259643f, -0.025012163f, + -0.0063817939f, 0.026400462f, 0.35245305f, 0.034548849f, + 0.070568003f, 0.0062675946f, 0.24937856f, -0.16897707f, + 0.021199917f, -0.31527999f, 0.098257534f, -0.028279193f, + 0.20088267f, -0.034368709f, 0.0016757518f, 0.1502317f, + -0.10558288f, -0.1584136f, -0.038478002f, -0.037384804f, + -0.032049563f, 0.38244486f, 0.15163383f, 0.013069124f, + -0.34172249f, 0.018837212f, 0.024284458f, -0.0038294783f, + -0.037385572f, 0.090103209f, 0.081946582f, -0.0027771485f, + -0.045870986f, -0.25344265f, 0.068547316f, -0.033931676f, + -0.036286835f, 0.057637177f, -0.13586339f, -0.015116972f, + -0.074022904f, 0.066093564f, 0.27365443f, -0.64269471f, + -0.011468048f, -0.014967841f, -0.67286867f, 0.12416545f, + 0.23284435f, -0.051795617f, 0.059845287f, 0.023038991f, + 0.28196055f, -0.23106956f, 0.051996451f, -0.08086171f, + -0.021344561f, -0.34322831f, 0.063463837f, -0.33451128f, + 0.19231892f, 0.29634121f, -0.064176254f, 0.0078280233f, + -0.40443248f, 0.37568459f, 0.0029091954f, -0.011456769f, + 0.15749718f, 0.18985063f, -0.0068377103f, -0.004686025f, + 0.046094522f, 0.53192002f, -0.75700545f, -0.11605954f, + 0.1343963f, 0.02380966f, -0.0080516674f, 0.057391934f, + -0.1186562f, 0.041177884f, -0.100646f, -0.21796964f, + 0.010054787f, -0.025036965f, -0.13095959f, 0.17440639f, + 0.11553787f, -0.14754875f, -0.0072494927f, 0.010265118f, + 0.0014665595f, -0.049412772f, -0.369899f, 0.19086269f, + 0.016865242f, 0.055785503f, 0.083086647f, 0.067435242f, + -0.21693003f, 0.15729387f, -0.067935608f, 0.005509533f, + -0.028378837f, 0.099794783f, -0.024490118f, -0.028157191f, + -0.044883143f, -0.025631243f, -0.0033872798f, -0.0034647251f, + -0.12884906f, 0.057225045f, -0.093781263f, 0.017551553f, + -0.02069187f, -0.12929228f, -0.032477181f, 0.14308043f, + -0.16101514f, -0.15310861f, -0.15184534f, 0.14981824f, + -0.0019980641f, 0.022368647f, 0.08183258f, 0.016081369f, + 0.0059093903f, -0.047347672f, 0.1513903f, -0.0022216227f, + -0.08713229f, 0.010601297f, -0.13654825f, -0.11585274f, + -0.010110096f, -0.22927026f, 0.014448831f, 0.022267904f, + 0.017061343f, 0.039213736f, 0.023091156f, 0.11845379f, + -0.13318315f, -0.021628415f, 0.012058618f, 0.0093274256f, + 0.028603008f, 0.096952669f, -0.014145567f, 0.0349718f, + 0.0047081327f, 0.028613333f, -0.0095780035f, 0.025814218f, + -0.012062912f, 0.0016579512f, -0.0033499701f, -0.014774337f, + -0.06696444f, -0.22205725f, 0.032194849f, -0.049991768f, + -0.053152908f, -0.046192694f, -0.24900314f, -0.069606259f, + -0.050055373f, 0.18885376f, 0.26129368f, -0.13528578f, + 0.020294534f, 0.16088359f, -0.30446893f, 0.37864959f, + -0.20174222f, -0.082911856f, 0.063814513f, 0.021682767f, + 0.11107719f, -0.51022255f, -0.022209575f, 0.017719772f, + -0.13422924f, -0.28975824f, 0.032319367f, -0.23798305f, + -0.14034349f, 0.24691658f, -0.048198611f, 0.084442616f, + -0.40033931f, 0.24533406f, -0.014923112f, 0.031232623f, + -0.045187779f, 0.10546117f, 0.0075512002f, 0.011898051f, + 0.098998241f, 0.35663199f, -0.74411041f, 0.05538078f, + 0.2074461f, -0.053027704f, 0.062950291f, 0.064586237f, + -0.013095045f, 0.047485393f, -0.078908183f, -0.19982472f, + -0.0066769496f, 0.036235649f, -0.001502054f, -0.018219355f, + 0.013134752f, -0.23561816f, 0.0080338186f, -0.021109242f, + -0.10149819f, 0.039078288f, 0.051965144f, 0.19326408f, + -0.079807304f, -0.025057938f, 0.014147614f, 0.13248762f, + -0.2011144f, 0.11566548f, -0.0068650497f, 0.021899566f, + -0.018587748f, 0.11344896f, 0.037250221f, -0.048664421f, + -0.063859195f, 0.054632958f, 0.017604163f, 0.10259161f, + -0.040882155f, 0.37388885f, -0.0094316956f, -0.0027575837f, + 0.0088333506f, -0.12256898f, -0.067714326f, 0.021044703f, + 0.18949182f, -0.028458096f, 0.44620764f, 0.18311174f, + -0.13356748f, -0.0082093999f, 0.058285393f, -0.0036005478f, + 0.010861701f, -0.0034254023f, 0.16691707f, -0.0039756284f, + -0.076988898f, -0.030862652f, -0.12483884f, -0.12929924f, + 0.0065935873f, -0.12310456f, -0.056970637f, 0.0030201518f, + 0.001124249f, 0.0095008677f, -0.0074336049f, 0.080875121f, + -0.060140219f, 0.068169601f, -0.04718107f, 0.010188508f, + -0.046518255f, -0.51522756f, 0.098504156f, 0.066477835f, + -0.043906804f, -0.003734628f, -0.023340214f, 0.02110545f, + 0.024899203f, -0.044060659f, 0.16783786f, -0.041839972f, + -0.0404367f, -0.19538262f, 0.23648508f, 0.13367012f, + 0.15211792f, 0.052731663f, -0.34633791f, 0.020531084f, + 0.011865692f, 0.18925422f, 0.19189954f, 0.31299132f, + 0.021547988f, 0.11163941f, -0.20152859f, 0.26333764f, + 0.45065612f, 0.014566468f, -0.080165766f, -0.056343589f, + -0.0090856738f, -0.1902879f, -0.027882921f, 0.023519183f, + 0.021937568f, -0.19720231f, 0.032170024f, -0.13728413f, + -0.1298935f, 0.10285216f, -0.052952558f, 0.015534973f, + -0.42706332f, -0.78189629f, -0.0036126277f, 0.0058348412f, + -0.10813878f, 0.085623726f, 0.0054891752f, -0.019834356f, + 0.052704565f, -0.037377559f, -0.6671989f, 0.17321102f, + 0.20470133f, -0.075365253f, 0.075990424f, 0.00066258886f, + 0.2326396f, -0.07998088f, -0.2013908f, -0.24573289f, + -0.0019316612f, 0.060749829f, 0.12826864f, 0.061749443f, + -0.023731342f, -0.1653915f, -0.04409726f, 0.019913429f, + -0.015284818f, 0.067665763f, 0.3253943f, 0.15060024f, + -0.065886848f, -0.066679515f, 0.26040587f, 0.080890641f, + -0.20265536f, -0.057769086f, -0.12543413f, 0.0033846868f, + -0.042118717f, -0.11381845f, -0.23055926f, 0.048580222f, + 0.069066115f, 0.00037695453f, -0.067672223f, -0.10489738f, + 0.038004238f, 0.45680806f, -0.076900288f, 0.018700646f, + 0.037562016f, -0.072972745f, 0.0050664465f, -0.017826943f, + -0.062431764f, -0.06939771f, -0.012023995f, -0.015909856f, + 0.054073613f, 0.012680111f, 0.010394925f, -0.0038525157f, + 0.0095170448f, -0.026336109f, 0.23411378f, 0.0085745342f, + -0.014505887f, 0.011301909f, -0.019147495f, 0.065816917f, + 0.01898168f, 0.0092290808f, -0.058567528f, 0.011761229f, + 0.0017438635f, 0.005292343f, -0.010019057f, -0.091354012f, + 0.0016139221f, 0.11331289f, 0.049507622f, 0.019384161f, + -0.26204127f, 0.18053985f, -0.18485926f, 0.014635528f, + 0.14529078f, 0.09664958f, 0.0015981818f, -0.21344401f, + -0.015326707f, 0.037587922f, -0.19374599f, -0.063080817f, + 0.19137669f, -0.67921728f, 0.041984279f, -0.29355249f, + -0.053256396f, -0.071153499f, -0.17327791f, -0.053103022f, + -0.071078807f, 0.32091442f, 0.24998528f, 0.5813036f, + 0.015846394f, 0.0026621905f, 0.23646502f, -0.12515669f, + 0.12025543f, -0.019016961f, 0.01713815f, 0.0047598188f, + 0.012620356f, 0.17136095f, -0.042548236f, -0.028166361f, + -0.1980522f, -0.35366461f, 0.17331901f, -0.38632551f, + 0.29711053f, 0.06500265f, 0.047681116f, 0.0789496f, + -0.30115774f, -0.19505753f, -0.0083834836f, -0.11060636f, + 0.12725663f, -0.036785327f, 0.0083267959f, 0.021951487f, + -0.051453769f, -0.59676188f, -0.51314384f, 0.059797745f, + 0.61776012f, -0.032792959f, -0.12564529f, 0.0039407797f, + 0.12722485f, 0.04532478f, -0.30482855f, -0.16660775f, + -0.0082859453f, 0.11056935f, 0.19234411f, -0.064020276f, + 0.020940693f, -0.09258341f, 0.022099618f, -0.021025268f, + 0.12688972f, -0.011375668f, -0.088342607f, 0.24338503f, + -0.14102131f, -0.22810824f, 0.065143935f, 0.023342205f, + -0.11740951f, -0.02522199f, -0.099424846f, 0.033110078f, + -0.050531935f, -0.1391459f, 0.15086021f, -0.092109039f, + -0.074098721f, -0.11772583f, 0.05155164f, 0.22075482f, + 0.070997499f, 0.49340886f, 0.0099273846f, -0.013058442f, + -0.0064239674f, -0.14155105f, -0.098513089f, 0.13416465f, + -0.24715842f, 0.64959967f, -0.33143908f, -0.108193f, + 0.040393367f, -0.025721006f, 0.093782082f, -0.014657813f, + -0.018761029f, -0.040810529f, -0.074955568f, 0.0020644013f, + -0.081285998f, 0.019143894f, -0.079716019f, -0.0089238314f, + -0.015076756f, 0.28921419f, 0.056168314f, -0.18256733f, + -0.0065345331f, 0.042136729f, -0.006731973f, 0.20569956f, + 0.0017219251f, -0.011540467f, -0.017864661f, -0.13629937f, + -0.015259713f, 0.00429308f, 0.12542644f, -0.0010199059f, + 0.0033654897f, -0.06428165f, 2.612226f, 0.0022507533f, + -0.003105971f, -0.01213491f, 0.030032393f, -0.026406426f, + -0.048410982f, 0.0049111103f, 0.057728831f, -0.32862952f, + -0.0030977128f, -0.001554242f, 0.00061261241f, -0.0040169018f, + 0.07184758f, 0.00014384827f, -0.00074025278f, 0.0012140484f, + -0.022649027f, 0.24547629f, -0.042752098f, -0.0010821372f, + -0.022337958f, -0.057623923f, -0.065191694f, 0.014112816f, + -0.00092605519f, -0.00022556759f, -0.1001987f, -6.738441f, + 0.064924151f, -0.00080103963f, 0.0018832873f, -0.0011917345f, + -0.073680423f, 0.0031496056f, 0.0034227429f, -0.35137454f, + 0.044462707f, -0.023934631f, 0.0044465582f, 0.03490074f, + -0.024082428f, 1.7597131f, -3.0310001f, 0.011575998f, + -0.0011875603f, 0.0015988441f, 0.010348054f, 0.00062355294f, + -0.0009696004f, -0.0041290708f, -0.078300491f, -0.089446783f, + -0.62914693f, 0.0031068099f, 0.022479413f, -0.39101216f, + 2.7400074f, -0.0018763248f, -0.067223504f, -0.0029525543f, + -0.0036278612f, 0.0018626027f, -2.1576529f, -0.13308582f, + 0.055114791f, 0.035991207f, 0.00069661118f, -0.0037652496f, + 0.0051692938f, -0.049419012f, 0.001723216f, -0.0022018538f, + -0.19880037f, -0.00038634407f, -0.0044618198f, 0.012055887f, + 0.002338524f, -0.002111817f, 0.13589063f, -0.0010265908f, + -0.0022864796f, 0.0010888263f, -0.0017684849f, 0.036963403f, + 0.91344303f, -0.00055159983f, 0.67356157f, -0.0081337858f, + -0.0048596221f, -0.10739346f, 0.012494946f, 0.077913761f, + 0.035204727f, -0.015138514f, -0.034778517f, 0.0016251366f, + 0.060185552f, 0.0029204618f, -0.0007998643f, 0.003249557f, + 2.1696191f, 0.0028663948f, -0.58640969f, -0.0038180971f, + 0.0051664482f, -0.0047406801f, 0.10299493f, -0.030945137f, + 2.2374644f, -2.3608343e-05f, 0.020162106f, 1.1815314f, + -0.0010464996f, 1.4973562f, -0.023299621f, 0.26172039f, + -0.011407046f, -0.06250795f, -0.040475979f, -0.06590803f, + 0.027639395f, -0.0030077759f, 0.14565815f, 0.030644927f, + 0.00206249f, 0.026945069f, -0.017702106f, 0.00032904834f, + -0.0011223255f, -0.0062960978f, 0.0056037675f, 0.019447895f, + -0.007838455f, -0.0039149579f, -0.066684268f, 0.01293442f, + 0.0012480478f, -0.00023353465f, 0.0057036183f, 0.00039904498f, + -0.0030661526f, -0.0011825283f, -0.00056232919f, 0.00079662126f, + -0.012737944f, 0.038856842f, 0.030321766f, 0.00066235213f, + -0.016509617f, 0.056086283f, 0.034568977f, 0.0006122425f, + -0.00029560298f, -0.0039900509f, -0.028455494f, -0.33735591f, + -0.025645917f, 5.116409e-05f, 0.031806082f, -0.0016750377f, + -0.038650475f, -0.0063957064f, -0.060313381f, -0.11059713f, + -0.058297906f, -0.0083587393f, -0.0042247153f, 0.011388773f, + -0.0038084507f, 0.049482383f, -0.0036146461f, -0.0067188297f, + 0.0028269021f, -0.00067610055f, 0.011075664f, -0.0037046219f, + -0.0019216528f, 0.026894072f, 0.01006944f, 0.016158074f, + 0.057040598f, 0.0058531887f, -0.023972487f, 0.051993169f, + 0.0093542859f, -0.0025279291f, -0.036921907f, 7.8521953e-05f, + -0.018096354f, -0.00098468992f, -0.024014991f, -0.032053895f, + 0.0065124924f, 0.0022959074f, -0.0008404227f, -0.0013923934f, + -0.049444802f, -0.0048000151f, -0.0010163576f, 0.0017921021f, + -0.0072623449f, -0.00010691923f, 0.00015799369f, -0.012325446f, + 0.00026871264f, -0.0052408921f, -0.16828784f, -0.0048630219f, + -0.00014401428f, -6.2571948e-05f, -0.0018501672f, -0.065634079f, + -0.022911424f, -0.0016310633f, -0.12107347f, -0.004164068f, + -0.0093456861f, -0.017297279f, 0.016120231f, 0.078554004f, + -0.023620883f, 0.02162155f, 0.00082764041f, -0.0012920279f, + -0.018345209f, 3.8574835e-05f, 0.00012907834f, -0.00037115678f, + 0.013185155f, 0.027874134f, -0.11262735f, -0.0033903574f, + -0.0069973459f, -0.00052742468f, 0.021230709f, 0.0084108934f, + -0.0074932929f, -0.00085387746f, -0.01895453f, -0.027833071f, + 0.00091336266f, 0.16837661f, -0.0084971189f, 0.041285355f, + 0.0055781617f, 0.00738393f, -0.016573347f, -0.10798995f, + 0.21583569f, -0.0013649657f, -0.72067904f, -0.029074524f, + 0.0036323653f, -0.025072727f, 0.0050483355f, 0.0021023105f, + 0.0034520454f, 0.019901078f, 0.0017621621f, 0.015188288f, + -0.019419869f, -0.0063608564f, 0.13463493f, -0.5396499f, + 0.015744871f, 0.0010339636f, -0.00043260411f, 0.0094788605f, + 0.48484015f, 0.0020056374f, 0.0037366191f, 0.001796324f, + -0.049908649f, 0.25547218f, -0.07363148f, 0.0056007644f, + -0.087679744f, -0.14238888f, -0.12501918f, -0.0054142713f, + 0.00040164508f, -0.00083874312f, -0.089966036f, -0.032382157f, + -0.067114413f, 0.0015528321f, 0.0031633896f, 0.0041800281f, + -0.097832955f, 0.0089423228f, -0.01887547f, -1.1103641f, + -0.036359884f, -0.02744104f, -0.013416233f, -0.053707134f, + 0.011933625f, 0.03445778f, -0.020292176f, -3.4141278f, + 0.0024631703f, -0.00046688091f, -0.032963652f, 0.0027610115f, + 0.0045049451f, -0.071726277f, -0.031346738f, 0.0058791712f, + 0.19100027f, -0.0086019197f, -0.010152807f, -0.44369668f, + 0.0082133077f, -0.001122779f, -0.0062792553f, 0.0016234692f, + 0.022470618f, -0.00071237166f, 0.056593727f, 2.1487868f, + -0.022037024f, -1.2633014f, 0.0022073616f, 0.00060907152f, + -0.28773436f, 0.0034321058f, -0.00040784341f, 0.0026855227f, + 0.013636575f, -0.0017693607f, -0.0043838392f, -2.6148393f, + -0.0023814125f, 1.500515f, -0.026056038f, 0.00087276456f, + -0.0022718511f, 8.4402971e-05f, 8.1815197e-05f, -0.12601773f, + 0.061119635f, 0.00073736312f, -0.032903031f, 2.4298103f, + -0.029191146f, 1.2514992f, 0.076724254f, 0.042088717f, + 0.0087098088f, -0.041827999f, -0.029698133f, 0.00024719728f, + 0.060793459f, 2.0092463f, 0.0013704289f, 0.036837347f, + 0.0013002554f, 1.3444787f, 0.27510551f, -0.0084096994f, + 0.00085130904f, -0.0013299466f, 0.10252603f, -0.02704205f, + 0.0090684779f, -0.0013547331f, 0.053519186f, 0.29981902f, + -0.00020470975f, 1.248759f, -5.292594f, 0.25661716f, + -0.00095059408f, -0.036266573f, -0.043755453f, -0.10216885f, + 0.039612487f, 0.0015189353f, 1.0677569f, -0.0057161837f, + 0.0028731502f, 0.019182183f, -0.0015739769f, -0.00090698717f, + -0.001017604f, -0.020345328f, -0.010588823f, 0.0011394374f, + -0.0061189653f, 0.0019726297f, -0.094211273f, -0.03757922f, + -0.0083060171f, -0.00013928791f, -0.0034188442f, 0.0024010332f, + -0.018836096f, 7.3351461e-05f, -0.0040237033f, 0.00061839673f, + -0.00064529927f, -0.172307f, 0.013352424f, 0.00074208825f, + -0.036034808f, 0.039793216f, -0.069634743f, -0.016381672f, + 0.0012832156f, -0.0027474288f, -0.020750012f, 0.010158501f, + -0.0095036654f, 0.0012158998f, 0.0016975156f, -0.0030236805f, + 0.0089825699f, 0.0015794822f, -0.096995413f, -0.030953763f, + -0.022290776f, -0.0036310984f, -0.0030667593f, -0.0024955396f, + -0.032992806f, 0.11896978f, -0.0055854302f, -0.038308147f, + 0.0011244462f, -0.0013486373f, 0.017501153f, 9.3791896e-05f, + -0.0001154226f, -0.046166517f, 0.058906615f, -0.11365054f, + 0.53183949f, 0.0050441218f, -0.0070085707f, -0.28518131f, + 0.0035588786f, 0.0016464394f, -0.048267897f, 0.0038718223f, + -0.026027828f, 0.0022822456f, 0.006294461f, 0.28218135f, + 0.029077929f, -0.4346222f, 0.0019568573f, -0.0026180749f, + -0.20387925f, 0.03484882f, -0.00029531063f, -0.00010599784f, + -0.02198622f, 0.0022318843f, -0.0025337255f, -0.063800171f, + 0.0011114995f, -0.16230261f, -0.13088459f, 0.00062570127f, + -0.00049874757f, -0.00015651835f, -8.5298845e-05f, -0.11596777f, + 0.011859356f, 0.0001978886f, 0.17828724f, 0.022263462f, + -0.0094443681f, -0.22744942f, 0.033205748f, -0.052958209f, + -0.032409374f, 0.012381667f, -0.0080715828f, -0.0035475013f, + -0.025131699f, -0.37724665f, -0.0022175789f, -0.0036108901f, + 0.0019934312f, 1.1531229f, 0.15844193f, -0.00059782329f, + -0.0016331695f, 0.00061614544f, 0.065043613f, 0.020093087f, + 0.001524406f, -0.00023130736f, -0.010744084f, 0.017929297f, + 0.0026358312f, 0.15687184f, -0.005497654f, -0.010332928f, + -0.0061713378f, 0.25187698f, 0.17528512f, -0.004454155f, + -0.33677906f, 0.022342427f, 0.11777299f, 0.035352573f, + -0.029289311f, -0.67250621f, 0.017640555f, 0.0023872575f, + 0.011935665f, 0.63301933f, -0.033959672f, 1.6280657f, + -3.5733919f, -0.12790826f, 0.30568981f, 0.450809f, + 0.84724188f, -0.046447199f, -0.023158468f, 0.16660839f, + 1.9007206f, 4.4223369e-05f, 0.0087714344f, 0.019373225f, + 0.3073937f, 0.059840992f, 0.42428708f, -0.0074058175f, + 0.34588599f, -0.66326231f, -0.10558081f, -0.41449764f, + 0.00090242381f, 0.0070448439f, -0.16766167f, 0.075877808f, + 0.11793689f, 0.011320977f, 0.13726258f, 0.017580368f, + -0.49065569f, 0.025970006f, 0.02895763f, -0.55544585f, + 0.25304833f, 0.49496886f, -7.3963742f, 1.9656097f, + -0.95001185f, 0.28842291f, -0.015874205f, 0.00067964528f, + 0.012646227f, 6.2241124e-05f, 0.23063074f, -0.00930335f, + -0.002997735f, 0.062596112f, 0.60452068f, -0.07965643f, + 0.34969944f, -0.14178328f, 0.1817414f, -0.026026374f, + -0.0098883174f, 0.008491965f, 1.368721f, -0.0024690938f, + 0.13392285f, -0.011442855f, -0.045866143f, -0.12674768f, + -0.13261791f, 0.1587043f, 0.0048214965f, 0.0088839484f, + 0.39229155f, 0.16675644f, -0.00080685847f, 0.0065869992f, + 0.013556489f, 0.0095743136f, 0.17184527f, 0.0062263585f, + -0.009875847f, -0.83714443f, 0.76819861f, -0.023203101f, + -0.013575805f, 0.0025853561f, 0.0021722808f, 0.96473581f, + -0.64627379f, 0.0049241758f, 1.4332856f, 0.016383613f, + -5.6462359f, 0.32592914f, 1.9856069f, -0.19119464f, + 1.531269f, -0.27452064f, 0.11405723f, 0.035518792f, + 2.4409173f, 0.030416606f, -0.0045681288f, 0.00077984418f, + 0.0094944332f, -0.054561276f, 0.072547242f, 0.030206611f, + -0.055045906f, -0.0059023066f, 0.42845994f, 0.50901783f, + 0.024611006f, 0.0020540899f, 0.0095113376f, 0.1662178f, + 0.00053944864f, -0.025493005f, 0.052432049f, 0.64895207f, + 0.017626293f, 0.55796522f, -0.11161679f, -0.061796032f, + -0.035284147f, 0.01915957f, -0.081699044f, 0.050608989f, + 0.077630244f, -0.12752002f, 0.033348266f, -0.010162343f, + -0.0017017968f, 0.5614711f, -0.065732136f, 2.0858843f, + 1.6791084f, 0.042734604f, -0.47533914f, 0.21887402f, + -0.28043771f, 0.043440737f, 0.042019919f, -7.0627341f, + 1.193608f, -0.0050258399f, 0.014958588f, 0.013491881f, + -7.3643856f, -0.25900081f, -0.49665272f, 0.030008316f, + 0.28874546f, 0.015649213f, 0.017703924f, -0.27651355f, + 0.0037117982f, -0.0025447668f, -0.06765005f, -0.0097488239f, + 0.032299995f, -0.015619147f, 0.010927639f, 0.0038664974f, + -0.29379421f, -0.049800135f, -0.00031986492f, 0.067012243f, + -0.10966895f, 0.4481861f, 0.027050199f, 1.9952215f, + -0.33925971f, -0.38203436f, -0.044403844f, 0.0080621233f, + -0.0091989692f, 0.0012173833f, 0.36185032f, 0.019875092f, + 0.015799534f, -0.062218808f, 0.64899141f, -0.045261402f, + 0.42663702f, 0.065976053f, 0.25946295f, 0.75826687f, + 0.018804666f, -0.00079313089f, 1.5770973f, -0.0058648665f, + 1.3827412f, 0.011075541f, 0.012284517f, 0.10397509f, + -0.088736124f, 0.18513104f, 0.010101529f, -0.013539135f, + 0.79514974f, -0.34394017f, 0.01808485f, 0.0019337717f, + 0.34075332f, -0.010782576f, -0.25435224f, -0.0049488978f, + 0.0068431469f, -0.95449871f, 0.24948439f, 0.033183094f, + 0.022423621f, 0.0011387437f, -0.004468313f, -1.3490483f, + 0.91682631f, -0.0016250252f, -0.45911279f, -0.019960927f, + -5.7815886f, 0.56258696f, 1.315588f, -0.63244545f, + 2.1451881f, 0.09895397f, 0.30114254f, -0.011580094f, + 0.50010806f, 0.030961737f, -0.0018378398f, -0.043500617f, + -0.0092424536f, -0.027545828f, 0.15517907f, 0.027249388f, + 0.031880911f, 0.017114401f, 0.17074201f, -3.0671771f, + -0.0084320595f, 0.013954079f, -0.0093676494f, 1.3241155f, + -0.0032377301f, -0.0012154048f, -0.018005854f, -0.19880442f, + 0.020688547f, -0.15570587f, -0.025266305f, -0.060816687f, + 0.011814399f, -0.089090876f, -0.082107574f, -0.01670677f, + -0.004114754f, -0.037084647f, -0.026833732f, -0.012373753f, + -0.037950128f, -0.10029801f, 1.2366538f, 0.16311875f, + -0.22486922f, 0.21088782f, -0.35408148f, -0.95656282f, + 1.1566181f, 0.0096827652f, -0.014404361f, 0.0091502452f, + -0.2024354f, -0.02754906f, -0.046137843f, -0.1071651f, + -0.38121325f, 0.032683875f, -0.44510624f, -0.053153701f, + -0.76868653f, 0.15130788f, -0.11482362f, 2.0422759f, + -0.0051759398f, -0.016982831f, -0.11016287f, 0.016454594f, + -0.33464849f, 0.010536293f, 0.00389153f, -0.040118489f, + 1.5067561f, 0.035649534f, -0.01592963f, 0.32028157f, + -0.40344918f, -0.56098771f, 0.057448197f, 0.19150096f, + -0.041141f, 0.16682369f, 0.038464785f, 0.0079789115f, + -0.030713396f, -0.024766248f, -0.23039652f, -0.015596725f, + -0.025835359f, -0.025672749f, 0.11390819f, -0.098110519f, + -0.02276993f, 0.12430282f, 0.080274738f, 0.060227342f, + -0.0008492893f, -0.053498749f, -0.25976479f, -0.0042043221f, + -0.33553725f, -0.017847033f, 0.081132241f, -0.03441257f, + 0.11475668f, 0.26822832f, -0.040364742f, 0.0044518835f, + 0.330282f, 0.81827575f, -0.019927908f, -0.0031011552f, + 0.088714302f, -0.026310887f, -0.10185854f, 0.03072473f, + -0.0096062878f, 0.067765757f, -0.089555532f, -0.0091811828f, + -0.038807482f, -0.0051758541f, -0.015416631f, -0.076928131f, + 0.23670466f, -0.015751649f, 0.13126904f, -0.0051581366f, + -0.041266914f, 0.21524456f, 0.21025097f, 0.79333967f, + -0.21035123f, 0.063767835f, -0.23033671f, -0.066963598f, + 0.080860652f, -0.022340957f, -0.0065945555f, 0.012822589f, + -0.0054993536f, 0.030865347f, 0.073131986f, -0.0064403568f, + -5.4394026e-05f, -0.012634141f, -1.6687721f, 0.71330953f, + -0.027019685f, -0.017718531f, -0.31414938f, -0.60116845f, + -0.011365057f, 0.058012746f, 0.0072393897f, -1.7755373f, + -0.00054097659f, 0.035782304f, -0.024185134f, -0.015037602f, + 0.37540159f, -0.0061620199f, -0.076408237f, -0.026031071f, + 0.011844065f, 0.1928596f, 0.014376854f, 0.0012126508f, + -0.00021823628f, -0.022052087f, 0.1367849f, -0.010982746f, + 0.0022275096f, 0.0059187678f, -0.034354817f, 0.88382947f, + 0.076586865f, 0.002853344f, -0.0036453856f, 0.0077476911f, + -0.1735144f, 0.0010003396f, -0.00027397167f, -0.010284211f, + 0.010088626f, 0.12421904f, -0.076036312f, -0.0049586217f, + -0.25294566f, -0.047130931f, -0.071419977f, 0.075093627f, + -0.0024872136f, -0.00079185009f, -0.083467431f, 0.010430808f, + -0.091444016f, 0.0013931304f, -0.033915743f, -0.00089884159f, + -1.1768386f, -0.0073110797f, 0.055357818f, 0.082355961f, + 0.063562155f, -0.066523135f, -0.0041522747f, -0.057893097f, + -0.014294608f, -0.11778424f, -0.0062001371f, 0.0033077465f, + 0.00097251724f, -0.00058437366f, 0.084337912f, -0.001300218f, + 0.00046429751f, -0.097619973f, 0.015873695f, -0.076212525f, + -0.28036222f, -0.010331626f, -0.04326573f, 0.27609578f, + 0.0077984994f, -0.00022556946f, 0.05658609f, -0.00087149377f, + 0.01641161f, 0.0011846724f, 0.039301928f, -0.015745124f, + -0.033958774f, -0.02279092f, -0.0016113744f, -0.0015349183f, + 0.38288039f, -0.17604119f, -0.0018679542f, 0.00033446151f, + -0.016172074f, -0.00012272141f, 0.0082719885f, 0.031472929f, + 0.0014357039f, 0.055110291f, -0.00069061085f, -0.0006813592f, + 0.0029922794f, 0.0012528406f, 0.0013000336f, 0.046762723f, + 0.251706f, -0.0038109887f, 0.33932659f, 0.01135193f, + 0.0036330605f, 0.029819356f, -0.0045847339f, 0.17053448f, + -0.067638263f, 0.13468024f, 0.03015786f, -0.0042535914f, + -0.10233223f, -0.028687092f, -0.0009937447f, -0.0061994526f, + -0.00052993541f, -0.0087918341f, 0.25727013f, -0.0095525654f, + -0.0037644424f, 0.0012876941f, -1.4155773f, 0.026072063f, + -0.015410805f, 0.00012063476f, -0.15755232f, -0.088386811f, + 0.0012180757f, -0.015880549f, -0.0078312382f, -0.20800631f, + 0.14783897f, 0.026368294f, -0.0093430998f, 0.014307618f, + -0.07478527f, 0.072768435f, -0.29383108f, -3.2524927f, + -0.10992987f, -3.1787367f, -0.02461003f, 0.074051961f, + 0.085822262f, -1.8435416f, -0.089893073f, -1.2318176f, + 0.23309331f, 0.21695024f, -0.77817875f, 0.3458837f, + 0.083383895f, 0.27885255f, 0.2425369f, 0.025610542f, + -0.2998049f, -0.069788598f, 0.053712294f, 0.21102889f, + 0.2653456f, 1.7620516f, -0.21126968f, 0.19592434f, + 0.17490152f, 1.560462f, 0.0084860483f, 0.014185566f, + 0.097086839f, 0.085754454f, 0.85280395f, 0.62038153f, + 0.5337922f, 0.17036153f, 1.3192044f, 0.083651461f, + -0.027174637f, -0.048620552f, 0.010741722f, -0.020518512f, + 0.80681908f, -0.33876401f, -0.17892466f, -0.69437885f, + 0.47624698f, 0.032937601f, 0.017577596f, 0.065670177f, + 0.11618084f, 0.11437465f, -0.53849286f, 0.030383691f, + 0.10342044f, 0.049616527f, 1.5853325f, -0.033960775f, + -0.63490653f, 1.2608074f, 0.20771912f, -0.07501848f, + 0.001565004f, 0.01584401f, -1.5210779f, 0.018582204f, + 0.64113903f, 0.02600798f, 0.17979774f, 0.21831571f, + 0.37217337f, -0.62748808f, 0.011760363f, 0.031634506f, + -0.24475895f, 0.47859138f, 0.034467582f, 0.25205696f, + 0.017550681f, 0.026157279f, 0.055838771f, -0.028575087f, + 0.017122602f, -0.21475342f, 1.9178499f, 0.20466928f, + 0.08763472f, -0.039501876f, 0.029511206f, -0.13926709f, + 0.15264234f, 0.034611769f, -0.54005504f, -0.49876815f, + 0.557073f, -0.68940347f, 0.65903676f, -0.11134969f, + -0.22855477f, 0.41602224f, -1.6151092f, 0.16733573f, + 0.41434598f, -0.18629684f, 0.034553438f, 0.29343009f, + -0.043500934f, 0.097366169f, 0.32989645f, -1.6263535f, + -0.0023034201f, 0.026553394f, -0.073592782f, -0.2574853f, + -0.0054057366f, -0.0029596116f, -0.017129147f, -0.24928209f, + 0.019617604f, 0.0077060126f, 0.095079936f, 1.4519426f, + 0.23612666f, 0.82503301f, -0.083815984f, 0.036127802f, + 0.22253656f, 0.13388468f, -0.37918001f, -3.4820735f, + 0.044405822f, -5.0657692f, -0.01883271f, 0.10279585f, + 0.12818348f, -1.613479f, -0.49606511f, -0.64479983f, + 0.65634626f, 0.1342994f, 0.21720596f, 0.50163651f, + -0.027483899f, 0.10900945f, 0.21308455f, 0.20881315f, + -2.3815162f, 0.013683774f, 0.075631633f, 0.25532392f, + 0.31410223f, -0.21467376f, 0.19822332f, 0.15957662f, + 0.73848689f, 1.2553762f, 0.072727628f, 0.1896423f, + 0.094709516f, 0.069642656f, 1.1098517f, 0.029311998f, + 0.85349303f, 0.16078427f, 1.152578f, 0.085566044f, + -1.2546209f, 0.2145762f, -0.014399569f, 1.6284715f, + -0.019619348f, -0.16489105f, -0.099629708f, -0.33889994f, + -0.091613598f, -0.043735158f, 0.032632656f, 0.068239063f, + 0.085631117f, 0.12222004f, -0.3237555f, 0.048325062f, + 0.15553625f, 0.049074005f, -7.5052505f, 0.035101093f, + -0.37309736f, 1.9777013f, -0.2442944f, 0.09886039f, + 0.043791246f, 0.061405905f, -1.1957629f, 0.051224709f, + -0.5864172f, 0.095977999f, 0.11599836f, 0.37450659f, + 0.49881899f, -0.73644346f, 0.052525256f, 0.061838824f, + 1.6634251f, 0.37593439f, 0.03696404f, 0.23621206f, + 0.45882118f, 0.05627865f, 0.032766979f, -0.056797482f, + 0.024964429f, 0.34314573f, 3.1860552f, 0.22115701f, + 0.074624673f, 0.045673836f, 0.021189723f, 0.66590446f, + -0.13413729f, 0.021816546f, 0.069117375f, -0.53556848f, + 0.62247401f, 0.058348976f, -0.62629759f, 1.0161898f, + -1.8549742f, 1.464061f, -1.2896911f, 0.11519418f, + 0.48464066f, -0.069223829f, 0.011759005f, 2.4472172f, + -0.0046235342f, 0.46639019f, -0.9424811f, -0.33217332f, + -0.073918939f, 0.040005844f, -0.21801645f, 0.23825517f, + 0.017235253f, 0.05986543f, -0.32733291f, 0.61412448f, + 0.028434394f, -0.19847208f, 0.065917097f, -0.15534538f, + 0.1565752f, -0.8128925f, -0.10422065f, -0.02606244f, + 0.95272124f, 0.086953096f, -0.31708643f, -2.5056603f, + 0.0014112518f, -3.4719858f, -0.010402317f, 0.076579466f, + 0.09498284f, -1.5756041f, -0.75851327f, 0.010514847f, + 0.61350083f, 0.04238227f, 0.76317096f, 0.47987524f, + -0.12662141f, 0.070440546f, 0.22007991f, 0.15298465f, + -0.13429548f, -0.0026660138f, 0.058044851f, 0.066705078f, + 0.26648697f, -0.34929717f, 0.31814328f, 0.11506227f, + 0.33539441f, 1.2291654f, 0.057582203f, 0.1037653f, + 0.075883508f, 0.067922056f, 0.84493142f, 0.46134534f, + 0.020754404f, 0.15636294f, 1.4070234f, 0.10758372f, + -1.1915245f, 0.051033385f, 0.076181233f, 1.3722554f, + -0.023068272f, -0.20375457f, 0.082077123f, 0.86998683f, + 0.139589f, 0.19191995f, -0.003879461f, 0.095639236f, + 0.095489152f, 0.092518985f, -0.091605037f, 0.061136406f, + 0.11997722f, -0.040343106f, -1.1920388f, -0.089872532f, + -0.1618432f, 2.1414907f, -0.094537772f, 0.70620602f, + 0.016444726f, 0.026889971f, -0.50437433f, 0.047194973f, + -1.0886514f, 0.061608691f, 0.10646728f, 0.23089482f, + 0.39735886f, -0.73650366f, 0.058747243f, 0.040221192f, + 0.95598543f, -0.2555165f, -0.0051190988f, 0.2239496f, + 0.6105181f, 0.044140611f, 0.025354916f, -0.056653541f, + 0.037664641f, -0.1660438f, 2.9707305f, 0.22130193f, + 0.056352451f, 0.046559986f, 0.041306883f, 1.1857527f, + -0.63923782f, 0.017641736f, -0.12961496f, -0.54674977f, + 0.65798575f, 0.37295282f, -1.0151459f, 0.93693972f, + -1.4196128f, 1.3791977f, -1.7981933f, 0.11752924f, + 0.23101123f, -0.11403561f, 0.011229269f, 3.3447058f, + -0.020586014f, 0.24817561f, -1.5089626f, 0.29690826f, + -0.051239181f, 0.019949548f, 0.3567642f, 0.1946196f, + 0.045872644f, 0.057538915f, -0.81725031f, 0.47896734f, + 0.033711445f, 0.0041831993f, 0.10120814f, 1.3943908f, + 0.14713681f, 0.45547473f, 0.17202243f, -0.059626959f, + 0.51807088f, 0.043872554f, -0.44899735f, -1.8443091f, + -0.026132653f, -1.7309246f, -0.060461357f, 0.074545592f, + 0.077576466f, -1.4316685f, -1.4904304f, -0.53009629f, + 0.41301283f, 0.11247566f, 0.61115587f, 0.7114929f, + -0.60698438f, 0.081721462f, 0.20086971f, 0.10777096f, + 0.29539472f, -0.028940281f, 0.044656221f, 0.29465246f, + 0.48160937f, -0.6083678f, -0.0015929954f, 0.17279126f, + 0.13515231f, 1.3160897f, -0.082101651f, 0.003556632f, + 0.084751949f, 0.057544198f, 0.36251318f, 0.24416952f, + 0.19816951f, 0.17153817f, 1.4061025f, 0.063496932f, + -0.48220488f, 0.11299881f, 0.048991177f, 1.0804249f, + 0.18304944f, -0.2531299f, 0.14702635f, 1.0141995f, + 0.80750775f, 0.098312378f, 0.018255506f, 0.13470857f, + 0.10709962f, 0.12052378f, 0.28544936f, 0.014670386f, + 0.10808612f, 0.031422354f, 0.67081469f, 0.092801958f, + -0.27038211f, 1.8250031f, 0.18441154f, 0.5511815f, + 0.03219394f, 0.021695273f, 0.21265611f, 0.051548783f, + -1.2173476f, 0.044505768f, 0.11383726f, 0.41878262f, + 0.16247316f, -0.58253974f, 0.030315675f, 0.043860298f, + 0.57210511f, -0.24401635f, -0.015507006f, 0.24300067f, + 0.59465545f, 0.04827657f, -0.012915201f, 0.016462239f, + 0.030686636f, -0.015797554f, 2.4293356f, 0.17514771f, + 0.070645355f, 0.051617272f, 0.020736119f, 0.11962895f, + -0.55982012f, 0.034751881f, 0.069530688f, -0.50919777f, + 0.65624231f, 0.12457973f, -1.0855216f, 0.30576116f, + -0.83038092f, -0.48978618f, -1.1069335f, 0.12578815f, + 0.71431267f, -0.12224055f, 0.0088997167f, 3.6022248f, + -0.0089086508f, 0.016433502f, 0.11532921f, 0.88800883f, + -0.10899065f, 0.04031105f, -0.15656181f, 0.065181017f, + 0.053180333f, 0.071337059f, -1.3108821f, -0.042681079f, + 0.022459095f, -0.17365222f, 0.10478126f, 1.1256826f, + 0.14999989f, 0.19495958f, 0.28523457f, -0.076515876f, + 0.85870808f, 0.050273519f, -0.1278384f, -1.2167314f, + -0.032211617f, -1.4567472f, -0.09212026f, 0.059325505f, + 0.1071933f, -1.3193172f, -1.5579944f, -0.3033933f, + 0.49814305f, 0.087996967f, 1.2694583f, -0.04580158f, + -0.30383313f, 0.07252039f, 0.24859782f, 0.12458923f, + -0.78236419f, -0.010163791f, 0.047310017f, 0.2926836f, + 0.47606587f, -0.90127331f, -0.099402331f, 0.1583188f, + 0.48296866f, 1.2979151f, 0.036955163f, 0.06116062f, + 0.066087082f, 0.057055611f, 0.13170935f, 0.24874873f, + 0.050752785f, 0.17770296f, 0.94433761f, 0.084613942f, + -0.19485764f, 0.14986435f, 0.070032246f, 0.87256277f, + 0.1743587f, -0.088722073f, 0.17538671f, 1.1763307f, + 0.67719114f, 0.45967352f, -0.0054531475f, 0.10544454f, + 0.096126065f, 0.11670401f, 0.49750894f, 0.016714778f, + 0.099054709f, 0.0003005527f, 0.23574638f, 0.073137708f, + 0.21659055f, 1.6848701f, -0.017309815f, 0.61145115f, + -0.0018949163f, 0.047571555f, 0.05289587f, 0.05063162f, + -1.0279367f, 0.049880628f, 0.036470219f, 0.43252835f, + 0.48522979f, -0.84669089f, 0.026057666f, 0.037605058f, + 0.039024267f, -0.37147963f, -0.010084539f, 0.23259243f, + 0.51361567f, 0.036856551f, 0.073357582f, -0.02551946f, + 0.025139883f, -0.17214903f, -0.4253557f, 0.20774935f, + 0.063256592f, 0.04674248f, 0.025127511f, 0.25691503f, + -0.36347777f, 0.01615846f, -0.45974249f, -0.52061456f, + 0.64341062f, -0.17172721f, -0.6715706f, 0.77431017f, + -0.55566859f, 0.17749615f, -1.0817789f, 0.14463666f, + 0.71126837f, -0.15269682f, 0.00087466289f, 3.5504155f, + -0.038075771f, 0.12903941f, -0.057773601f, 1.7055761f, + -0.067505352f, 0.014810446f, -0.0030142821f, 0.15676275f, + 0.062435582f, 0.072012112f, -1.5270206f, -0.0055647483f, + 0.030768208f, -0.090027459f, 0.085924469f, 1.5263973f, + 0.093863033f, -0.38334006f, 0.5300985f, 0.086575985f, + 0.66304463f, 0.14981629f, -0.01124485f, -0.7320981f, + 0.052964143f, -0.18783846f, -0.056904919f, 0.069846846f, + 0.11311777f, -1.2398005f, -1.9295162f, -0.28812447f, + 0.67999512f, 0.17388947f, 0.97920841f, 0.29472473f, + -0.24890743f, 0.08315061f, 0.24383116f, 0.17184767f, + -0.062322482f, 0.0037369234f, 0.042563383f, 0.23013175f, + 0.46565428f, -0.20497628f, -0.086242244f, 0.15526456f, + 0.3527917f, 0.65099007f, -0.011294727f, 0.19704993f, + 0.078639112f, 0.069617853f, -0.61551678f, 0.33137068f, + 0.35785159f, 0.17345959f, 1.092945f, 0.10797202f, + 0.077248454f, 0.051372472f, -0.0060881781f, 0.63746589f, + 0.13611059f, -0.14188915f, 0.15771532f, 0.7213906f, + 0.48877701f, 0.46421418f, -0.031453904f, 0.083303921f, + 0.10768523f, 0.10881002f, -0.5308432f, 0.042925626f, + 0.071949713f, 0.082186043f, 0.44105139f, 0.0043879291f, + 0.27413145f, 1.592458f, 0.024041489f, 1.2715144f, + -0.0056127934f, 0.040731389f, -0.018054705f, 0.024736973f, + -1.2039067f, 0.044402242f, 0.050940357f, 0.39040843f, + 0.49001464f, -0.75293624f, 0.030467799f, 0.055013761f, + -0.37498263f, -0.60168976f, 0.02583101f, 0.22014131f, + 0.24016334f, 0.023530841f, 0.022673476f, -0.088415183f, + 0.029527044f, -0.01577911f, -0.93543828f, 0.21405917f, + 0.062006243f, 0.020263944f, 0.0236982f, 0.50458068f, + -0.71939957f, 0.015928295f, -0.21067466f, -0.5568279f, + 0.64542609f, -0.29948574f, -0.97273022f, 0.85454732f, + 0.34094542f, 0.80097669f, -1.1306072f, 0.19560981f, + 0.71746761f, -0.10183977f, 0.025644056f, 3.1005499f, + -0.012195305f, 0.052079968f, -0.082613766f, 2.4915137f, + -0.11452404f, 0.03497744f, -0.43433976f, -0.19248621f, + 0.080545597f, 0.059641402f, -1.7518936f, 0.022459654f, + 0.034478135f, -0.1292996f, 0.081381641f, 1.1181831f, + 0.13568145f, -0.77847916f, 0.69306821f, -0.001732323f, + 0.59675211f, 0.098446503f, -0.13004746f, -0.45557836f, + 0.049652819f, 0.30431366f, -0.027106782f, 0.082766943f, + 0.104897f, -1.1464938f, -2.8698981f, -0.2915968f, + 0.62102985f, 0.049670525f, 0.66166914f, 0.44353688f, + -0.058958497f, 0.06134171f, 0.20250562f, 0.14903557f, + -0.4321402f, -0.029598402f, 0.057588615f, 0.21083736f, + 0.6771183f, -0.3600423f, 0.33941561f, 0.11984433f, + 0.5049594f, 0.58325654f, 0.0086691817f, 0.060184799f, + 0.086288653f, 0.051394023f, -0.86507583f, 0.37824786f, + -0.13622209f, 0.14669378f, 0.80761796f, 0.075434595f, + -0.40714645f, 0.13542427f, -0.077672556f, 1.0038263f, + 0.086802565f, 0.090068333f, 0.1300486f, -0.78549516f, + 0.41991705f, 0.3161211f, 0.0014805709f, 0.057206362f, + 0.12078426f, 0.08793249f, 0.37069282f, 0.032349568f, + 0.1383706f, -0.11385618f, 0.592592f, 0.00042833964f, + 0.49638379f, 1.2465591f, -0.011800693f, 0.57946008f, + -0.010839422f, 0.030090485f, -0.1123948f, 0.033454392f, + -1.287936f, 0.058673371f, 0.025062392f, 0.25195584f, + 0.55351537f, -0.63952559f, 0.029179906f, 0.054558937f, + 0.17989442f, -0.3883034f, -0.004141374f, 0.21464634f, + 0.47404391f, 0.065372281f, 0.042091988f, -0.15323958f, + 0.041554365f, -0.15000018f, -2.5858438f, 0.20751593f, + 0.054089535f, 0.031346004f, 0.0046657464f, 0.18450145f, + -0.58910316f, 0.01918976f, -0.073576547f, -0.54260069f, + 0.61398304f, -0.017516607f, -0.68357974f, 0.60544205f, + 1.1781155f, 0.076206021f, -1.3751389f, 0.21372291f, + 0.37472311f, -0.079372987f, -0.0033873864f, 2.6360593f, + -0.061668478f, 0.20373408f, -0.33180121f, 3.174305f, + -0.0275278f, 0.017269978f, -0.22194861f, -0.03928626f, + 0.086791985f, 0.038912125f, -2.130028f, -0.077969819f, + 0.011491257f, -0.044943165f, 0.17183831f, 1.2288703f, + 0.21053682f, -0.94210321f, 0.806153f, 0.071445644f, + 0.24623756f, 0.12017152f, -0.11700022f, -0.42807248f, + 0.0041055656f, -0.033929687f, -0.039057985f, 0.085910171f, + 0.12759051f, -1.3937166f, -2.7836597f, -0.058258269f, + 1.1003051f, 0.041550543f, 0.75458789f, 0.13922513f, + -0.5501526f, 0.035263922f, 0.20651837f, 0.14146915f, + -2.6485322f, -0.03381459f, 0.061296377f, 0.38713402f, + 0.86053783f, -0.17399612f, 0.54871285f, 0.23215903f, + 0.62443972f, 0.24642579f, -0.081887908f, 0.092071168f, + 0.097713083f, 0.097181067f, -1.3768082f, 0.40130749f, + 0.091190651f, 0.11026845f, 0.49611038f, 0.10461254f, + -0.74076301f, 0.10370925f, -0.064948432f, 1.1928889f, + 0.17593549f, 0.38048872f, 0.12939483f, -1.0283749f, + 0.48416999f, 0.27310464f, -0.016347995f, 0.070131898f, + 0.09066283f, 0.071649671f, 0.10803445f, 0.083915502f, + 0.15222578f, -0.066564478f, -0.60801464f, 0.061614867f, + 0.41495958f, 1.2528093f, 0.0067553082f, 0.17796597f, + -0.0090462202f, 0.028445367f, -0.50822943f, 0.049164481f, + -2.1392374f, 0.053440835f, 0.061968002f, 0.14835966f, + 0.50547773f, -0.31349152f, 0.040636241f, 0.064773127f, + -0.60631245f, 0.028051114f, -0.016989317f, 0.23481853f, + 0.22710705f, 0.042001083f, -0.073771827f, -0.12963967f, + 0.023309348f, 0.019168867f, -4.105104f, 0.22200675f, + 0.065390147f, 0.030830763f, 0.030231031f, 0.14847927f, + -0.56990218f, 0.030831218f, 0.32256395f, -0.56182116f, + 0.57312298f, -0.10338388f, -0.52688974f, 0.65341282f, + 1.5359436f, 0.16572426f, -2.3262887f, 0.14451216f, + 0.37603346f, -0.11488343f, 0.0088901157f, 2.2629795f, + -0.047445942f, 0.11392512f, 0.095453911f, 3.4568717f, + -0.016605416f, 0.033650603f, -4.3747358f, -0.14397618f, + 0.063093305f, 0.059494529f, -2.4238877f, -0.015450561f, + 0.023608001f, -0.071380094f, 0.21746172f, 0.97149515f, + 0.15118188f, -2.5029247f, 1.116052f, -0.014583346f, + 0.18902199f, 0.053614631f, -0.10892931f, -0.2320873f, + -0.02433023f, 0.46943799f, -0.016074633f, 0.084777988f, + 0.099020727f, -1.0690751f, -2.3216753f, -0.47801694f, + 0.53258437f, 0.13866673f, -0.00096377643f, 0.085136086f, + -0.32868901f, 0.076987289f, 0.17767176f, 0.10972084f, + 0.52971721f, -0.018557033f, 0.035557467f, 0.18706936f, + 0.39619389f, 0.42671922f, 0.40115592f, 0.12025734f, + -0.40546501f, 0.25111893f, -0.022550317f, 0.13088821f, + 0.081315979f, 0.061657406f, -1.9504547f, 0.27857426f, + -1.2128319f, 0.1691993f, 0.57920617f, 0.033900082f, + -0.35257807f, 0.053081311f, -0.031678401f, 0.39476269f, + 0.10709381f, -0.25168204f, 0.069541119f, -0.78586704f, + 0.78654319f, 0.35165414f, -0.065268055f, 0.083219603f, + 0.10339852f, 0.10420623f, 0.19157434f, 0.038235635f, + 0.082701303f, -0.035476562f, 0.028244555f, -0.088195913f, + 0.063341573f, 1.0393506f, 0.073038898f, 0.49391693f, + 0.028398043f, 0.038979091f, -0.29402265f, 0.046730589f, + -0.90287161f, 0.055250723f, 0.039809637f, 0.16132279f, + 0.50477856f, 0.22932576f, 0.023781206f, 0.053072635f, + -0.57334518f, -0.090146221f, 0.019497704f, 0.24592058f, + 0.69913352f, 0.05161776f, 0.10025746f, 0.034487858f, + 0.027033782f, -0.067148156f, -5.6300645f, 0.22774276f, + 0.065485112f, 0.028497893f, 0.034898855f, 0.099566594f, + -0.69891661f, 0.047264591f, 0.45376197f, -0.43863624f, + 0.53989732f, -0.21461321f, -0.48900089f, 0.52821398f, + 1.2768661f, -0.09232232f, -1.0872165f, 0.16525145f, + 0.71533579f, -0.026561718f, 0.00095598551f, 1.1973119f, + -0.0096537946f, -0.004573239f, 0.5432952f, 3.2215784f, + -0.10019974f, 0.017023344f, 0.11145024f, 0.19735317f, + 0.048126239f, 0.066220164f, -2.1702845f, -0.53454852f, + 0.03033597f, -0.1060504f, 0.10229235f, 0.16540328f, + 0.22547387f, -2.2264209f, 1.1972978f, 0.083714589f, + -0.065125257f, 0.091023803f, -0.042682726f, 0.53435725f, + 0.070101544f, 0.52387631f, -0.057300955f, 0.069278143f, + 0.093708664f, -0.96043289f, -3.1019554f, 0.078423306f, + 0.86284906f, 0.13401037f, 1.2777673f, 0.04774636f, + -0.77227199f, 0.083614931f, 0.22658162f, 0.12802453f, + -0.64835107f, -0.038192496f, 0.062071905f, 0.24589938f, + 0.63473034f, -0.31768006f, 0.46801776f, 0.15174447f, + 0.30907112f, 0.30892903f, 0.063862577f, 0.23149714f, + 0.090306789f, 0.047825139f, -2.3580508f, 0.17991665f, + -1.2121656f, 0.13626589f, 0.4870021f, 0.058819797f, + -0.55792481f, 0.093148328f, 0.037990112f, 0.78945273f, + 0.11609505f, 0.15135831f, 0.081672922f, -0.86773711f, + -0.3474384f, 0.64035398f, -0.053477377f, 0.10244204f, + 0.084095515f, 0.086286865f, -0.14605968f, 0.031573541f, + 0.12594433f, -0.054469485f, 0.083255775f, 0.078211695f, + 0.2070955f, 0.76243657f, -0.037176896f, 0.59839922f, + -0.002477966f, 0.031969737f, -0.50467569f, 0.043740809f, + -1.1468788f, 0.035394501f, 0.044360302f, 0.32250053f, + 0.04243049f, -0.31593531f, 0.033029418f, 0.051638301f, + 0.77159971f, -0.26086947f, 0.015619566f, 0.22764616f, + 0.42759997f, 0.035666637f, -0.019635724f, -0.090957619f, + 0.02816279f, 0.054988872f, -3.7008657f, 0.21394788f, + 0.072822675f, 0.039298683f, 0.021417173f, 0.60465354f, + -0.93134016f, 0.031676978f, -0.35180253f, -0.53720993f, + 0.5943771f, -0.21155564f, -0.24032031f, 0.58095056f, + 1.0455791f, 0.41913006f, -1.1925792f, 0.14773811f, + 0.63347989f, -0.090771779f, 0.012234085f, 0.95761269f, + -0.056493402f, -0.059711695f, 0.36265647f, 3.0757084f, + 0.049596168f, 0.019150678f, -1.6451139f, -0.11638663f, + 0.042186182f, 0.063873559f, -2.121882f, 0.23386979f, + 0.0073031434f, -0.13409613f, 0.15948333f, 1.1594089f, + 0.16539453f, -2.3121107f, 1.45069f, 0.013074175f, + -0.43659943f, 0.083078802f, 0.082714751f, 0.76637322f, + 0.077992849f, 1.0713156f, -0.0055263648f, 0.078358814f, + 0.11078962f, -0.8753587f, -2.6699061f, 0.89909214f, + 0.64974457f, 0.12361578f, 1.2359302f, 0.11662525f, + -0.58220303f, 0.091777809f, 0.27446151f, 0.12724136f, + 0.57413673f, -0.0098388474f, 0.06899932f, 0.29841915f, + 0.62893265f, -0.58612835f, 0.088648625f, 0.14363809f, + -0.03299709f, 0.39810109f, -0.0063053099f, 0.12115514f, + 0.093236051f, 0.052151062f, -2.8683562f, 0.2884495f, + -1.3257992f, 0.16366997f, 0.58910787f, 0.086051755f, + -0.45574778f, 0.10361272f, -0.049069889f, 0.67527544f, + 0.16524912f, -0.025479916f, 0.083276518f, -1.0326684f, + -0.47816658f, 0.66824275f, 0.062654339f, 0.058439914f, + 0.093903609f, 0.12194729f, -0.57826221f, 0.015060916f, + 0.06127901f, -0.0041916287f, 1.043577f, -0.054870669f, + 0.12941872f, 0.69983739f, 0.031635057f, 0.38076463f, + -0.014813825f, 0.051192194f, -0.42663753f, 0.025051713f, + -0.9077999f, 0.059564438f, 0.05542437f, 0.22144228f, + -0.52817625f, -0.34164006f, 0.056488328f, 0.051793773f, + 1.2479033f, -0.25152072f, 0.032978177f, 0.24308962f, + 0.55563408f, 0.060250696f, -0.0015290162f, -0.080450311f, + 0.041364733f, -0.028621335f, -0.92788774f, 0.25754389f, + 0.062141959f, 0.024142543f, 0.017219432f, 0.69122738f, + -0.69950527f, 0.019689003f, -0.62791651f, -0.53111982f, + 0.61451602f, 0.15317553f, -0.37921727f, 0.49476129f, + 0.28979182f, 0.4845964f, -0.76395255f, 0.077192754f, + 0.4242487f, -0.032415319f, 0.017849639f, 0.35264283f, + -0.037551817f, -0.0066793691f, 0.89761835f, 2.2167089f, + -0.080831401f, 0.03247663f, -0.65025395f, -0.26512432f, + 0.027135648f, 0.058915749f, -1.7597557f, -0.12483537f, + 0.022966575f, -0.12439405f, 0.18714473f, 0.90771174f, + 0.17933448f, -1.610671f, 1.8773446f, 0.013457023f, + 0.042860508f, 0.05759377f, 0.15106337f, 1.119674f, + 0.011193941f, 1.5561917f, -0.011191805f, 0.086142443f, + 0.1007431f, -0.97411704f, -1.6298952f, 1.4076499f, + 0.55271757f, 0.15192172f, 1.1322908f, 0.33772373f, + -0.11989833f, 0.089112297f, 0.21599475f, 0.087975614f, + 0.27126986f, 0.020516634f, 0.044183936f, 0.30578235f, + 0.61064845f, -0.74298304f, -0.025300976f, 0.11753885f, + -0.010585768f, 0.011364507f, -0.016768454f, 0.12950544f, + 0.087351337f, 0.053656824f, -3.0902517f, 0.43677002f, + -1.6132905f, 0.1351878f, 0.61589879f, 0.046255253f, + -0.47320852f, 0.077007808f, 0.057420693f, 0.59328479f, + 0.26516658f, -0.11828413f, 0.051370405f, -0.66474193f, + -0.39631385f, 0.49691293f, 0.04974284f, 0.12419633f, + 0.090431221f, 0.099740237f, -0.57652998f, 0.030817954f, + 0.12117866f, -0.083234929f, 1.3610607f, 0.021199998f, + 0.12529089f, 0.48804927f, 0.010834562f, 0.1909637f, + -0.012018906f, 0.047697354f, -0.24290231f, 0.040338412f, + -0.79018784f, 0.060637489f, 0.073490672f, 0.22342697f, + -0.84201717f, -0.30741051f, 0.00773184f, 0.03495856f, + 0.90267879f, -0.055938624f, 0.044103406f, 0.22741178f, + 0.56491917f, 0.038067553f, -0.026753351f, -0.029414762f, + 0.039097108f, -0.33247393f, -0.4349733f, 0.21367142f, + 0.060528271f, 9.2393275e-05f, 0.047559623f, 0.927688f, + -0.63687009f, 0.034208491f, -0.72592854f, -0.54581952f, + 0.60634649f, -0.017586596f, -0.41946232f, 0.73338747f, + -0.86811334f, 0.49245983f, -1.3965319f, 0.17229894f, + 0.30144534f, -0.096119292f, -0.0036761388f, -0.1673598f, + -0.035094053f, 0.052893411f, 0.88051808f, 1.4165715f, + -0.050511118f, 0.025203554f, -0.96903843f, 0.054702919f, + 0.041011471f, 0.056589596f, -1.3455404f, -0.031553637f, + 0.025522368f, -0.079181626f, 0.20494206f, 1.2895409f, + 0.1574589f, -3.0963302f, 1.7921196f, 0.011407442f, + -0.11925623f, 0.08008036f, -0.089161105f, 0.96229821f, + 0.049455792f, 1.5170853f, -0.021227866f, 0.045467265f, + 0.097296298f, -1.0864836f, -0.97145462f, 1.6863165f, + 0.34689736f, 0.18031427f, 0.96315503f, 0.44281879f, + -0.97967714f, 0.084512442f, 0.21522824f, 0.086144321f, + -0.13304107f, 0.0024947443f, 0.053958174f, 0.3117255f, + 0.62203187f, -0.81863725f, -0.36880642f, 0.16490386f, + -0.21416186f, -0.0065712328f, 0.023828631f, 0.037665196f, + 0.095695734f, 0.060833104f, -3.6173048f, 0.41169429f, + -1.3717338f, 0.15934148f, 0.74989444f, 0.076169863f, + -0.12888919f, 0.046198387f, 0.045319673f, 0.35152701f, + 0.45055839f, -0.076830581f, 0.072984941f, -0.84079689f, + -0.18820284f, 0.38878664f, 0.03681428f, 0.12494884f, + 0.092591308f, 0.10656123f, -0.91256124f, 0.022941435f, + 0.12568176f, -0.056657925f, -0.22154686f, 0.0097140362f, + -0.18842363f, 0.48217258f, 0.026214495f, 0.41534761f, + -0.018894259f, 0.044340208f, -0.23220624f, 0.030649709f, + -0.79206806f, 0.047232341f, 0.12628299f, 0.26646805f, + -1.3519143f, -0.25369364f, 0.030269837f, 0.049727399f, + 0.41111702f, 0.038185298f, 0.026586356f, 0.23855306f, + 0.77243721f, 0.045857929f, 0.0019695451f, 0.0038244489f, + 0.033106107f, -0.055812441f, -0.26219156f, 0.22298022f, + 0.074236751f, 0.021467645f, 0.028497651f, 0.7596696f, + -0.48609549f, 0.039373636f, -0.65395242f, -0.51633185f, + 0.61507964f, -0.11925627f, -0.31959257f, 0.79390454f, + -0.96070606f, 0.17308821f, -1.585345f, 0.089179792f, + 0.39755413f, -0.058938447f, 0.0018339546f, -0.39342308f, + -0.041157238f, -0.0021130696f, 1.1527045f, 0.78291523f, + -0.031869408f, 0.039282717f, -0.8706584f, -0.30068266f, + 0.030603245f, 0.029936461f, -1.036095f, -0.044570521f, + 0.036315501f, -0.076773137f, 0.12415323f, -0.29393739f, + 0.1755846f, -3.0502152f, 1.7455424f, -0.075825088f, + 0.16073287f, 0.11918904f, -0.25197923f, 1.1952556f, + -0.027166117f, 1.607529f, -0.017230349f, 0.097319335f, + 0.10673625f, -1.2901759f, 0.27368873f, 1.6007336f, + 0.54704708f, 0.1652379f, 0.99098021f, -0.14984168f, + -0.83730048f, 0.062198289f, 0.21282165f, 0.094133839f, + -0.43173084f, 0.026620742f, 0.061458174f, 0.26682135f, + 0.565534f, -0.51672888f, -0.077460662f, 0.13388424f, + -0.35962927f, -0.047908738f, 0.090067431f, 0.11193354f, + 0.076566361f, 0.078982323f, -3.2856927f, 0.51372564f, + -1.4334106f, 0.13616234f, 0.83991456f, 0.079838797f, + -0.54442579f, 0.0020991862f, 0.015091187f, 0.37782329f, + 0.53225619f, 0.31494182f, 0.063915551f, -0.96433449f, + 0.41157079f, 0.21408007f, 0.05449675f, 0.093209848f, + 0.1073558f, 0.11198577f, 0.18802376f, 0.08088813f, + 0.14135398f, -0.081367187f, -0.81109405f, -0.016036013f, + 0.12913598f, 0.35856232f, -0.08683037f, 0.18730758f, + -0.013941676f, 0.046405226f, -0.3072992f, 0.059420597f, + -0.48484337f, 0.068497032f, 0.14072067f, 0.29830837f, + -1.58258f, -0.30885786f, 0.034445126f, 0.043634195f, + -0.9305222f, -0.43865868f, 0.010834056f, 0.22181162f, + 0.46178734f, 0.041386053f, 0.0017725931f, -0.027303461f, + 0.015476377f, -0.23971154f, -1.4563978f, 0.21354188f, + 0.056129847f, 0.010038109f, 0.047191273f, 0.62284929f, + -0.23647732f, 0.026455179f, -0.57786125f, -0.48061144f, + 0.63865775f, -0.13668755f, -0.32386589f, 1.1590471f, + -0.91235447f, 0.87870514f, -1.9777987f, 0.14142472f, + 0.16995879f, -0.033702396f, 0.013720449f, -0.65879095f, + -0.0071845618f, 0.011175008f, 0.7944985f, 0.19225593f, + -0.012517514f, 0.015763262f, -0.58571076f, -0.3630079f, + 0.03742408f, 0.053550646f, -0.69816893f, -0.097610816f, + 0.03673353f, 0.16386139f, 0.11445634f, 0.5122962f, + 0.20191605f, -1.7608892f, 1.5795817f, 0.080149353f, + 0.94157618f, 0.07498879f, 0.15030129f, 1.1575879f, + -0.077242374f, 1.3098865f, 0.010741485f, 0.10568734f, + 0.10832715f, -1.3462507f, 0.5621261f, 0.56360257f, + 0.46071234f, 0.24056798f, 1.0992924f, 0.81624746f, + -0.71402836f, 0.073211625f, 0.26627138f, 0.083592407f, + -1.2308729f, -0.02129426f, 0.056206215f, 0.3263174f, + 0.31859747f, -0.50904739f, -0.085050382f, 0.15415633f, + 0.10728715f, -0.30287376f, 0.031200171f, 0.086736389f, + 0.079452939f, 0.045096122f, -1.6542802f, 0.46302077f, + -1.8333526f, 0.15675935f, 1.1087178f, 0.11168713f, + -0.62853074f, 0.11362547f, -0.058991157f, 0.5918256f, + 0.80200386f, 0.30238751f, 0.055563733f, -0.80352366f, + 0.89508158f, 0.15317518f, 0.017512092f, 0.08849109f, + 0.098517589f, 0.14017479f, -0.19625963f, 0.024596522f, + 0.14720526f, 0.041031353f, -0.69613725f, 0.024306683f, + -0.079815023f, 0.26413012f, -0.12191325f, 0.044832144f, + 0.0013408655f, 0.046430279f, -0.34208816f, 0.035532512f, + 0.066596866f, 0.06103909f, 0.10527463f, 0.20866939f, + -2.1938796f, -0.17873669f, 0.024469903f, 0.061721724f, + -0.72519958f, -0.12648056f, -0.00084507855f, 0.22584063f, + 0.33032632f, 0.041065048f, 0.025608987f, -0.041427594f, + 0.021253616f, -0.056912586f, -1.6427153f, 0.22688575f, + 0.058755171f, 0.014311277f, 0.032168396f, 0.34359971f, + -0.20216545f, 0.041484758f, -0.84080237f, -0.55189449f, + 0.64201874f, 0.043732695f, 0.58805639f, 1.5343524f, + -0.94118941f, 1.0107822f, -1.6538646f, 0.11128054f, + 0.32701227f, -0.03718923f, 0.021517647f, -1.3334538f, + -0.0087273428f, -0.40378523f, 0.037153624f, -0.59518462f, + -0.021008756f, 0.011341815f, -0.70810688f, 0.066203438f, + 0.092155889f, 0.062687583f, -0.10832085f, -0.27343994f, + 0.0057404861f, -0.019541202f, 0.11072371f, 0.59888363f, + 0.1610941f, -1.1739612f, 1.1401162f, -0.020375032f, + 1.1221818f, 0.079049602f, 0.31476262f, 0.72603178f, + -0.11096346f, 0.072142303f, 0.0067696851f, 0.061762508f, + 0.096283086f, -1.5768905f, 0.10802922f, -0.52902049f, + 0.36700904f, 0.13981552f, 0.31061429f, 0.089548983f, + 0.20024635f, 0.047967259f, 0.2188109f, 0.036797613f, + -0.28292775f, -0.027308786f, 0.050341435f, 0.24520838f, + 0.093922637f, -0.82289046f, -0.091169775f, 0.13270597f, + 0.45335415f, -0.24259861f, 0.053272448f, -0.23153633f, + 0.097373806f, 0.070866905f, -1.0918163f, 0.39253598f, + -1.2863719f, 0.1583361f, 1.0548022f, 0.089611538f, + -0.49644232f, 0.10381008f, -0.076024629f, 1.1045707f, + 0.39758545f, 0.048125554f, 0.056353882f, -0.53593588f, + -0.27695069f, 0.035414565f, -0.00099026633f, 0.068262793f, + 0.10397033f, 0.080604538f, -2.2199776f, 0.030197693f, + 0.14533982f, -0.056406531f, 0.52670109f, 0.062945411f, + -0.10513704f, 0.18222046f, -0.25668505f, -0.25485569f, + 0.00024402347f, 0.054615796f, -0.17687355f, 0.031383045f, + -0.015657658f, 0.049643502f, 0.076273195f, 0.23444358f, + -3.0148089f, -0.32899871f, 0.034087826f, 0.044276774f, + -0.36921489f, 0.21803857f, 0.02711986f, 0.21130949f, + 0.58874357f, 0.056466185f, 0.041236099f, -0.06486617f, + 0.034043502f, -0.027264338f, 0.35160756f, 0.20495656f, + 0.05699439f, 0.030233299f, 0.019096375f, -0.56152946f, + -0.52017099f, 0.039648496f, -0.079527348f, -0.57162851f, + 0.61959213f, 0.1452453f, 0.35342973f, 0.8997007f, + -0.84125543f, 0.52321804f, -1.2035398f, 0.13129693f, + 0.33981586f, -0.12473098f, -0.017571364f, -1.8435332f, + -0.022120653f, -0.17551656f, -0.57147789f, -1.3618174f, + -0.053344581f, -0.0040308828f, -1.4831504f, 0.35124704f, + 0.074902833f, 0.052322686f, 0.34133932f, 0.058399815f, + 0.024673924f, -0.35861653f, 0.12430562f, 0.86400026f, + 0.16391677f, 1.1418937f, 0.91719043f, -0.022521894f, + 0.15328743f, 0.10947257f, -0.4433158f, 0.79266292f, + -0.20099109f, 0.27118731f, 0.0022360906f, 0.06934762f, + 0.092497848f, -1.378588f, -0.49658015f, -0.68135953f, + 0.52855545f, 0.03208489f, -0.036741901f, 0.24798168f, + 0.023535278f, 0.088553093f, 0.22054321f, 0.021904407f, + -0.52020437f, -0.0074345502f, 0.05845616f, 0.21826781f, + 0.19296215f, -0.91866738f, 0.091697283f, 0.08833041f, + 0.76740944f, -0.29107571f, -0.028991114f, -0.062745936f, + 0.099099971f, 0.074092187f, 0.14713296f, 0.26956996f, + -0.98135394f, 0.17805152f, 0.9866488f, 0.070896797f, + -0.58356959f, 0.061633766f, 0.025164876f, 0.87205178f, + 0.49303797f, 0.078992106f, -0.0019379642f, -0.57817352f, + 0.0055953828f, -0.44929314f, 0.025605964f, 0.076114342f, + 0.064046226f, 0.072738819f, -2.4290812f, 0.064900003f, + 0.14618874f, -0.078756541f, 0.70153302f, 0.0070420257f, + 0.16924903f, -0.54984051f, -0.1254738f, 0.029248705f, + 0.024777444f, 0.0279621f, -0.055629339f, 0.044670608f, + -0.56991398f, 0.04421407f, 0.089631326f, 0.24864413f, + -2.9391105f, -0.22854519f, 0.008759439f, 0.042016368f, + -0.4063468f, -0.066455781f, -0.026843932f, 0.22974505f, + 0.54679745f, 0.048626062f, -0.065371104f, -0.089353815f, + 0.042232234f, -0.020194246f, 1.8944486f, 0.24085636f, + 0.081909783f, 0.045506388f, 0.037959307f, -1.0941232f, + -0.69194841f, 0.084256195f, 0.44657063f, -0.48338774f, + 0.67139924f, 0.14327849f, 0.23605141f, 0.77683556f, + -0.44787097f, 0.45910934f, -1.3580997f, 0.19834286f, + -0.20404607f, -0.059003316f, -0.0064066299f, -2.1883836f, + 0.022563005f, -0.003348948f, -0.71693522f, -1.9866097f, + -0.048681498f, 0.051812164f, -1.6016189f, 0.045665573f, + 0.044874854f, 0.067494422f, 0.77836233f, 0.33934873f, + 0.047042545f, -0.05997121f, 0.14477718f, 1.2181177f, + 0.21812096f, 2.7535281f, 0.93367326f, 0.055927567f, + -0.22693467f, 0.092270851f, -0.080873281f, 1.4103357f, + -0.065680914f, 1.134063f, 0.015398358f, 0.070651546f, + 0.11163869f, -0.74417257f, -0.63069093f, -0.80686504f, + 0.41533771f, 0.30390027f, 0.18490003f, 0.43771565f, + -0.97176129f, 0.092715561f, 0.27178973f, 0.10919444f, + -2.3040314f, -0.0095116999f, 0.068303324f, 0.29478219f, + 0.53289694f, -0.53461635f, -0.042776123f, 0.19623818f, + 0.38240951f, 0.20712094f, -0.028577397f, 0.21454571f, + 0.093051039f, 0.062045831f, -0.16517146f, 0.1787474f, + 0.61074835f, 0.16360408f, 0.36144343f, 0.12223558f, + -0.54084182f, 0.036982719f, 0.069871493f, 0.20376493f, + 0.60131037f, 0.10661448f, 0.052697897f, -0.28087658f, + 0.78986073f, -0.0038844994f, 0.018968031f, 0.056072589f, + 0.094549999f, 0.084842794f, 0.082414985f, 0.060612146f, + 0.070618212f, 0.04833157f, 1.3291646f, -0.11900949f, + 0.55623281f, -1.4735382f, -0.040398978f, 0.4213205f, + 0.0098051475f, 0.031909376f, -0.15530953f, 0.051771913f, + -0.65178901f, 0.055638727f, 0.027736619f, 0.44790486f, + -2.4267557f, -0.61079103f, 0.056417644f, 0.05485969f, + -0.55986136f, -0.17329066f, 0.034389745f, 0.23843373f, + 0.028514232f, 0.037181992f, -0.033975296f, -0.12205806f, + 0.028089488f, 0.20808379f, 1.4500995f, 0.24664149f, + 0.081126116f, -0.007976206f, 0.049261071f, -2.1248505f, + -0.59947336f, 0.030149359f, 0.12341496f, -0.52309501f, + 0.69904536f, -0.35791072f, 0.59832573f, 1.382426f, + -0.75216579f, 1.3870718f, -1.4078834f, 0.12468334f, + -0.014680181f, -0.11352599f, 0.016913956f, -2.0257626f, + -0.00088721159f, 0.60717762f, -0.32510719f, -1.5619304f, + -0.074715734f, 0.05090012f, 0.065600954f, -0.90920556f, + 0.034094412f, 0.050182916f, 0.51853311f, 0.55423456f, + 0.041929509f, 0.0787808f, 0.11241689f, -0.20198463f, + 0.19383129f, 2.5839658f, 1.0414615f, -0.010220245f, + -0.29463434f, 0.086949162f, 0.21704595f, 1.5974749f, + 0.050437875f, 1.4410362f, -0.02637686f, 0.064370185f, + 0.11191174f, -0.3447262f, -0.20969184f, -0.81910282f, + 0.48387107f, 0.15752146f, 0.51226556f, -1.1717569f, + -0.87851107f, 0.081079826f, 0.26900628f, 0.16364706f, + -0.2982406f, -0.022910854f, 0.045844339f, 0.32331583f, + 0.61504948f, -0.50860167f, -0.018015815f, 0.15007463f, + -0.15875983f, 0.82759327f, -0.031865612f, 0.10959985f, + 0.07129357f, 0.03469038f, -0.089173153f, 0.30439693f, + 1.5073949f, 0.15096523f, 0.030378301f, 0.08549881f, + -0.24602441f, 0.0403657f, -0.055607323f, 0.0032074577f, + 0.25875089f, 0.0043599578f, 0.031727478f, 0.67678434f, + 0.5725739f, 0.1616933f, 0.047561139f, 0.050889138f, + 0.098572671f, 0.12814689f, 0.3270267f, -0.004733766f, + 0.076478392f, -0.11539236f, 1.0552182f, 0.047188122f, + 0.55162191f, -2.0870185f, -0.11014683f, 0.31994957f, + -0.013967758f, 0.018230466f, -0.78563511f, 0.032631304f, + -0.67548853f, 0.047553107f, 0.033596043f, 0.41311574f, + -2.1302943f, -0.83553678f, 0.043884486f, 0.042114422f, + 0.30551764f, 0.17675972f, 0.019975236f, 0.23967016f, + 0.40654725f, 0.054648004f, -0.026390538f, -0.11650035f, + 0.034041792f, 0.013609265f, -0.2313724f, 0.20322463f, + 0.058163881f, 0.015310682f, 0.045382511f, -2.1367357f, + -0.27548283f, 0.028092699f, -0.42831942f, -0.56719011f, + 0.65777653f, -0.39215663f, 0.53511328f, 1.1893498f, + -1.0896606f, 1.5609959f, -1.775293f, 0.10056441f, + -0.24682924f, -0.14616743f, 0.041197922f, -1.8065114f, + 0.0011301882f, 0.54989612f, -0.24067596f, -1.5117676f, + -0.070766091f, 0.0422116f, 0.57581908f, -0.8460657f, + 0.029571397f, 0.087073989f, 0.60583276f, 0.39293325f, + 0.042316388f, -0.03658589f, 0.15847276f, 1.4552327f, + 0.18711559f, 1.2471994f, 0.76579243f, 0.011338986f, + -0.41306296f, 0.076304786f, -0.052359149f, 1.950837f, + 0.0051280116f, 2.0386972f, -0.029159209f, 0.085498728f, + 0.073905535f, 0.25424021f, 0.0998151f, -1.1618623f, + 0.17039888f, 0.22383314f, 0.025574395f, 1.284111f, + -1.298291f, 0.077281103f, 0.22979948f, 0.085836761f, + 0.40306786f, -0.012665665f, 0.070839837f, 0.25228173f, + 0.56666487f, -0.61017919f, 0.052854154f, 0.13754106f, + -0.16214524f, 1.1265794f, -0.026514288f, 0.030470878f, + 0.081051156f, 0.068845458f, 0.10874795f, 0.36518767f, + 1.4191601f, 0.15885206f, -0.62947148f, 0.062025502f, + -0.31154877f, 0.07224679f, 0.037115943f, 0.28551507f, + 0.11844063f, 0.19331765f, 0.025791265f, 0.82132947f, + 0.3632144f, -0.048520647f, 0.051538181f, 0.061038807f, + 0.095145963f, 0.099775083f, -0.7704975f, 0.010000503f, + 0.11026278f, -0.043395925f, 0.37141851f, -0.061643235f, + 0.31927368f, -2.3245912f, 0.01538942f, 0.31330115f, + 0.0073822271f, 0.039258987f, -0.62114364f, 0.056543011f, + -1.1581168f, 0.057702657f, 0.090604171f, 0.32667267f, + -1.622918f, -1.0757471f, 0.020684339f, 0.069048256f, + 0.87980479f, -0.31631434f, 0.016051929f, 0.2402093f, + 0.35887843f, 0.039821714f, 0.031052331f, -0.13012928f, + 0.020681025f, 0.049248748f, 0.35230187f, 0.20482518f, + 0.031896763f, 0.027465289f, 0.036638089f, -2.5184166f, + -0.12976997f, 0.018889423f, -0.25364307f, -0.60007989f, + 0.65649605f, -0.10646355f, 0.52456468f, 0.80951881f, + -0.90592861f, 0.13888122f, -1.4282218f, 0.15722348f, + 0.15952721f, -0.057131816f, 0.013819439f, -1.6715785f, + -0.029685663f, 0.20280716f, -0.37207571f, -1.5034281f, + -0.031928901f, 0.019138582f, -0.67854011f, -0.86337543f, + 0.056360658f, 0.044814955f, 0.79534823f, 0.50392741f, + 0.026144361f, -0.07523039f, 0.1757977f, -8.0947886f, + 0.15566537f, 1.437433f, 0.48227382f, -0.032188762f, + -0.15041636f, 0.10004709f, 0.078775257f, 1.7012579f, + 0.0032857165f, 1.8187429f, -0.058438141f, 0.084872209f, + 0.10292646f, 0.83604562f, 0.42576897f, -0.78816319f, + 0.092333168f, 0.14314845f, 0.047391813f, -0.31253245f, + -0.9733631f, 0.083455637f, 0.27621424f, 0.10645514f, + 0.27899534f, -0.012726939f, 0.063536122f, 0.27054441f, + 0.42799726f, -0.20557292f, 0.31268439f, 0.14564256f, + -0.05297469f, 1.2499201f, 0.059531223f, 0.2411575f, + 0.094207071f, 0.082933657f, 0.22830804f, 0.35886165f, + 1.6100866f, 0.14834201f, -1.1858517f, 0.060542054f, + -0.26321715f, 0.044229832f, 0.088971019f, 0.10903069f, + -0.10965364f, -0.078787833f, -0.0048615597f, 0.77476823f, + 0.26735315f, 0.17452188f, 0.020231601f, 0.050069865f, + 0.10991617f, 0.11937967f, -0.48940757f, 0.062200762f, + 0.09228716f, -0.10372465f, -0.21038722f, -0.0073808231f, + 0.47958943f, -2.1699078f, -0.047559418f, 0.26965871f, + -0.0035505956f, 0.043129329f, -0.626782f, 0.032892346f, + -0.5864687f, 0.027753197f, 0.035540458f, 0.26210943f, + -0.92993683f, -0.97964245f, 0.049352463f, 0.05581785f, + 0.74875861f, -0.79353052f, 0.0144906f, 0.23828968f, + 0.016911417f, 0.062650159f, -0.014296203f, -0.18647909f, + 0.022794625f, -0.20823507f, -0.39920399f, 0.21966261f, + 0.055183459f, 0.022189884f, 0.047032438f, -1.9398679f, + 0.03184247f, 0.022238147f, -0.53407145f, -0.57817709f, + 0.67442167f, -0.33321413f, 0.17378783f, 0.49551785f, + -0.75311029f, 0.1322991f, -0.95098293f, 0.15389805f, + -0.19373819f, -0.081299372f, 0.022779536f, -1.5758524f, + -0.017780848f, 0.16977525f, -0.32578415f, -1.4163141f, + -0.085220046f, 0.034277752f, -1.2694327f, -0.72709543f, + 0.060344495f, 0.065706812f, 0.76151019f, -0.00076707423f, + 0.016068164f, -0.1784859f, 0.21288036f, 0.53664917f, + 0.12351685f, 0.60861331f, -0.0024235689f, -0.021126969f, + 0.060925208f, 0.091980807f, -0.23499605f, 1.2960219f, + 0.038990762f, 1.3869356f, -0.055474043f, 0.088100038f, + 0.096209615f, 1.626014f, 0.4575859f, -0.75074548f, + -0.012057398f, 0.13421704f, 0.33895293f, 0.16953996f, + -0.67973047f, 0.083643675f, 0.21751454f, 0.1296822f, + 0.58119214f, -0.00048667222f, 0.062729895f, 0.23908101f, + 0.3694225f, -0.55337071f, 0.34121725f, 0.16290666f, + 0.041870888f, 1.1901486f, -0.010818965f, 0.31033742f, + 0.095533319f, 0.071000606f, 0.33147204f, 0.35707539f, + 1.6915505f, 0.14571296f, -1.6614743f, 0.10770442f, + -0.54397696f, 0.022406749f, 0.06387461f, 0.4081085f, + -0.07638295f, -0.06419991f, 0.088924393f, 0.42382252f, + 0.25597763f, 0.079655133f, -0.005487544f, 0.031524315f, + 0.10072334f, 0.11206379f, -0.30371931f, 0.03141319f, + 0.10180585f, 0.065500952f, -0.2825464f, -0.092937663f, + -0.01780707f, -1.8936336f, 0.22877386f, 0.27106106f, + -0.0089582261f, 0.0081978915f, -0.57040656f, 0.067315228f, + -0.90038216f, 0.03664447f, 0.11094564f, 0.25578099f, + -0.25965506f, -0.52690524f, 0.026707588f, 0.04418917f, + 1.0646533f, -0.69198161f, -0.003724806f, 0.23663977f, + -0.01092929f, 0.036573727f, -0.036571417f, -0.15625188f, + 0.030461177f, -0.246433f, 0.49186167f, 0.21084957f, + 0.040851872f, 0.023194559f, 0.035701778f, -1.707984f, + -0.32526642f, 0.024724012f, -0.0062580993f, -0.53440857f, + 0.67313737f, -0.22494175f, -0.037386995f, 0.3100397f, + 0.18934628f, 0.026924394f, -0.94454068f, 0.099128798f, + 0.19007497f, -0.020072605f, 0.0078417063f, -1.4985489f, + -0.045629375f, 0.21249732f, -0.44496882f, -1.4031773f, + -0.077685699f, 0.037695646f, -2.2114635f, -0.66952914f, + 0.052967452f, 0.047190215f, 0.65263867f, 0.12941535f, + 0.028303199f, -0.18903244f, 0.16974178f, 0.15029247f, + 0.14061388f, -0.52160138f, -0.36103263f, -0.01997987f, + 0.30748522f, 0.059646167f, -0.37736055f, 1.2393407f, + -0.011890738f, 1.2552873f, -0.029806942f, 0.078522749f, + 0.091445811f, 2.3381441f, 0.37197289f, -0.98552203f, + 0.31505522f, 0.0636907f, 0.47412565f, 0.58885902f, + -0.72295398f, 0.062545575f, 0.2362541f, 0.1691646f, + -0.15715495f, -0.045258861f, 0.051755093f, 0.29554272f, + 0.12850951f, -0.48345557f, 0.24167657f, 0.17130566f, + 0.40781647f, 0.84545916f, -0.0043773227f, 0.26240811f, + 0.089442484f, 0.050723061f, 0.58034402f, 0.45883188f, + 1.9405547f, 0.16291951f, -2.0563679f, 0.070382491f, + -0.20127779f, 0.16892377f, -0.018367693f, 0.49267554f, + 0.0073771533f, 0.10777189f, 0.09743835f, -0.58447158f, + 0.23541923f, 0.077088058f, -0.0027911395f, 0.083974607f, + 0.10407153f, 0.10946916f, -0.99783856f, 0.048981901f, + 0.068621233f, -0.0006490887f, -0.45340872f, -0.072588354f, + -0.07502459f, -1.4230756f, 0.1764659f, 0.10631232f, + -0.022426108f, 0.028255681f, -0.73202711f, 0.049286593f, + -1.5236567f, 0.03504964f, 0.16500843f, 0.26826346f, + 0.17669486f, -0.52400106f, 0.021091014f, 0.053518359f, + 1.0748174f, -0.24787463f, 0.023504782f, 0.26637712f, + 0.23144323f, 0.040272418f, -0.028192073f, -0.1321231f, + 0.010652079f, 0.12336694f, 0.81431252f, 0.23336183f, + 0.051263187f, 0.019380853f, -0.020120734f, -1.4947516f, + -0.52773803f, 0.013314816f, 0.011715549f, -0.54775178f, + 0.67089599f, -0.30130601f, -0.039340559f, 0.53822607f, + 1.4264835f, 0.20411803f, -1.3928299f, 0.14824501f, + 0.19117303f, -0.0093933297f, 0.0097529218f, -1.3139451f, + -0.06246832f, 0.25377902f, -0.4396947f, -1.4167954f, + -0.027956014f, 0.019424343f, -2.4672542f, -0.340049f, + 0.058334123f, 0.059603658f, 0.84353179f, 0.35287407f, + 0.039523859f, -0.048800118f, 0.15191358f, 0.0082582962f, + 0.19250493f, 0.12244575f, -0.90431118f, 0.034682076f, + 0.043373648f, 0.07625068f, -0.07716161f, 0.72628778f, + -0.0049416088f, 0.37010142f, -0.057425134f, 0.063754924f, + 0.10687099f, 2.5785258f, -0.0041354066f, -1.3269677f, + 0.3290697f, 0.094348021f, 0.73312533f, 0.42142251f, + -0.011948216f, 0.057201479f, 0.26281896f, 0.18116516f, + -0.99513721f, -0.0051043895f, 0.056791048f, 0.29495421f, + 0.22081029f, -0.51939893f, 0.54746723f, 0.16849622f, + 0.88651198f, 0.84109825f, 0.080832995f, -0.042787883f, + 0.095617726f, 0.079994023f, 0.85078233f, 0.39887193f, + 1.7327589f, 0.15702778f, -2.1774588f, 0.098605216f, + -0.21936701f, 0.12796657f, 0.034318034f, 0.69967681f, + 0.099617511f, 0.15990931f, 0.049137354f, -0.97349942f, + 0.091500387f, 0.30383867f, 0.026090404f, 0.10196608f, + 0.077292189f, 0.13376188f, -0.48419029f, 0.02341936f, + 0.079419993f, -0.10547129f, -1.3727629f, 0.025672795f, + 0.13963819f, -0.86834282f, 0.087660737f, 0.049537599f, + -0.017914433f, 0.076473244f, -0.57294953f, 0.072356783f, + -2.0546598f, 0.048558824f, 0.10491721f, 0.2924473f, + 0.5498156f, -0.72070855f, 0.042570427f, 0.050720617f, + 0.83560157f, -0.33120689f, 0.033320095f, 0.23950845f, + 0.15883105f, 0.037746564f, 0.071708791f, -0.069884889f, + 0.02173226f, 0.15117885f, -0.17285746f, 0.18725149f, + 0.056292448f, -0.0020138233f, 0.023135498f, -0.072362296f, + -0.44525748f, 0.029799191f, -0.2621451f, -0.56884259f, + 0.64671129f, -0.27178389f, -0.51463956f, 0.28904626f, + 1.5113779f, 0.13886885f, -1.4414893f, 0.17332859f, + -0.17761424f, -0.085643798f, 0.056139987f, -1.0974345f, + -0.054855604f, 0.29330927f, -0.14068194f, -1.5702951f, + 0.00057363353f, 0.079691865f, -4.2810874f, -0.33809033f, + 0.052635644f, 0.076086573f, 0.73887706f, 0.52932554f, + 0.036033332f, -0.20029724f, 0.17430703f, 1.0740287f, + 0.15648979f, -0.1409443f, -0.9479326f, -0.0062185852f, + 0.15660591f, 0.054413535f, -0.027569637f, 0.37370232f, + 0.012752239f, 0.57730073f, -0.037914112f, 0.073604278f, + 0.088794321f, 2.2648447f, 0.77239406f, -0.68005168f, + -0.21113147f, 0.17363045f, 0.020430481f, 0.14632067f, + -0.91990858f, 0.099092759f, 0.14768222f, 0.10011891f, + -0.25770861f, -0.0098489011f, 0.026587429f, 0.34659749f, + -0.04563465f, -0.24321836f, 0.17236428f, 0.11857426f, + -0.39704901f, 0.41886264f, -0.019218091f, 0.20277493f, + 0.08668036f, 0.068935223f, 0.86377406f, 0.33223581f, + 1.1873053f, 0.1505603f, -2.0249496f, 0.056520443f, + -0.31892908f, 0.09013845f, -0.066661939f, 0.83540088f, + -0.0049442709f, -0.39675459f, 0.1331497f, -0.22881502f, + 0.565359f, -0.08937569f, 0.021206703f, 0.10242867f, + 0.096900828f, 0.079478696f, 0.1662581f, 0.04834199f, + 0.077202f, -0.0024181777f, 0.11456937f, -0.024879549f, + 0.33516896f, -0.23594418f, -0.038808659f, -0.0098361755f, + 0.013574417f, 0.022737922f, 0.13520758f, 0.0058405106f, + -1.0272464f, 0.050504487f, 0.10118476f, 0.23878238f, + 0.62500399f, -0.10071141f, 0.021088203f, 0.054331578f, + -0.0027157278f, -0.084523655f, 0.013982346f, 0.2258096f, + 0.46550885f, 0.029417163f, 0.016334604f, -0.045733467f, + 0.031860348f, -0.17891492f, -0.51783252f, 0.19037519f, + 0.052410595f, 0.019696617f, 0.022410238f, 0.33016211f, + -0.2787002f, 0.031769607f, 0.88068467f, -0.52403808f, + 0.6141032f, -0.15224414f, -1.1768285f, 0.13220243f, + 1.1082147f, -0.16517019f, -1.3474224f, 0.12220722f, + -0.34773225f, -0.025856314f, -0.0039889873f, -1.4049394f, + -0.049471546f, 0.23084871f, 0.440146f, -1.6899117f, + -0.10943142f, 0.028009465f, 0.30496311f, -0.18884283f, + 0.03797799f, 0.06254302f, 0.40082458f, -0.4556503f, + 0.029412802f, -0.32209817f, 0.20273431f, -1.6716214f, + 0.18295376f, -0.15793745f, -1.8922985f, 0.051103719f, + -0.031850569f, 0.097618781f, 0.067031592f, 0.46867007f, + 0.0067098308f, 0.25662878f, -0.044824667f, 0.093158394f, + 0.099985428f, 2.2495668f, 0.49914581f, -0.029400667f, + 0.17315567f, 0.10992632f, 0.98286492f, 0.27163088f, + -0.83470118f, 0.0671793f, 0.25979072f, 0.1879614f, + -0.52482945f, 0.0003547215f, 0.082746379f, 0.46095657f, + 0.20743705f, -0.31689435f, 0.2169653f, 0.16920903f, + 0.18824558f, -0.19154595f, 0.071491465f, 0.27084419f, + 0.079385124f, 0.066430017f, 1.3569531f, 0.46874091f, + 1.5342053f, 0.12570302f, -1.9608129f, 0.089574046f, + -0.54746157f, 0.042283941f, 0.0042115981f, 0.93987161f, + 0.062085174f, 0.073928803f, 0.11806765f, -0.88716406f, + 0.32746351f, 0.24181037f, 0.04019665f, 0.058593031f, + 0.092992336f, 0.10768124f, 0.16042095f, 0.064120561f, + 0.082168281f, 0.028813371f, -0.19245824f, -0.078082547f, + 0.32426792f, 0.014062848f, 0.23003837f, 0.57447296f, + 0.0037383973f, 0.050404623f, 0.042749748f, 0.031123392f, + -1.2353892f, 0.058790982f, 0.1098417f, 0.31405237f, + 0.9737342f, -0.62542254f, 0.056296442f, 0.039576415f, + -0.19703484f, -0.26394814f, 0.05335898f, 0.2300553f, + 0.46118593f, 0.035772447f, -0.021850053f, -0.16698389f, + 0.032024059f, 0.089512512f, 0.2353292f, 0.20432867f, + 0.090965025f, 0.021214383f, 0.02014282f, 1.5295132f, + -0.69035202f, 0.025680132f, 0.30686766f, -0.51170778f, + 0.67438984f, 0.15554927f, -0.29045704f, 0.62058872f, + 1.1281996f, 0.17530107f, -1.8130685f, 0.13860725f, + -0.81014043f, -0.032075625f, 0.039285839f, -0.9337638f, + -0.027995063f, 0.37783921f, 0.22765426f, -1.4229703f, + -0.10979463f, 0.02047934f, -1.4125388f, -0.32900551f, + 0.076662019f, 0.07804165f, 0.22199014f, 0.227235f, + 0.048795778f, -0.22267385f, 0.18462227f, 0.44268125f, + 0.1644233f, 0.0051639131f, -2.1848011f, 0.059661485f, + 0.058287695f, 0.086937353f, -0.13471416f, 0.045206979f, + 0.011813684f, 0.35677043f, -0.072701648f, 0.083778523f, + 0.10889238f, 1.8342923f, 0.4815194f, 0.55957663f, + 0.39151904f, -0.040128224f, 1.0778373f, 0.14237776f, + -0.41350877f, 0.10500795f, 0.27866945f, 0.19968159f, + -1.0547799f, 0.0071315151f, 0.059490141f, 0.36539409f, + 0.19935727f, -0.48286563f, 0.1057891f, 0.16804884f, + 0.084172271f, 0.058440197f, -0.061895709f, 0.37255764f, + 0.072799444f, 0.060928773f, 1.365409f, 0.46071097f, + 0.84051621f, 0.15496612f, -1.7622536f, 0.065175921f, + -0.65535635f, 0.021794779f, -0.013630877f, 0.53972924f, + 0.12373232f, -0.21035127f, 0.10379117f, -0.87162203f, + 0.67065066f, 0.14859582f, -0.001200007f, 0.065939657f, + 0.098730028f, 0.1312377f, 0.23750654f, 0.034910914f, + 0.11460325f, -0.027648881f, -0.10787468f, -0.042080123f, + 0.19693755f, 0.55515742f, -0.19959481f, 0.73495609f, + -0.015912734f, 0.026825046f, -0.1148618f, 0.042884305f, + -1.1569034f, 0.079687461f, 0.027897682f, 0.25668868f, + 1.3408775f, -0.71049404f, 0.051949892f, 0.023174308f, + -0.70996416f, -0.32854214f, 0.043499481f, 0.22368357f, + 0.4719604f, 0.060013503f, 0.034351666f, -0.12732515f, + 0.04020346f, -0.098685153f, 0.24218449f, 0.20196638f, + 0.079033516f, 0.033792805f, 0.025726309f, 2.2314658f, + -0.57991326f, 0.047383752f, -0.15995538f, -0.5795365f, + 0.66738719f, 0.11343298f, -0.1152589f, 0.85957175f, + 0.36214852f, 0.79415399f, -1.6427468f, 0.18720885f, + -1.1817336f, -0.061423551f, 0.031088861f, -0.8241111f, + -0.020140467f, 0.20963012f, 0.40180779f, -1.4443885f, + -0.068389557f, 0.017865911f, -0.28631169f, -0.19904567f, + 0.065120772f, 0.068363652f, 0.39710367f, 0.24844246f, + 0.030127902f, -0.13511921f, 0.11648032f, 0.72720373f, + 0.14502282f, -0.27252364f, -2.7636681f, 0.017062787f, + -0.2491928f, 0.11629575f, -0.26695257f, -0.53579247f, + 0.025433686f, -0.27515349f, -0.064043693f, 0.085426368f, + 0.098865822f, 1.1414602f, 0.39782393f, 0.84029174f, + 0.13717939f, 0.075966619f, 1.1192235f, 0.66273749f, + -1.0329998f, 0.046579193f, 0.25482395f, 0.17342605f, + -0.20708829f, 0.0085199289f, 0.037769679f, 0.3498047f, + -0.0082666539f, -0.54709041f, 0.39690205f, 0.16838586f, + 0.3167277f, 0.077134743f, -0.050325159f, 0.23733941f, + 0.096028239f, 0.091319844f, 1.76186f, 0.36792853f, + 0.81118435f, 0.14760007f, -1.2081411f, 0.11697178f, + -0.70787942f, 0.069697291f, -0.066513188f, 0.46158895f, + 0.15182492f, -0.12467448f, 0.18900174f, -1.0998802f, + 0.46750939f, 0.23401538f, -0.042518407f, 0.12466481f, + 0.06458804f, 0.11955114f, 0.02292002f, 0.042790335f, + 0.099515319f, 0.025095427f, -0.96780539f, 0.094513923f, + -0.070821479f, 0.80427545f, -0.27120128f, 0.77788597f, + -0.015139746f, 0.041694727f, -0.46963692f, 0.039141756f, + -1.1314837f, 0.050432071f, 0.024316797f, 0.25282648f, + 0.89664519f, -0.79105753f, 0.038420759f, 0.051241904f, + -0.49372178f, -0.087853849f, -5.2453903e-05f, 0.22239484f, + 0.31893095f, 0.042546034f, 0.027549f, -0.072637677f, + 0.033919595f, 0.1528023f, -0.029229388f, 0.22160146f, + 0.055577934f, 0.035258919f, 0.025701053f, 2.1649368f, + -0.68845153f, 0.034994356f, -0.11174045f, -0.55947781f, + 0.63689733f, -0.20490432f, 0.49400148f, 1.1807706f, + -0.79956818f, -0.080225646f, -1.5385455f, 0.15686123f, + -1.3345919f, -0.053233981f, 0.043032296f, -0.65830845f, + -0.021936016f, 0.043336462f, 0.85370833f, -1.4443257f, + -0.026020162f, 0.046018679f, -0.45415521f, 0.032862015f, + 0.081280611f, 0.081196092f, 0.53049278f, 0.2909168f, + 0.044149335f, -0.18555354f, 0.16957001f, 2.1205597f, + 0.18088484f, -0.26042613f, -2.8335736f, -0.065144196f, + -0.58404857f, 0.080931105f, -0.41163379f, -1.3975599f, + -0.076688334f, -1.6511763f, -0.052674275f, 0.079899326f, + 0.076949321f, 0.48373613f, 0.10417174f, 0.83345628f, + 0.33332774f, 0.10326711f, 0.22324462f, 0.28950956f, + -1.8990201f, 0.07121855f, 0.18715173f, 0.17549039f, + 0.087949567f, -0.0052373135f, 0.041794538f, 0.26719633f, + 0.079899892f, -0.48744574f, 0.54038638f, 0.18258674f, + 0.3205688f, -0.047770221f, 0.082109183f, 0.096586131f, + 0.071489722f, 0.086656414f, 1.7500762f, 0.26162571f, + 0.85218853f, 0.14350624f, -0.67585111f, 0.056289703f, + -0.33576781f, 0.10119226f, -0.084142633f, 0.4387517f, + 0.1190308f, -0.084640123f, 0.084568866f, -0.9419108f, + 0.84437329f, 0.16324455f, -0.015915051f, 0.14656124f, + 0.11668284f, 0.11093318f, -0.26696292f, 0.0087256758f, + 0.096819721f, -0.020341994f, 0.71267635f, -0.0081463736f, + -0.02318681f, 1.0798795f, 0.076846413f, 0.67625022f, + -0.020430185f, 0.0092637092f, -0.50063103f, 0.029045742f, + -1.5453413f, 0.053256799f, 0.034296043f, 0.29609996f, + 0.29947037f, -0.27438915f, 0.030868435f, 0.055116516f, + -0.46725497f, -0.020229289f, 0.0048492453f, 0.23208784f, + 0.42025289f, 0.044961985f, -0.046032526f, -0.028369574f, + 0.017833939f, 0.058353458f, -1.7282394f, 0.18802439f, + 0.06020695f, 0.0074178167f, 0.038701348f, 1.6786994f, + -0.50592011f, 0.035019062f, -0.40675101f, -0.60034066f, + 0.62145424f, -0.036027651f, 0.62404966f, 1.3647931f, + -0.80843186f, -1.014325f, -1.4209627f, 0.14778802f, + -1.2368408f, -0.070039615f, -0.011408811f, -0.60974789f, + -0.025406873f, 0.012678586f, 1.1504592f, -1.5838392f, + -0.12063753f, 0.042346872f, 0.35899898f, -0.098773234f, + 0.054448053f, 0.073474154f, 0.69416201f, 0.28124541f, + 0.023374498f, -0.091153584f, 0.18148507f, 0.84723282f, + 0.20903724f, -0.44103763f, -2.6555345f, -0.082934305f, + -0.40399528f, 0.10941529f, -0.17079188f, -2.55317f, + 0.0062116799f, -3.602809f, -0.019366458f, 0.068610512f, + 0.10001989f, -0.16958185f, -0.14605691f, 0.97596431f, + 0.23942053f, -0.067585684f, -0.25389802f, 0.59423059f, + -1.3393031f, 0.056221679f, 0.22910076f, 0.18549499f, + 0.17323163f, 0.00098236732f, 0.028713515f, 0.28922638f, + 0.0018889019f, -0.31760821f, 0.72256196f, 0.10897791f, + 0.10164507f, 0.27720365f, 0.062684938f, -0.037594173f, + 0.079738177f, 0.063601695f, 1.6427804f, 0.35662988f, + 1.1208758f, 0.15622832f, -0.19138436f, 0.07719864f, + -1.0410945f, 0.13667758f, 0.089796565f, 0.90407985f, + 0.0030935111f, 0.54831088f, 0.060183205f, -1.0635931f, + 0.18896112f, 0.20695302f, 0.0065675983f, 0.079099536f, + 0.11718091f, 0.1230615f, -0.90385377f, 0.051427916f, + 0.079612806f, 0.036478966f, -1.984645f, -0.040746313f, + -0.15852465f, 1.4006141f, -0.40319425f, 0.46550485f, + 0.0076494538f, 0.020196248f, -1.0402025f, 0.02829396f, + -1.1136709f, 0.017537093f, 0.020980725f, 0.20648015f, + 0.0431462f, -0.36090291f, 0.047341079f, 0.037517305f, + 0.43056297f, -0.33326045f, 0.010170108f, 0.25172001f, + 0.20175706f, 0.037543587f, 0.093801618f, -0.07690303f, + 0.035849545f, 0.13861327f, -1.9446781f, 0.2151549f, + 0.035983596f, -0.0078769326f, 0.020695336f, 1.4595639f, + -0.44293246f, 0.028322937f, -0.17532885f, -0.55883068f, + 0.67142254f, 0.0038812631f, 0.57189661f, 1.6270183f, + -1.2836001f, 0.21445137f, -1.7362931f, 0.15463406f, + -1.1523694f, -0.049928702f, -0.0013046896f, -0.33394477f, + -0.031942975f, 0.067454271f, 0.77835542f, -1.4514451f, + -0.13404518f, 0.041730486f, 0.072884724f, 0.43207753f, + 0.064458638f, 0.074959256f, 0.86221731f, 0.60915625f, + 0.053648543f, -0.059113905f, 0.20158832f, -0.61971712f, + 0.27358058f, 0.73944175f, -2.0294137f, -0.053255275f, + -0.23935425f, 0.11615792f, -0.18999504f, -3.4120576f, + 0.0060481145f, -4.8350148f, 0.0041441359f, 0.089214697f, + 0.11570101f, -0.5251379f, 0.14434199f, 0.46264228f, + 0.43310353f, 0.056395579f, -0.59794432f, 0.74696875f, + -1.1702498f, 0.077280261f, 0.27667564f, 0.22247694f, + -0.91946793f, 0.034946352f, 0.079721168f, 0.33964121f, + 0.0035779667f, 0.16358486f, 0.32240942f, 0.14954488f, + 0.72197884f, 0.14389443f, -0.039272409f, 0.051962249f, + 0.098838821f, 0.076996766f, 1.8394411f, 0.16099447f, + 1.4231746f, 0.16074865f, 0.42248887f, 0.05883399f, + -1.2577014f, 0.27862024f, 0.033185918f, 0.86554933f, + -0.06755016f, 0.24441029f, -0.13832803f, -1.3921021f, + -0.1931784f, 0.29483327f, -0.011431335f, 0.028792616f, + 0.074115328f, 0.12127884f, -0.51182634f, 0.024455259f, + 0.073921613f, -0.056702327f, -7.2780685f, -0.008802725f, + 0.11539564f, 1.7846638f, -0.21296968f, 0.66261452f, + 0.024348252f, 0.086920269f, -1.2841717f, 0.015886107f, + -0.91783041f, 0.059432629f, 0.060127579f, 0.28232896f, + 0.098792888f, -0.81087565f, 0.028599897f, 0.064298213f, + 1.5197482f, 0.11648498f, 0.011703567f, 0.25402778f, + 0.30393216f, 0.044254381f, 0.11254077f, -0.17778951f, + 0.032858025f, 0.62392128f, -2.3051395f, 0.19647411f, + 0.067417108f, -0.0052936799f, 0.0027484065f, 0.72850889f, + -0.47546321f, 0.035765473f, -0.62932122f, -0.47063106f, + 0.68107551f, -0.018198332f, 0.98803061f, 1.6190441f, + -2.2255538f, 1.1173167f, -1.4058315f, 0.17672192f, + -0.88642395f, -0.013583262f, 0.022363244f, 0.045972731f, + -0.015228256f, 0.12257977f, -0.57330078f, -1.4055119f, + -0.048964929f, 0.040199827f, 0.14846992f, 0.88446522f, + 0.060119327f, 0.073003061f, 0.90444189f, 1.0072335f, + 0.030112278f, -0.021074515f, 0.10823743f, -0.57893056f, + 0.069279484f, -0.075067006f, -0.74251872f, 0.04505913f, + -0.066392526f, 0.10074588f, -0.035930827f, -3.5157442f, + -0.0015587003f, -3.57003f, -0.0086318562f, 0.083646424f, + 0.082816012f, -1.5447828f, -0.076147266f, -0.8800326f, + -0.036526117f, 0.054518159f, -1.3933879f, -0.25349593f, + 0.23372006f, -0.11798532f, 0.16411416f, -0.013868495f, + -0.11746684f, -0.033698454f, 0.044046536f, 0.17407244f, + 0.11692384f, 1.5402066f, 0.073786415f, 0.15473409f, + 0.29260388f, 0.73909551f, 0.072607495f, 0.078043304f, + 0.076897278f, 0.029299054f, 0.97422308f, 0.065796845f, + -0.3071779f, 0.13302542f, 0.74887538f, 0.066138834f, + 0.57435215f, 0.12483791f, -0.027275471f, 0.1710774f, + 0.47814927f, -0.45745766f, -0.13648508f, -0.40311211f, + 0.63663787f, 0.22676274f, 0.015615552f, 0.068408951f, + 0.071929485f, 0.11387f, -0.13667263f, 0.033110391f, + 0.095171653f, -0.1001607f, 1.5071299f, -0.044844076f, + -0.33688113f, 1.606021f, 0.011763762f, 0.6699692f, + -0.019766608f, -0.0012880238f, -1.7489966f, 0.071154132f, + 0.2734901f, 0.05711206f, 0.11916202f, 0.2186376f, + 0.33422157f, -0.28014833f, 0.039959509f, 0.062365185f, + -0.014902798f, -0.13068563f, 0.0086166998f, 0.22383167f, + 0.20957448f, 0.058279887f, -0.021908231f, -0.035739597f, + 0.013575193f, -0.0083897309f, 0.22077997f, 0.24958362f, + -0.00021500114f, 0.10113616f, 0.024567863f, 0.33281213f, + -0.060417391f, 0.015383244f, -1.0853965f, -0.50866354f, + 0.56219137f, -0.33085558f, 0.86615604f, -0.021884378f, + -0.21097335f, 0.61920375f, -1.4008141f, 0.090267703f, + -0.16437329f, -0.13985404f, 0.0021394554f, -0.50758862f, + -0.031103389f, -0.14520638f, -0.11709584f, -2.071903f, + 0.020758834f, 0.052198816f, 0.20650342f, -0.49091765f, + 0.00043551423f, 0.11677705f, 0.50067079f, 0.022108465f, + 0.016385943f, -0.32061943f, 0.098525926f, 0.89453149f +}; + +static const float mlp_b1[128] = { + -0.16111128f, 0.10250536f, 0.51028728f, 0.0021623468f, 0.037042845f, + -0.051542539f, 0.069718428f, 0.10240296f, 0.023540633f, -0.080731586f, + -0.18903656f, -0.069564521f, -0.082521446f, 0.025295392f, -0.65664101f, + -0.54041362f, 0.071857706f, -0.25993964f, 0.59443343f, 0.035954826f, + -0.11363222f, -0.07908038f, -0.19817714f, 0.29864952f, -0.50741744f, + 0.028503237f, -0.031036697f, -0.22135735f, 0.57789642f, 0.46257964f, + 0.25730756f, -0.11912934f, 0.34946743f, 0.090219766f, -0.033422887f, + -1.1843697f, -0.085759476f, -0.05385128f, 0.2465288f, 0.8778789f, + 0.072706178f, -0.15300959f, 0.32977429f, -0.055792321f, 0.27573577f, + -0.088869512f, -0.11496663f, 0.68819684f, 0.31035128f, 0.2968373f, + 0.46179184f, -0.45023581f, 0.19457819f, -0.2227862f, 1.192196f, + 1.2163506f, -0.087483659f, -0.098151304f, 0.16296299f, -0.035473634f, + -0.090438358f, -0.021255966f, -0.67399126f, -0.12404969f, 0.48519766f, + -0.093622871f, -0.053356271f, 0.57803899f, -0.65111142f, -0.011401757f, + 0.27113074f, -0.03274494f, 0.82683849f, -0.039741054f, 1.1766831f, + -0.61322892f, 0.5462352f, 0.90684831f, -0.024894016f, -0.041972514f, + 0.3914406f, 0.83881003f, -0.0054246983f, -0.24275512f, 0.091202311f, + -0.029081127f, 0.045040928f, 1.3358785f, -0.021295149f, 0.18199106f, + -0.68874943f, -0.20840541f, -0.050097976f, -0.015232689f, -0.013783711f, + 0.025376039f, 0.58801031f, -0.027911136f, 0.36436859f, -0.79848361f, + 0.46468902f, 0.24483995f, -0.62223643f, 0.22801708f, -0.36729863f, + -0.55639273f, 1.1643656f, -0.10966159f, -0.1247081f, -1.2663506f, + 0.0066675744f, -0.11488041f, -0.64264494f, -0.68306226f, 0.40782043f, + -0.043610189f, 0.056509286f, -0.028751373f, 0.93577182f, -0.034331601f, + -1.2236813f, -0.045102943f, 0.76737839f, 0.25180763f, -0.01751757f, + -0.32945657f, 1.059623f, -1.140229f +}; + +static const float mlp_w2[8192] = { + -0.13401985f, -0.10805245f, -0.13512564f, 0.043239117f, + -0.025824245f, 0.96531415f, 0.014632984f, -0.08767809f, + 0.30497059f, -0.14517748f, -0.069997646f, -0.0059253578f, + 0.54946405f, -0.070085593f, -0.64926779f, 0.13913424f, + -0.052980095f, 0.94457173f, -0.7174058f, -0.25168502f, + -0.062107582f, -1.6484116f, -1.8625046f, -0.29657269f, + -0.59743732f, 0.026666554f, -0.082523599f, 0.60817879f, + -0.69448006f, -0.013764022f, 0.14189444f, -0.32889092f, + -0.3822414f, 0.26400882f, -0.35984135f, 0.2322439f, + -0.053365417f, 0.049272392f, 0.35202861f, -1.4901416f, + 0.0074732373f, 0.0023721904f, 0.040245261f, 0.50999433f, + 0.0073596705f, -0.20686789f, -0.010369761f, -0.22294603f, + 0.45161831f, 0.13474202f, -0.15934893f, -0.11582299f, + -0.00020334523f, -0.1440206f, -0.085882828f, 0.036365386f, + 0.095990807f, -1.4676877f, 0.032364555f, -0.073447272f, + 0.11814238f, 0.046512179f, 0.003183861f, -0.020252176f, + 0.2804051f, 0.23501393f, 0.13783318f, -0.028164238f, + 0.036092911f, 0.085397355f, -0.085984588f, 0.27227446f, + 0.14911512f, -0.49690911f, -0.0018769737f, 0.0049273376f, + 0.47649685f, -0.12679908f, 0.20489213f, -0.0062682643f, + -0.0086877318f, -0.25064102f, 0.037190873f, -0.23278305f, + 0.061249051f, -0.077029429f, 0.1952177f, -0.093355834f, + 0.068545781f, 0.061188821f, -0.3774516f, -0.28733176f, + 0.054695647f, 0.033560209f, 0.19302927f, -0.10300241f, + -0.16360536f, 0.17729785f, -0.3280811f, -0.47166118f, + -0.051197674f, -0.10301183f, 0.22625831f, 0.03659125f, + -0.042670343f, -0.066971168f, -0.0077740913f, 0.10296816f, + 0.073192507f, 0.23933312f, -0.067933016f, 0.20780715f, + 0.31720167f, -0.014942673f, 0.060954519f, -0.086186185f, + 0.18479522f, 0.20190905f, -0.064508714f, 0.10597448f, + 0.080660887f, -0.013490031f, -0.023941277f, -0.037375733f, + 0.16331856f, -0.04298329f, -0.02337233f, 0.0027651312f, + 0.042508047f, 0.31116992f, -0.016540663f, 0.027428802f, + -0.10341623f, 0.20886445f, -0.046912331f, -0.83867818f, + -0.091055833f, -0.74006921f, -0.073965132f, -0.096054293f, + -0.44881836f, -0.018704358f, -0.13774769f, 0.20779948f, + 0.037330691f, -0.14347968f, 0.06019723f, -0.032107405f, + 0.14190409f, 0.23414429f, 0.11500391f, 0.14517407f, + 0.24576916f, -0.11154523f, -0.38892314f, 0.22124277f, + -0.1209477f, -0.0056074033f, -0.12200976f, 0.30347395f, + 0.070215821f, -0.046120606f, -1.1316086f, -0.10020047f, + 0.011745617f, -0.073522463f, 0.014694138f, -0.19329552f, + -0.033123124f, -0.0063701039f, -0.097590156f, 0.20519437f, + 0.05148254f, 0.22909611f, 0.0064275153f, 0.32846227f, + -0.28885818f, 0.036110163f, -0.015588131f, -0.034113742f, + 0.27645531f, 0.12832145f, -0.033292353f, 0.32622075f, + -0.038198974f, 0.14295615f, 0.042273201f, -0.074486949f, + -0.013197044f, 0.043494053f, 0.072429709f, 0.040032964f, + 0.026065215f, 0.039622307f, 0.090516053f, 0.070926316f, + -0.08794722f, 0.029430732f, -0.070605114f, -0.012566934f, + 0.071486428f, -0.061942689f, 0.060579833f, -0.048652004f, + -0.079783462f, 0.050308291f, -0.062955491f, -0.043444712f, + -0.048692834f, 0.0013004541f, -0.064378403f, -0.0073739588f, + 0.0029721076f, -0.07878042f, -0.07289055f, 0.03012413f, + -0.02748693f, -0.0089545613f, 0.04153939f, -0.04391196f, + 0.042088769f, -0.027696045f, -0.059247762f, 0.056999154f, + -0.0096948603f, 0.030945642f, -0.05465655f, -0.070052713f, + 0.031945519f, -0.028792523f, 0.0097124446f, 0.025932737f, + 0.047516558f, -0.02543813f, -0.016363326f, -0.051849585f, + -0.05821586f, 0.079176016f, -0.049968526f, 0.034890112f, + 0.030262111f, 0.070722051f, 0.0032276625f, 0.042170841f, + -0.037387412f, 0.01572112f, -0.06630946f, 0.0025943145f, + -0.08988931f, -0.049637083f, -0.040986523f, 0.011642024f, + -0.014718345f, 0.07045839f, 0.052411735f, 0.044937555f, + 0.04897289f, -0.036069084f, 0.47997218f, -0.032572731f, + 0.022844357f, 0.04444322f, -0.098056979f, 0.5605486f, + -0.074956477f, -0.28703558f, -0.089604706f, -0.026894709f, + 0.093831494f, -0.087541141f, -0.10173196f, 0.05395899f, + -0.035212249f, -0.31132752f, 0.37665609f, -0.063066341f, + 0.056185167f, -0.036748551f, -0.21597701f, 0.25426203f, + 0.16287929f, -0.035911571f, 0.0042173592f, 0.02122931f, + -0.034590889f, 0.11277586f, -0.16206235f, -0.026160244f, + 0.2490596f, 0.056145001f, 0.2147592f, 0.44400153f, + -0.13859846f, -0.039005715f, -0.020939792f, -0.064570583f, + -0.044142559f, -0.041625846f, 0.037830174f, 0.01023829f, + -0.099699378f, -0.11402012f, 0.077271305f, 0.23349634f, + 0.049881734f, 0.015643008f, -0.025369842f, -0.044654984f, + 0.076776631f, -0.089056499f, -0.0054639461f, -0.11086166f, + -0.051380955f, -0.14139755f, -0.073783442f, -0.08957281f, + -0.15432385f, -0.036813945f, 0.028830145f, -0.018060584f, + -0.044561114f, 0.16861007f, -0.3900443f, -0.009718067f, + 0.01357356f, -2.7952797f, -0.040425617f, -0.2921668f, + -0.43990418f, -0.19903767f, -0.034896147f, -0.062049337f, + 0.16982986f, -0.041643444f, -0.013867288f, -0.17723161f, + -0.10576329f, -0.9545781f, 0.12281357f, 0.33033952f, + 0.12685452f, -0.77117735f, -1.4042262f, -0.13960087f, + -1.2143337f, -0.10005385f, 0.49916494f, -0.11204961f, + 0.60058945f, -0.010454747f, 0.4263719f, -0.33819497f, + -1.5804952f, -0.14090271f, 0.39896452f, -0.32866994f, + 0.041793082f, -0.0045935381f, -0.26165545f, 0.19080737f, + -0.07487341f, -0.12196373f, 0.0058339587f, 0.065310225f, + 0.044157304f, -0.191999f, 0.029341569f, 0.30192205f, + -0.97839707f, -0.065522864f, -0.62970608f, -0.049120303f, + 0.048853107f, -1.398774f, 0.055223968f, 0.14225635f, + -0.0290088f, -1.6384779f, -0.050691575f, 0.016026506f, + 0.17193745f, -0.041766815f, -0.059543435f, 0.00059266685f, + -0.044911932f, 0.053184431f, 0.23758133f, 0.3705914f, + -0.10780592f, 0.0023042574f, -0.1331536f, 0.19558229f, + 0.37066185f, -0.059776895f, -0.033462107f, -0.052998275f, + 0.16468149f, 0.014577924f, -0.0014430007f, -0.34871882f, + -0.082212202f, -0.13261148f, 0.1104388f, -0.071681418f, + 0.24335852f, 0.08392074f, 0.029868191f, 0.084517486f, + -0.12608501f, 0.047268063f, -0.053096514f, -0.33680424f, + 0.1062787f, -0.28151476f, -0.057272669f, 0.039296165f, + -0.012607701f, 0.1296996f, 0.014447571f, -0.24642444f, + -0.037482478f, -0.042244237f, 0.13395497f, -0.075826235f, + -0.0058623841f, 0.042602018f, -0.067595847f, 0.28557917f, + -0.042805582f, 0.048600662f, 0.021238718f, -0.065436415f, + 0.1342368f, -0.11628903f, 0.00085405313f, -0.08850234f, + -0.057147581f, -0.11018581f, -0.057835128f, 0.08077997f, + -0.20510046f, 0.054512206f, -0.015106796f, -0.15676808f, + 0.15750644f, -0.082579441f, -0.053989515f, -0.057055824f, + 0.1080884f, -0.6197167f, 0.32578689f, 0.068865374f, + -0.085464612f, -0.22132766f, -0.12045518f, 0.18378887f, + -0.09163326f, 0.21402515f, 0.020434769f, -0.10294785f, + -0.24025552f, -0.077885225f, -0.1464396f, 0.13246727f, + -0.013072145f, -0.43397683f, -0.18672891f, 0.025806755f, + 0.51870501f, -0.13989627f, -0.044765741f, -0.24105348f, + -0.1278996f, -0.014004378f, -0.33469665f, -0.15141857f, + -0.17208345f, 0.013301768f, -0.41736034f, 0.56266791f, + 0.16689153f, 0.10669791f, 0.57326454f, 0.62044418f, + -0.10670628f, -0.0071238182f, 0.47537774f, -0.19770309f, + -0.095179662f, -0.01166893f, -0.0098315077f, 0.28432891f, + 0.039315093f, 0.036081508f, -0.054818928f, -0.12622564f, + 0.67318231f, 0.04149542f, -0.20728368f, -0.041308671f, + 0.0071690571f, -0.0072380183f, -0.027608352f, 0.44179702f, + 0.11241522f, 0.045070242f, 0.031494245f, -0.066894174f, + -0.26211035f, -0.051847167f, -0.057886358f, -0.03382441f, + -0.055376988f, -0.28695938f, -0.28448984f, -0.0039272946f, + 0.02264907f, 0.33716062f, -0.11362648f, -0.28075767f, + 0.26084098f, 0.33949679f, 0.020794775f, -0.090067036f, + -0.0025816325f, 0.012315018f, 0.85678393f, -0.0219374f, + -0.13246363f, -0.057894405f, -0.67359412f, 0.078784242f, + -0.15227343f, 0.31357551f, -0.5650472f, -0.11435278f, + 0.60706228f, -0.053444177f, 0.022561684f, 0.17853002f, + 0.04805015f, 0.0092038177f, -0.16009848f, 0.17982677f, + -0.23600428f, 0.095200777f, -0.24111272f, -0.54605609f, + 0.01120175f, -0.041584481f, -0.096676119f, -0.23468381f, + 0.0041545434f, -0.069441035f, 0.086445473f, -0.18596335f, + -0.027977677f, -0.028343793f, 0.032837138f, 0.14126694f, + -0.22354093f, -0.057706479f, -1.3200235f, -0.07257434f, + -0.0061904341f, -0.59654027f, -0.018421551f, 0.98428899f, + -0.057380483f, 0.24721983f, 0.038483165f, 0.039577786f, + 0.09512037f, -0.12831023f, -0.045181438f, -0.0011999535f, + 0.038267981f, 0.34224197f, 0.0046632318f, -0.02027596f, + -0.0033698259f, 0.22576961f, -0.16358368f, 0.099755526f, + -0.3503052f, 0.074399374f, 0.047230735f, -0.03439584f, + 0.54164577f, -0.063917778f, 0.30064264f, -0.036106892f, + -0.11102282f, 0.36070168f, 0.17559215f, 0.16268176f, + -0.44992119f, 0.31240308f, 0.071917459f, 0.085562073f, + 0.1792701f, -0.013643932f, 0.59999734f, -0.077360608f, + 0.088833198f, 0.016358403f, 0.20204356f, -0.28313863f, + -0.2151722f, 0.30850804f, -0.13494992f, -0.25652131f, + 0.012183779f, -0.006616279f, -0.031792995f, 0.1116793f, + -0.0090221781f, -0.10425053f, 0.11722241f, 0.089583024f, + -0.026455335f, 0.0011822587f, 0.035867848f, 0.048599984f, + -0.036230654f, -0.01280252f, 0.20204103f, -0.005160158f, + -0.025051713f, 0.025804538f, 0.016160538f, -0.33032721f, + 0.035833679f, -0.047648191f, -0.096733205f, -0.087649047f, + 0.10199925f, 0.063293211f, -0.12666938f, 0.023488151f, + 0.38308054f, -1.3575975f, 0.35719746f, -0.59385806f, + 0.020553874f, -0.29543996f, -0.090089999f, 0.088016175f, + -0.10062858f, -0.86403698f, -0.0411986f, 0.022698509f, + -0.24137449f, 0.040885326f, -0.33865529f, -1.4112402f, + 0.018639384f, 0.73850298f, -0.2926656f, -0.25733334f, + 0.74492121f, 0.0751068f, 0.14509235f, -0.42982647f, + 0.29968706f, -0.082797103f, -0.68080306f, -0.324734f, + -0.32077163f, -0.88456517f, -0.2032146f, -0.53308386f, + -0.33951181f, -0.23635738f, -0.36030903f, -0.15319166f, + -0.026453039f, 0.038140837f, 0.84404123f, -0.047361389f, + -0.067316428f, 0.017878046f, -0.26342446f, -0.20990837f, + -0.069541007f, -0.55248761f, 0.52507198f, 0.24171257f, + 0.73878109f, -0.04543094f, 0.14073248f, -0.040027354f, + 0.97378123f, 0.071844295f, -0.083562471f, 0.53274077f, + -0.70704532f, 0.11890067f, -0.066476554f, -0.075242892f, + 0.3798857f, -0.056508828f, -0.044769555f, 0.77073425f, + 0.057821054f, -0.47864154f, 0.1641978f, -0.092481248f, + -0.039101236f, -2.2027438f, -0.020210661f, 0.17281172f, + -0.061925791f, 0.13034903f, 0.075757399f, -0.083650917f, + 0.81372839f, -0.012301452f, -2.0604975f, 0.25388816f, + -0.028407419f, 0.20204012f, -1.4825592f, -3.3024139f, + -0.11139901f, -2.1387224f, -2.365804f, -0.4002499f, + -1.0415599f, -0.037784528f, 0.17830884f, 1.9386389f, + 0.35606378f, -0.014777489f, 0.31129408f, -0.80503482f, + 0.12436294f, -0.029744748f, 0.37147701f, 1.1419126f, + 0.072218783f, -0.063083231f, 0.76367664f, -0.68893552f, + -0.083985411f, -0.00042353029f, -0.24368221f, 0.54629594f, + -0.012827914f, -0.19250919f, -0.048216179f, -0.62233162f, + 0.29595378f, 0.047201909f, 0.43234473f, -0.01995378f, + 0.12423762f, -0.12416923f, -0.072374657f, 0.30291489f, + 0.043155462f, -1.1234294f, 0.01625723f, 0.017954499f, + 0.17416994f, -0.0095734261f, 0.022241892f, -0.081635252f, + 0.1182292f, -0.58448541f, 0.79492462f, 0.091566622f, + -0.046201456f, -0.79678535f, -0.052045487f, 1.0420889f, + -0.099364311f, 0.078662351f, -0.050668862f, 0.058193348f, + 0.9199819f, 0.036702123f, 0.52470714f, 0.0089130141f, + 0.011856661f, 0.88499671f, 0.80991018f, -0.039445911f, + 0.14830826f, -1.6666342f, -0.26276472f, 0.63975412f, + -1.2841097f, -0.010086558f, 0.6176036f, 0.016941702f, + 0.9822185f, 0.0026880363f, -0.0048082061f, 0.3905504f, + -2.0647151f, -0.20323145f, -0.92672408f, 0.12679687f, + 0.01267737f, 0.071742401f, -0.17071128f, -3.831543f, + 0.041143108f, -0.015205399f, -0.092675097f, -0.076330632f, + -0.062871829f, -1.2803873f, 0.034087751f, 0.17934221f, + -0.16467471f, -0.13434514f, -2.8548043f, 0.055419266f, + 0.013344008f, 0.43733534f, 0.039515667f, -0.20074944f, + 0.063849106f, -0.78406239f, -0.014131585f, -0.13628089f, + 0.061791826f, 0.038893245f, -0.0041605006f, 0.033403594f, + -0.018001048f, -0.16822344f, -0.2308525f, -0.029671982f, + 0.039239764f, 0.012292331f, 0.037617289f, -0.18252376f, + 0.026723171f, 0.1334454f, -0.0098484466f, -0.0087077292f, + -0.18634917f, -0.13737115f, 0.11836181f, -0.1891361f, + -0.0034575942f, -0.05512685f, -0.048831977f, -0.0010306602f, + -0.016359216f, -0.00074798934f, 0.18637581f, -0.037825409f, + 0.069235899f, 0.036113001f, -0.028086921f, 0.47798592f, + 0.39966843f, -0.022491867f, -2.4679911f, -0.023340125f, + 0.082349725f, 0.11917235f, -0.54250187f, 0.12674579f, + -0.014621668f, 0.022861335f, 0.44460246f, 0.11050506f, + 0.022450417f, -0.064455576f, -0.19071414f, -0.056094475f, + 0.051470395f, 0.2183353f, 0.0054324055f, 0.10482426f, + 0.36717761f, -0.00017341008f, 0.012751061f, -0.10735667f, + -0.040752951f, 0.13955761f, -0.020594295f, -0.10332804f, + 0.044997443f, -0.011400466f, -0.00162344f, 0.033430494f, + -1.9299451f, 0.029133778f, -0.036019076f, -0.0082136709f, + -0.0090891123f, -0.23917231f, 0.010241524f, -0.0029902749f, + -0.052719701f, 0.080863684f, -0.042197276f, 0.0079476368f, + -0.15271498f, 0.062749617f, -0.083669037f, -0.029593689f, + -0.65110898f, -0.027628751f, -0.20663597f, 0.084146738f, + -0.017757172f, -0.35973507f, 0.0073205964f, -0.074096218f, + -0.10024372f, -0.22044058f, 0.18727802f, 0.13255785f, + -0.052243412f, -0.027532341f, -0.64120728f, -0.36474106f, + -0.11867851f, -0.010150689f, -0.01073939f, -0.23546724f, + -0.22889315f, 0.065112583f, 0.1027393f, 0.10059731f, + -0.032620002f, -0.071050309f, -0.39051518f, -0.058653113f, + -0.067746282f, -0.014560466f, -0.015884379f, -0.004895004f, + 0.031202234f, -0.24053861f, 0.0096954424f, -0.66216582f, + -0.20761739f, -0.085659623f, -0.36423475f, -0.10520729f, + -0.025572414f, -0.45422384f, -0.0057428335f, -0.39401957f, + 0.12463026f, -0.35678867f, -0.069545753f, -0.017902697f, + 0.078170002f, -0.037194841f, -0.1130495f, -0.023889843f, + 0.1211371f, -0.061940558f, 0.56672156f, 0.016048875f, + -0.059412777f, -0.19372508f, 0.029828507f, -0.18299861f, + -0.12303784f, -0.31962138f, -0.061436988f, -0.079536632f, + 0.87624699f, -0.036308531f, 0.0042324793f, -0.13447103f, + -0.09158618f, -0.039672319f, 0.003962629f, -0.010409613f, + 0.021200767f, -0.272861f, 0.056820326f, 0.83258986f, + 0.23994301f, 0.028100627f, -0.33048278f, -0.27977017f, + 0.63687146f, -0.01697354f, -0.37598795f, -0.38512933f, + -0.18163872f, -0.094827704f, 0.26581192f, 0.87887502f, + 0.012668826f, -0.058503438f, -0.3458418f, 0.14322634f, + -0.065196045f, -0.07143335f, 0.014248817f, 0.23432778f, + -0.013247493f, -0.27404881f, 0.010378007f, 0.11174286f, + 0.85829389f, -0.16335154f, 0.15025945f, -0.05212431f, + 0.01443467f, -0.065763734f, -0.094409652f, 0.027098455f, + -0.18050879f, -0.30006716f, -0.058935877f, -0.049268961f, + -0.25056458f, -0.039042018f, -0.061805729f, -0.041427903f, + 0.066447772f, 0.20941816f, 0.26660016f, 0.036419582f, + -0.023592928f, -0.3008213f, 0.012389707f, 0.16090818f, + 0.19346538f, 0.25894037f, -0.094827034f, -0.09482342f, + 0.59642416f, -0.011818046f, 0.045523223f, -0.046473633f, + -0.027294211f, 0.53881687f, -0.79183912f, -0.01060228f, + 0.08313974f, 0.1408976f, 0.14674827f, -0.33642924f, + 0.15665606f, -0.13140783f, -0.053529151f, -0.16098443f, + 0.1640013f, 0.035700105f, 0.24401778f, -0.33678928f, + -0.69378155f, 0.11163264f, -0.67397988f, 0.15755984f, + -0.10819884f, -0.026383806f, -0.024173709f, -0.31835768f, + 0.0059742057f, -0.077152997f, -0.0048763771f, -0.36860389f, + -0.11686967f, 0.21916771f, 0.0067634294f, -0.40740582f, + -0.58803904f, -0.085711285f, -0.14764459f, 0.0065729278f, + 0.068137646f, -0.027675049f, -0.048131626f, -0.82495427f, + 0.1334431f, -0.37163934f, 0.001517941f, -0.006413707f, + 0.18388158f, -0.12705331f, 0.060906071f, -0.0068869828f, + -0.14123456f, -0.22386426f, -1.0459791f, -0.010144141f, + -0.014337902f, -0.79163277f, 0.063370302f, 0.18921494f, + 0.770625f, -0.82303327f, 0.005460294f, -0.097517088f, + -0.11327209f, -0.063101314f, 0.094847322f, -0.096746519f, + -0.10517862f, -0.08866901f, 0.22569063f, 0.34868839f, + 0.036865041f, -0.21117273f, -0.12581043f, -0.12443006f, + 0.55406392f, 0.023516361f, 0.372181f, -0.64870548f, + -0.11798394f, 0.031043928f, -0.33954537f, 0.42529124f, + -0.26927912f, -0.12622111f, -0.058988951f, -0.40302813f, + -0.0018638775f, 0.0097557902f, 0.16304198f, -0.29557523f, + 0.050774284f, -0.043619972f, 0.25855014f, 0.018634183f, + -0.065168947f, -0.14629459f, 0.077762701f, 0.0061699916f, + -0.24706519f, -0.082564346f, 0.02524011f, -0.015600251f, + -0.10142104f, -0.60082448f, 0.05042325f, -0.59859461f, + -0.16546153f, -1.8594202f, 0.045519393f, -0.068593107f, + -0.10609724f, -0.027989106f, 0.047192387f, -0.01405347f, + -0.18031056f, 0.23952243f, 0.27292955f, 0.088008627f, + -0.0087493733f, 0.2736772f, -0.087384738f, -0.24880619f, + 0.094913319f, 0.23796234f, 0.0028674172f, -0.01560722f, + -0.22736472f, 0.017364748f, 0.13406485f, 0.083726794f, + -0.037865132f, 0.10827699f, 0.04231441f, 0.094758458f, + 0.076657057f, -0.10460818f, 0.027540391f, 0.34951043f, + 0.081002317f, 0.023337549f, -0.77289504f, -0.018204033f, + 0.036314599f, 0.070004441f, 0.25850534f, -0.047433168f, + 0.21892013f, -0.076034084f, 0.10900235f, -0.088668168f, + -0.084144898f, -0.011063386f, -0.24813998f, 0.22751506f, + -0.025649348f, -0.0045100399f, -0.040295649f, 0.08595521f, + -0.044646624f, -0.21160898f, -0.030395094f, 0.32509497f, + 0.043840803f, -0.098930538f, -0.036965542f, 0.0082104858f, + -0.017174065f, 0.26351047f, -0.015270406f, -0.09968403f, + -0.0070594209f, 0.22834498f, -0.072397113f, -0.10042344f, + 0.16353551f, -0.037626442f, 0.01879864f, 0.017500378f, + 0.097312786f, 0.11981425f, 0.014950155f, -0.088604584f, + -0.031779706f, 0.037365671f, -0.06963598f, -0.18910055f, + -0.072154075f, -0.20342417f, -0.063336298f, -0.055499103f, + 0.18524408f, 0.058945775f, -0.050158586f, -0.085982844f, + -0.057376817f, -0.090443134f, 0.0061488734f, -0.16157722f, + -0.093810588f, -0.085545629f, 0.05292071f, -0.12632629f, + -0.039145384f, -0.06710536f, 0.16975993f, -0.041195497f, + 0.15825638f, -0.0018697381f, -0.023298215f, 0.16734025f, + -0.31542292f, 0.42225119f, -0.0090394821f, -0.21362227f, + -0.090790242f, -0.051304761f, 0.22900759f, 0.021941438f, + -0.13717729f, -0.020595843f, 0.036464848f, 0.10820865f, + -0.11310274f, 0.046835292f, 0.060677603f, -0.0096173845f, + -0.04827999f, -0.089964882f, 0.0044376599f, 0.048322819f, + 0.2313659f, -0.11031456f, -0.010921306f, 0.24259348f, + -0.081958644f, -0.049465876f, -0.10813262f, -0.092508033f, + 0.044890214f, -0.11316615f, 0.0078417026f, -0.025112495f, + -0.27764958f, -0.12885699f, -0.35588405f, 0.069161698f, + -0.031364005f, 0.0097236894f, -0.097590134f, -0.0030793308f, + 0.19942462f, -0.53106117f, -0.061811894f, -0.074709751f, + -0.012536597f, 0.046764739f, -0.096164845f, -0.010120493f, + -0.084641442f, 0.30392683f, 0.12810211f, 0.035102915f, + 0.049734548f, -0.32879511f, -0.20257786f, -0.088209182f, + -0.12541991f, -0.042502083f, -0.15056521f, 0.047802843f, + 0.3629531f, -0.010475839f, -0.17022026f, -0.072410986f, + -0.4681609f, -0.24273853f, -0.25900733f, 0.41549918f, + -0.0519787f, -0.038079798f, 0.020586638f, 0.015469811f, + -0.076480001f, -0.011961633f, 0.020602306f, -0.54765582f, + -0.062698372f, -0.007884304f, -0.059398882f, -0.19393586f, + -0.53439319f, -0.060203914f, -0.24008247f, -0.066298291f, + -0.049637794f, -0.49733782f, 0.030921163f, 0.32900888f, + -0.11244617f, -0.31931528f, 0.060086135f, 0.025395514f, + 0.051970243f, -0.030717231f, -0.026525961f, 0.0073161991f, + -0.050732899f, 0.37501824f, 0.3450765f, 0.16707556f, + 0.024318064f, 0.87052375f, -0.095742539f, 0.77288318f, + -2.0129595f, 0.34790504f, -0.090246134f, -0.040796932f, + 0.18682793f, -0.030539852f, -0.33063012f, -0.033042286f, + 0.01146379f, -1.055577f, -0.4114064f, -0.77088606f, + 0.0041856626f, 0.72542739f, -0.62560159f, 0.62843508f, + 0.50540817f, 0.0021249049f, -0.45207715f, -0.34849742f, + -0.27356565f, 0.0046593221f, -0.088462643f, 0.41286305f, + 1.0336329f, -0.18315999f, 0.02650599f, -0.39628729f, + -0.047516305f, 0.02201442f, -0.18486561f, -0.53564721f, + -0.00037500047f, -0.0856397f, 0.099730134f, 0.27591401f, + 0.0077144769f, -0.041627686f, -0.0029362498f, -1.698624f, + 0.76388031f, -0.089099862f, -0.75645339f, 0.056741219f, + -0.19619945f, -1.9563035f, -0.051049218f, -0.66052967f, + 0.2542218f, -1.1374893f, -0.050498948f, 0.00046270454f, + 0.074753053f, -0.02187394f, 0.0044436804f, 0.023139209f, + 0.018040633f, 0.14364232f, -0.45669016f, 0.13985355f, + 0.039049998f, -0.11682403f, -0.15702951f, -0.94701242f, + 0.13972205f, 0.26489666f, 0.00094605074f, -0.059432536f, + -0.18643393f, -0.1181033f, 0.48095354f, 0.089990087f, + 0.039628796f, 0.21624365f, -0.91402698f, 0.53461933f, + 0.00015342412f, -0.0012892089f, -1.4692036f, -0.62446088f, + 0.66839653f, 0.047211409f, -0.50209075f, 0.038288597f, + -0.29308659f, -0.018994771f, 0.049735259f, -0.038012426f, + -0.038337793f, 0.11224461f, -0.0057385992f, -0.63963389f, + -0.10758719f, -0.067535102f, 0.06911613f, -0.27782544f, + -0.020913769f, -0.052980892f, 0.11306033f, -0.065774776f, + -0.082978353f, 0.59874946f, -0.0011462538f, 0.072683692f, + -0.70922118f, 0.068600662f, 0.25460765f, 0.076583736f, + -0.064074486f, 0.01638856f, 0.011335819f, 1.0585479f, + -0.042705514f, 0.095850915f, -0.021242192f, -0.12575117f, + 0.11828812f, 0.020742331f, -0.064091042f, 0.018421318f, + -0.17538841f, -1.9078364f, 0.2520119f, 0.00027347499f, + 0.012718368f, -0.66081476f, -0.12796997f, 0.57111591f, + -0.82994664f, -0.066040844f, -0.073071629f, -0.027112789f, + -0.55886161f, 0.023803866f, -1.693957f, -0.697806f, + -0.034372233f, -0.32947388f, -0.80548376f, 0.48262906f, + -0.37353081f, -0.47247484f, -0.8460322f, -0.69173259f, + -3.1932073f, -0.085047655f, 0.02732604f, -0.40407073f, + 0.19736128f, -0.16752049f, -0.24090128f, 0.93863511f, + -2.6407249f, 0.032790925f, 0.27105871f, -0.35602584f, + 0.020012338f, -0.025864154f, -0.991615f, 0.53651804f, + -0.047756564f, -0.080835514f, 0.19914849f, 1.7429861f, + -0.10926858f, -1.9036418f, 0.32613736f, 1.0361547f, + -0.83383274f, -0.12923366f, -1.2568371f, -0.11294309f, + -0.032274608f, -0.73315305f, -0.021972872f, -0.3195256f, + -0.28909087f, -1.6460792f, -0.054445248f, -0.041602705f, + -0.23415759f, -0.10159008f, -0.12097356f, -0.20861158f, + -0.31602472f, -0.45255235f, -0.38534093f, -0.024596754f, + 0.0695583f, 0.32787052f, -0.038353987f, -0.16164628f, + 0.22468278f, -0.36571661f, 0.099357873f, -0.030340249f, + -0.04749155f, 0.012982677f, -0.43680114f, 0.057918638f, + -0.0092783971f, 0.16045794f, 0.3291944f, -0.22646695f, + 0.047449682f, 0.25913027f, -0.12820481f, -0.22461893f, + 0.62480384f, -0.038323764f, 0.19982654f, -0.95291901f, + -0.38110119f, -0.03580283f, -0.3251065f, 0.0042996672f, + -0.058186527f, -0.39392033f, -0.23878866f, -0.0020494978f, + -0.001652033f, -0.091874063f, -0.021227509f, -0.15120342f, + -0.0076455446f, -0.043528199f, 0.058884863f, -0.17672585f, + 0.065144703f, -0.13255624f, -0.0117376f, -0.17155375f, + -0.54205483f, -0.0039471518f, -0.028205395f, 0.050428424f, + -0.30095953f, -0.43076101f, -0.02993462f, -0.51196873f, + -0.52477545f, 0.23885697f, -0.079543218f, -0.04915892f, + -0.031493682f, 0.0028147993f, -0.01989145f, 0.031096086f, + -0.21482223f, 0.054837842f, 0.11475061f, -0.047737118f, + -0.087713927f, -0.10052488f, -0.10079898f, 0.43434569f, + -0.016675575f, 0.11601396f, -0.06429968f, -0.028211048f, + 0.11977354f, -0.11619066f, 0.041977085f, 0.27721193f, + 0.0021605156f, 0.1829733f, -0.3383702f, -2.2176487f, + -0.047562193f, -0.55354446f, 1.0036484f, 0.33247092f, + -0.33223236f, -0.0407576f, -0.17456333f, 0.22844189f, + 0.46769524f, 0.042027067f, -0.29497287f, 0.45029709f, + 1.5748545f, 0.096891783f, -0.18741937f, -0.068723328f, + 0.01319366f, 0.041465562f, 0.329391f, 0.68584722f, + 0.033560935f, -0.1083362f, -0.10815234f, -0.5491268f, + -0.045054395f, -0.23545341f, 0.073963486f, -1.2817867f, + 0.0030854694f, -0.11600973f, -0.44723329f, -0.070397086f, + -0.19580497f, -0.014461758f, 0.0047667483f, 0.16112775f, + 0.0058026821f, -0.090331152f, 0.026509682f, 0.018333228f, + -0.32433081f, 0.043640472f, -0.061345506f, 0.0052556358f, + 0.52142107f, -0.4303093f, 0.4686223f, 0.04444582f, + -0.048207659f, -2.3493745f, -0.16012354f, 0.47692969f, + 0.038666118f, -0.50188547f, -0.028847137f, -0.010875709f, + 0.41878644f, -0.031476773f, 0.38316622f, -0.25006613f, + -0.12578039f, 0.13317589f, 0.75102395f, 1.1495755f, + 0.21576354f, -1.3240894f, -0.40839544f, 0.18184972f, + -0.80903429f, -0.025414791f, 0.75426137f, -0.0924422f, + 0.62731874f, 0.024552086f, 0.15862325f, -0.068936035f, + -2.3772006f, -0.2259592f, 0.072961129f, -0.019764239f, + -0.028541766f, -0.079816967f, -0.23483531f, -2.3900845f, + -0.062977478f, 0.044578493f, -0.032907572f, 0.1460015f, + 0.024026087f, -0.0029204346f, -0.044638515f, 1.0686082f, + -0.20575808f, -0.20594732f, -1.4998273f, -0.020687517f, + 0.13139094f, -0.17539409f, 0.032457549f, -0.46297622f, + -0.13072491f, -0.31551078f, 0.057754494f, -0.003602912f, + -0.11342163f, 0.020498352f, -0.025439989f, 0.034964535f, + -0.097776547f, -0.059152097f, -0.34461462f, 0.043653466f, + -0.10585701f, -0.26356852f, 0.044233333f, -0.36721218f, + -0.27543133f, 0.45965084f, -0.039496303f, -0.028239843f, + 0.096965879f, -0.064953119f, 0.20326263f, 0.072733626f, + -0.0281683f, 0.16889112f, -1.1034729f, -0.57731616f, + 0.022493631f, -0.42891037f, -1.4172704f, 0.0084807463f, + 0.57975018f, 0.02512021f, -0.25585854f, 0.1969295f, + -0.30648959f, -0.032289736f, -0.150446f, -0.077560149f, + -0.21674941f, 0.26450807f, 0.18573941f, -0.24146995f, + -0.13505255f, -0.097152777f, 0.33801928f, -0.31336263f, + 0.038324311f, -0.065170817f, 0.056383047f, 0.3747178f, + 0.0057053086f, -0.014575501f, -0.032487951f, -0.1162124f, + 0.0012562481f, -0.0011336708f, -0.30499676f, -0.085113026f, + 0.10592906f, -0.11736916f, 0.035102081f, 0.54243964f, + -0.13060477f, 0.2690855f, 0.045863971f, -0.027567951f, + -0.20954585f, -0.13868412f, -0.016137129f, 0.015684139f, + -0.46478659f, 0.02368441f, 0.31622681f, 0.12360551f, + -0.049127907f, -0.11260942f, 0.0083068535f, -0.031178847f, + -0.11974818f, -0.27448201f, -0.058049127f, -0.083664924f, + -0.38620213f, -0.067029648f, -1.0492098f, 0.17186916f, + -0.016859202f, -0.23186027f, -0.11473781f, -0.20848495f, + 0.24660927f, -0.41413665f, 0.15074383f, -0.76866168f, + -0.56732118f, 0.0088170413f, 0.10433224f, -0.32958865f, + 0.31685618f, -0.0026262198f, 0.016165303f, 0.18612203f, + -0.17776531f, -0.2350309f, 0.35561255f, -0.53082812f, + 0.029543655f, -0.039602939f, -0.14066544f, 0.58315104f, + 0.019536057f, -0.071837246f, -0.051003616f, 0.6809724f, + -0.11647929f, -0.39258236f, -0.027910374f, 1.0420587f, + -0.43323717f, 0.019223176f, -0.23574097f, -0.019103335f, + -0.23384807f, -0.36510041f, -0.014150832f, 0.18630995f, + 0.1924234f, -0.2225462f, -0.028001226f, -0.033172719f, + -0.097241379f, -0.095451578f, -0.085509315f, 0.030159028f, + -0.045617051f, 0.41034627f, 0.35537934f, 0.22830567f, + -0.0044499012f, 0.14056647f, -0.051914427f, 0.29689029f, + 0.011646433f, 0.2593942f, -0.00095601694f, -0.095604084f, + -0.19455598f, -0.091596305f, 0.24630988f, 0.086595252f, + -0.059063569f, -0.040631838f, -0.077811353f, 0.050846428f, + 0.18067083f, -0.18455467f, 0.099640422f, 0.17519361f, + 0.28845125f, -0.095614828f, -0.032885648f, -0.062060833f, + 0.26140189f, 0.071066692f, 0.25006425f, 0.24454835f, + -0.1192331f, -0.31198785f, -0.029257491f, 0.26575568f, + -0.12812491f, -0.025063302f, 0.020535395f, 0.077427946f, + -0.070162408f, -0.064889356f, -0.15152004f, 0.31044021f, + 0.052010443f, 0.35050327f, -0.14323968f, 0.033596668f, + 0.11180552f, -0.1351058f, -0.15983157f, -0.03987693f, + 0.28991893f, 0.098652378f, 0.040144108f, -0.16215201f, + 0.029641915f, 0.23762618f, -0.070539944f, -0.13749498f, + -0.082575157f, -0.087552004f, 0.021358073f, 0.022796378f, + 0.17919576f, -0.056659002f, 0.18696246f, 0.091873959f, + -0.10023116f, -0.3085092f, -0.10557247f, 0.096838385f, + 0.083127074f, -0.1414234f, -0.098285861f, -0.08364711f, + 0.29257461f, -0.11655258f, -0.2369673f, -0.047624879f, + 0.017584609f, -0.1863192f, -0.23011638f, -0.32226896f, + 0.18533379f, -0.4734703f, -0.19104593f, 0.68077797f, + 0.14739768f, -0.067276724f, -0.22333388f, 0.17049231f, + -0.13028482f, -0.0042055482f, -0.029490629f, -0.040907707f, + -0.2527968f, 0.36223212f, 0.31130016f, 0.19137132f, + -0.0014885343f, -0.058641855f, 0.23752739f, 0.11078342f, + 0.039471369f, 0.059731863f, -0.0086228037f, 0.52895784f, + 0.0058839042f, -0.067695178f, 0.060304485f, 0.1051192f, + 0.4722358f, -0.098167025f, -0.1464496f, -0.091084398f, + 0.12805003f, -0.33991489f, -0.12881865f, 0.051598124f, + -0.13088216f, -0.37161711f, -0.022592921f, -0.068354607f, + -0.22366224f, 0.025142102f, 0.015230242f, -0.003814412f, + -0.0084828157f, -0.14919753f, -0.3466709f, -0.064043276f, + -0.051554855f, -1.6461103f, -0.065022051f, -1.042291f, + 0.34025034f, 0.36813581f, 0.064798467f, 0.03335413f, + 0.38685983f, -0.023667581f, 0.51155704f, -0.0066316347f, + -0.089922443f, 0.085975163f, -1.1881276f, -0.063910939f, + 0.003408405f, -1.5371192f, -2.0806849f, -0.31974488f, + 0.023933761f, 0.062686861f, -0.086199574f, 0.26101974f, + 0.04681835f, 0.0024806266f, 0.070061468f, -0.21878955f, + -0.80157983f, 0.023736833f, -0.14357576f, -0.60660601f, + -0.0031502508f, -0.083492443f, 0.36488426f, -0.46070001f, + 0.0080391951f, -0.0050026313f, 0.052004401f, 0.12832914f, + -0.057133563f, 0.41865686f, 0.0084516779f, 0.52216589f, + -0.50953007f, -0.08446715f, -0.61307335f, -0.081608631f, + -0.081931271f, -0.06539584f, 0.057032648f, 1.3487234f, + -0.13201082f, -1.0176331f, -0.038842704f, -0.020388484f, + -0.0032316099f, -0.063815348f, -0.098623693f, 0.0072527132f, + 0.059788547f, -0.15061857f, 0.24612196f, 0.04527146f, + -0.010297108f, 0.0048127593f, -0.14109147f, -0.055245642f, + -0.30292317f, 0.042035807f, -0.017962143f, -0.058200121f, + -0.12078246f, -0.059326995f, -0.13009509f, 0.13705632f, + -0.052283604f, -0.0052124155f, -0.26235899f, 0.034393284f, + 0.011700409f, 0.70913213f, 0.057933979f, 0.1455097f, + -0.45947376f, -0.059887167f, 0.3302556f, 0.39636183f, + -0.042983525f, -0.0014500226f, 0.35390472f, -0.12617283f, + 0.23528014f, 0.15721165f, 0.31602913f, -0.15132134f, + -0.092654765f, 0.019157961f, 0.042842511f, -0.17344218f, + 0.026395697f, -0.0031809672f, 0.060007825f, -0.0056762462f, + -0.045472115f, 0.031553898f, -0.020400977f, 0.18480359f, + -0.40697768f, -0.13244852f, -0.19021685f, -0.0010242718f, + -0.015849726f, -0.10706361f, -0.094462469f, 0.3584201f, + -0.020469001f, 0.36290783f, 0.057740793f, -0.041632451f, + 0.26713607f, 0.015490503f, 0.025941884f, -0.015062035f, + 0.091620132f, -0.44602996f, 0.021811485f, 0.083092414f, + -0.055999342f, -0.049711686f, -0.043742139f, 0.089041494f, + -0.15166433f, 0.23901734f, 0.026039721f, -0.074615538f, + -0.40048742f, 0.025225548f, 0.066955924f, 0.079507701f, + -0.021655085f, 0.222066f, -0.059258521f, -0.049118966f, + 0.022276685f, 0.076999299f, -0.067305312f, -0.012381352f, + -0.0060015493f, -0.11217141f, -0.24467985f, 0.08212962f, + -0.14494757f, 0.14235123f, 0.12239629f, -0.11673485f, + 0.026542928f, 0.28206837f, 0.13586983f, 0.1265935f, + -0.094175249f, 0.013140218f, 0.24470159f, -0.088335477f, + -0.034965236f, -0.10715673f, -0.0042191222f, 0.42470759f, + 0.015530446f, 0.35020176f, 0.098983951f, -0.21678498f, + -0.13483946f, -0.01576297f, -0.13490994f, -0.049437806f, + 0.24256983f, -0.11817086f, -0.048555914f, 0.1156496f, + 0.1006969f, 0.15012346f, -0.057806067f, -0.069226407f, + -0.07261537f, -0.063675843f, -0.10466486f, 0.035625845f, + 0.012572519f, -0.043693315f, -0.0036542527f, 0.064127371f, + 0.072270244f, -0.002681206f, 0.048817758f, -0.072335258f, + 0.050280791f, -0.051245052f, -0.029005988f, 0.019902311f, + -0.028145008f, -0.077797092f, -0.019759361f, 0.072298452f, + -0.0085604042f, -0.022580469f, -0.058834665f, 0.054325171f, + -0.033076558f, 0.073132575f, -0.018469343f, 0.05270664f, + 0.0097957263f, -0.0021570546f, -0.075999513f, -0.0062440163f, + 0.098404288f, -0.0022209974f, -0.026229097f, 0.032893404f, + 0.033190198f, -0.013973089f, 0.042962443f, 0.032291815f, + -0.055599488f, -0.036106583f, -0.072941996f, 0.0023084972f, + -0.015159621f, -0.062392f, 0.035109457f, -0.038334478f, + 0.062213358f, -0.074689671f, 0.065188341f, 0.083304092f, + 0.08672183f, -0.075779893f, -0.054208644f, 0.072412744f, + 0.015067236f, -0.030709416f, -0.038321406f, 0.0042099389f, + 0.050918534f, -0.033767395f, 0.072438054f, 0.064354949f, + -0.016385904f, -0.086187668f, 0.01715501f, -0.0016325752f, + -0.45565519f, -0.018101115f, -0.38174483f, -0.096979111f, + 0.037035216f, -0.51718795f, -0.074339591f, -0.14000441f, + 0.19470824f, -0.43563524f, -0.0046447595f, 0.0042462768f, + -0.5749467f, -0.0064097773f, -0.28276929f, 0.033691298f, + 0.028369531f, 0.32806343f, -0.50263095f, -1.03026f, + -0.23928811f, 0.47563928f, 0.60787433f, -0.30668548f, + 0.46012482f, -0.0026753999f, -0.54885685f, -0.36480755f, + -0.50369906f, -0.0016643907f, -0.15592429f, 0.92904961f, + -0.50126904f, -0.71102184f, 0.41470507f, -0.9409585f, + 0.00053046434f, 0.031909239f, 0.20584366f, -0.50340044f, + -0.10170645f, 0.068869829f, 0.10765173f, -0.12459197f, + -0.081575334f, -0.34282643f, 0.034835689f, -0.051406361f, + -0.8188532f, 0.015153318f, -0.13804097f, -0.024275173f, + -0.36607319f, -0.26668268f, 0.043312121f, -0.86798388f, + 0.049147632f, 0.022575593f, 0.00013851636f, 0.0022377118f, + -0.18028812f, -0.081064261f, -0.060598198f, -0.006909918f, + 0.018759813f, 0.18504961f, -0.44951311f, 0.13101092f, + -0.088397235f, -0.70993185f, -0.097802028f, 0.25931001f, + -0.25003684f, 0.20206068f, -0.024655458f, -0.13181688f, + 0.13479328f, -0.087849215f, -0.88545692f, 0.050658107f, + 0.00030668065f, -1.5195421f, -1.2567849f, -2.1868272f, + 0.036963448f, 0.7036283f, -1.836673f, -0.00097011641f, + 0.63018256f, -0.045486555f, -0.30664888f, 0.7328968f, + 0.11160442f, 0.0059228479f, -0.11562072f, -0.50984305f, + 1.9041864f, -0.10937262f, 0.22848071f, 0.12049236f, + -0.00088494684f, -0.0038779944f, -0.0097684087f, 0.49663955f, + -0.071631573f, 0.015423962f, -0.011511103f, 0.1236925f, + 0.039122216f, 0.19529611f, 0.013039587f, -1.2561309f, + -0.34951282f, -0.15305248f, 0.87400872f, -0.072706312f, + 0.089121997f, -1.7306461f, 0.010762163f, 0.78958499f, + 0.048582908f, -1.9788998f, 0.016937237f, -0.025513615f, + -0.099000975f, -0.036225185f, -0.076724648f, 0.026714088f, + 0.1649144f, 0.23489761f, -0.87671381f, -0.046122432f, + -0.051434908f, -2.0110054f, 0.0065313615f, -0.41467503f, + -0.45453116f, -0.59079862f, 0.026935091f, 0.033036619f, + -0.049319468f, 0.026523186f, 0.03625061f, -0.066432178f, + -0.005325546f, -0.87028438f, 0.36593664f, 0.87334609f, + -0.10873202f, 0.54806083f, -0.87650651f, -0.10845187f, + -0.4161225f, 0.027495202f, 0.34200329f, 0.1089579f, + 0.050370712f, 0.025081305f, 0.096583486f, -0.19094084f, + -1.0967813f, -0.037905958f, 0.20550638f, -0.0083111459f, + 0.028583316f, 0.0049249525f, -0.091418631f, 0.44727081f, + -0.079395264f, -0.037027217f, 0.10171039f, -0.11474586f, + -0.051493578f, -0.010994282f, -0.033353813f, 0.69848078f, + -0.50306207f, -0.068288811f, -0.28694025f, -0.025993384f, + 0.02725541f, -2.3143594f, -0.0033435489f, 0.034062229f, + -0.15769368f, -2.2523789f, -0.019149426f, 0.019336116f, + 0.012806554f, -0.1317575f, 0.026083378f, 0.02160394f, + 0.57307303f, 0.18386364f, 0.030994257f, 0.026164154f, + 0.049735237f, -0.10235039f, -0.12685217f, 1.1914035f, + 0.37165421f, 0.319507f, 0.064071186f, 0.032565087f, + -0.31004837f, -0.077716917f, -0.18167648f, 0.086727984f, + -0.11092266f, 0.16713946f, 0.080626555f, 0.044975806f, + 0.094379552f, -0.080637105f, 0.024303559f, -0.50281459f, + -0.23155364f, -0.036739603f, -0.092804f, 0.50863326f, + -0.30545413f, -0.042494323f, -0.025823316f, 0.11648819f, + -0.031365741f, 0.12277494f, 0.26800728f, 0.27637908f, + 0.051867418f, -0.048609443f, 0.30295044f, -0.078269228f, + 0.02119714f, -0.050554648f, -0.067948565f, -0.40299687f, + 0.071630694f, 0.83264965f, 0.037741411f, -0.060523149f, + 0.26294428f, -0.081372999f, -0.2515009f, -0.032259505f, + -0.16885974f, 0.072732694f, 0.0072755045f, -0.086291276f, + -0.024101481f, -0.08015909f, 0.044739831f, -0.051693622f, + -0.077790037f, 0.061050251f, 0.057649616f, -0.027631443f, + -0.14357851f, -0.045165349f, -0.23726726f, -0.038312044f, + -0.058574993f, 0.061210167f, -0.10418124f, 0.021001635f, + -1.6640639f, 0.1576463f, -0.016591389f, -0.061151449f, + -0.26695481f, -0.038848314f, 0.313995f, -0.0468674f, + -0.00078586891f, -0.023515156f, -0.10872835f, -0.071266927f, + -0.071049355f, 0.10634971f, 0.0057518347f, -0.09999299f, + 0.026152613f, -0.0097026592f, -0.49693775f, 0.05103917f, + -0.4102321f, -0.34567899f, 0.030329725f, -0.14376371f, + 0.0078532947f, -0.39641389f, 0.0084525207f, 0.052139949f, + 0.021007234f, -0.10599037f, 0.15092663f, -0.04143228f, + -0.04742628f, 0.015835224f, -0.1720899f, 0.13246122f, + -0.0226498f, 0.031189084f, -0.44807583f, -0.12373329f, + -0.33224815f, -0.041281391f, -0.0099021196f, -0.11953203f, + 0.073111169f, -0.012500219f, 0.055841159f, 0.14163066f, + -0.069689952f, 0.051780645f, -0.089367874f, 0.039963353f, + 0.16074111f, -0.069661967f, 0.016675564f, -4.6848288f, + 0.19334602f, 0.1556744f, -0.098234236f, -0.0017722124f, + -0.021866919f, -0.16887783f, -0.015865963f, 0.33617467f, + 0.14055642f, -0.25025398f, -0.062106106f, 0.045876559f, + -0.18961951f, -0.0013499622f, -0.1777025f, -0.036851149f, + -0.05187723f, -0.1304349f, 0.4855018f, -0.14576426f, + 0.057168193f, 0.037989266f, -0.08324457f, 0.18829319f, + 0.048460525f, 0.052739646f, -0.43360302f, -0.18608667f, + -0.2951051f, -0.019280048f, -0.73256171f, 0.32569844f, + -0.048777334f, 0.18388988f, -0.017798331f, 0.15993437f, + -0.02859229f, -0.037093975f, 0.29408985f, 0.026686097f, + -0.0048854118f, -0.028793f, -0.053112399f, 0.16889371f, + 0.078784473f, -0.035839591f, -0.049728427f, -0.23653457f, + 0.26128584f, -0.10865746f, 0.10211634f, -0.069192775f, + 0.035490684f, 0.033722091f, -0.0096259722f, -0.33964238f, + -0.067858785f, -0.16700102f, 0.069929056f, 0.04795951f, + -0.70292485f, -0.085098341f, -0.11157663f, -0.008953589f, + -0.0055971821f, -0.33199701f, 0.31665939f, -0.09141735f, + -0.11419336f, 1.0993307f, -0.11483682f, -0.30305517f, + 0.26352113f, 0.64817202f, -0.081054918f, -0.030197257f, + -0.026262838f, 0.018340882f, 0.56625599f, -0.1336136f, + -0.040635079f, 0.85398149f, 0.19054914f, -0.098804928f, + -0.062327128f, -4.0728307f, 1.2295185f, 0.01146898f, + -0.09432672f, -0.054986089f, 0.38651606f, 0.012013177f, + 0.23637456f, -0.018734081f, 0.15692076f, -0.2007167f, + -0.47731158f, 0.45348462f, -0.59965384f, 0.24170934f, + 0.01757836f, -0.020309774f, -0.45416212f, -0.65731019f, + -0.0023793662f, 0.020002963f, -0.26778352f, -0.36386466f, + -0.0093631791f, 0.364656f, -0.01478583f, 0.6279251f, + 0.51214635f, 0.060328808f, -0.28996101f, -0.067656957f, + 0.072487175f, 0.65367693f, -0.042664539f, 0.40535581f, + -0.047671389f, 1.2457716f, 0.037410371f, -0.099525735f, + 0.25023609f, -0.049945936f, -0.053911909f, -0.0083802175f, + 0.019972358f, 0.027749544f, 0.32287729f, 0.098161086f, + -0.064183936f, -0.038548667f, -0.060456581f, 0.61687195f, + -0.37718335f, -0.037414018f, -0.085521974f, -0.088919751f, + 0.68999487f, -0.0048560435f, -0.1711864f, 0.22912604f, + -0.037066583f, -0.038215432f, -0.2487935f, 0.082185268f, + -0.033191577f, -0.1239999f, -0.071293525f, -0.19418992f, + -0.1248919f, -0.062240236f, 0.37138271f, -0.34601206f, + -0.41187596f, 0.065085202f, 0.093426906f, -0.21774687f, + -0.037777346f, -0.043011557f, 0.52909863f, 0.56612122f, + 0.061343756f, -0.12814251f, -0.50152296f, -0.026154628f, + 0.021845313f, -0.0060316194f, 0.38748297f, 0.085889995f, + -0.059028011f, -0.18285847f, 0.016289469f, 0.37771469f, + -0.16293114f, -0.091988765f, -0.0042371331f, -0.016607368f, + 0.13334541f, -0.023387196f, -0.063812554f, 0.17263447f, + 0.080235831f, -0.10375634f, 0.02806253f, 0.047066875f, + 0.57058465f, -0.091420263f, 0.028045367f, 0.017013578f, + 0.51770729f, -0.16860725f, 0.37569794f, -0.0096301418f, + -0.067345299f, -1.4036857f, 0.046390925f, -0.32566071f, + 0.20839158f, -0.36810955f, -0.031288113f, -0.039412111f, + 0.32468638f, -0.05655501f, 0.33624542f, -0.18567549f, + -0.094766043f, 0.45254403f, 0.75026047f, 1.4345117f, + 0.012049039f, -0.85826635f, -0.66195959f, -0.14415415f, + -0.22189634f, 0.0015239684f, 0.32996467f, 0.061154407f, + 0.1901222f, 0.011408065f, 0.075011671f, -0.082477123f, + -1.5484583f, -0.1257917f, -0.12741537f, -0.25905782f, + 0.02507803f, -0.14115192f, -0.12542982f, -1.3747127f, + -0.11013876f, -0.035564464f, 0.010519293f, -0.18429498f, + -0.062635928f, 0.59706378f, -0.029590173f, 1.2927582f, + -0.11539645f, -0.059126351f, -0.38801882f, -0.033547301f, + 0.051839415f, 0.26035506f, -0.11098221f, 0.10812298f, + -0.1360231f, 0.47971174f, 0.006814315f, 0.025020903f, + 0.025294054f, 0.08723595f, 0.063467801f, 0.0060978723f, + 0.016792119f, -0.32799721f, -0.59595072f, -0.0084566846f, + -0.085017517f, 0.059309024f, 0.031896047f, 0.14116919f, + -0.23818594f, -0.020134771f, 0.044858567f, -0.0038069775f, + -0.30021554f, 0.0048541315f, -0.1588583f, 0.034516215f, + -0.050249454f, -0.023209821f, -0.16735421f, -0.020802096f, + -0.049127579f, -0.20180602f, -0.07516297f, -0.04915471f, + 0.11887397f, -0.081424117f, -0.18212174f, -0.021895437f, + -0.0095743146f, 0.0006536544f, -0.099462375f, -0.43830836f, + -0.25326443f, 0.58973926f, -0.1002318f, -0.097533144f, + 0.050253425f, -0.01852647f, -0.4798778f, -0.3139782f, + 0.0080279978f, -0.0093488554f, 0.10016383f, -0.049519017f, + -0.07127206f, -0.27934149f, -0.041944075f, -0.35838196f, + -0.021232007f, -0.0036943688f, -0.0012797451f, 0.06774687f, + -0.20856597f, -0.27828747f, -0.079258218f, -0.28661051f, + 0.00086653559f, -0.16315345f, -0.0038571167f, -0.063657388f, + -0.081674196f, 0.063582398f, -0.085161202f, -0.0146929f, + 0.051849592f, -0.23227842f, -0.15641464f, 0.03575734f, + -0.080868773f, 0.88866079f, -0.095695831f, -0.33786878f, + 0.35510474f, -0.15253709f, 0.062780939f, -0.060144186f, + 0.54409128f, -0.094633169f, -0.38871333f, 0.073875472f, + 0.029189857f, 0.40085343f, -0.42909905f, -0.13868162f, + 0.026677901f, -1.5836704f, -1.4468882f, -0.15505806f, + 0.084788337f, -0.10057171f, -0.14399818f, 0.41823846f, + -0.24611013f, 0.0052842642f, -0.054426864f, -0.31932124f, + -0.2058716f, 0.13644008f, -0.1688889f, -0.15269582f, + -0.0039672568f, -0.012738186f, 0.1611324f, -0.065557361f, + -0.074028403f, -0.11739292f, 0.023840938f, 0.3090333f, + -0.099501856f, 0.29807648f, 0.087562814f, -0.09352158f, + 0.57741445f, -0.08294224f, 0.21713026f, 0.01814195f, + -0.037078999f, -0.09747915f, -0.084636062f, 0.37824842f, + 0.038426917f, -0.32507238f, -0.080613136f, -0.070762895f, + -0.10339389f, -0.026352739f, 0.043337692f, -0.009955111f, + -0.084156349f, -0.077233098f, 0.039549042f, 0.080921032f, + 0.054229494f, -0.028676664f, -0.050160114f, 0.08983431f, + -0.063884072f, 0.025528355f, 0.032847218f, 0.054857146f, + 0.081962734f, 0.043272294f, 0.084598638f, 0.020398738f, + -0.059901796f, 0.011237032f, -0.047519352f, -0.034422755f, + -0.00032960597f, 0.078044318f, 0.086971954f, 0.033516362f, + 0.050747965f, 0.044480886f, -0.017300522f, 0.054683834f, + 0.0092455596f, 0.033120163f, -0.00043995393f, -0.065498739f, + -0.024881737f, -0.073182762f, 0.027378434f, 0.0011220793f, + 0.062088575f, 0.028820025f, -0.0020078355f, 0.048688505f, + 0.0086601973f, -0.054930229f, -0.018218165f, 0.020208878f, + -0.038067486f, 0.047839195f, -0.014852329f, 0.022775885f, + 0.014638876f, 0.053766459f, -0.039368164f, -0.021898638f, + 0.079784781f, 0.038508136f, 0.07589522f, 0.021621414f, + -0.064064182f, 0.068424456f, -0.039913204f, -0.026170243f, + -0.015727254f, -0.061927281f, 0.074160099f, 0.071592994f, + -0.29251891f, -0.092081256f, 0.080514573f, -0.055245556f, + -0.090790853f, -0.10561142f, -0.17423865f, 0.30871472f, + -1.0264025f, -0.72010303f, -0.087959386f, 0.0051258947f, + -0.36932328f, -0.027786484f, 0.50200766f, 0.062218387f, + 0.028110888f, 0.4301087f, 0.062286012f, 0.024989348f, + 0.17814907f, -0.029878076f, 0.16978914f, 0.33501858f, + 0.34539214f, -0.10895258f, 0.6234318f, -0.85372078f, + -0.24768494f, -0.03537197f, -0.33118844f, 0.2568498f, + 0.070175521f, 0.3086749f, 0.18721701f, -0.39563188f, + -0.064260058f, 0.0028955094f, 0.34847909f, 0.023994898f, + -0.044087399f, -0.091662355f, -0.13131915f, 0.51900584f, + -0.018558688f, 0.4340159f, -0.3805494f, -0.15995836f, + 0.0031874399f, -0.095885821f, -0.010745916f, -0.023926761f, + 0.16632351f, 0.0099713933f, 0.0035349026f, -0.13048004f, + 0.12161538f, -0.14608973f, -0.027223494f, -0.0090951053f, + -0.18924041f, -0.0094033927f, 0.022658916f, 0.12449116f, + 0.0038125187f, -0.079308778f, 0.2684603f, 0.037285324f, + 0.049825091f, -0.60369772f, -0.1314092f, 0.045162812f, + -0.51904565f, 0.39359173f, 0.046317991f, -0.05520061f, + 0.072550952f, -0.068185017f, 0.070175514f, 0.080962881f, + -0.016326262f, -0.11461738f, -0.17298838f, -0.17490005f, + 0.072959229f, 0.040168349f, -0.12521972f, 0.15236825f, + -0.61072707f, -0.13227405f, -0.30803815f, 0.19029729f, + 0.52070606f, 0.014809801f, 0.0054789134f, 0.19035031f, + 0.27032876f, -0.15464504f, -0.15672697f, -0.37923494f, + -0.081257083f, -0.063600369f, 0.023666173f, 0.54893273f, + 0.034883332f, -0.015331382f, -0.0086950334f, -0.13872086f, + -0.010414696f, -0.13621061f, -0.020117654f, -0.26741242f, + -0.14369567f, 0.058574758f, 0.10221387f, 0.045116495f, + -0.23087464f, -0.010746231f, -0.09207458f, 0.43460619f, + 0.21566422f, 0.036061354f, -0.080614544f, -0.11030354f, + -0.066116102f, -0.11324302f, -0.033355478f, 0.040416781f, + 0.23332848f, 0.015652154f, 0.5352875f, 0.14367223f, + -0.090198576f, -0.13684015f, 0.024549266f, 0.42413229f, + 0.21364002f, 0.2939035f, -0.038689706f, 0.0067280931f, + 0.45229149f, -0.089154102f, -0.16882813f, -0.015672764f, + -0.037488475f, -0.025477674f, -0.38539001f, -0.045419596f, + 0.097335815f, 0.19448188f, 0.22488768f, 0.20476626f, + -0.42137772f, 0.051661503f, 0.22321108f, 0.38568428f, + -0.19037288f, 0.004149816f, -0.0051682508f, -0.010659511f, + -0.22465913f, 0.25756124f, 0.49252462f, 0.3685225f, + 0.038789593f, -0.0057527721f, 0.16413411f, -0.30378968f, + -0.11378701f, -0.062124837f, -0.0092479475f, 0.68139452f, + -0.0058288416f, -0.18974721f, -0.073010303f, -0.24767102f, + 0.74749821f, -0.054005224f, -0.27484772f, -0.06772051f, + 0.25968799f, -0.31148919f, 0.056466248f, -0.29095891f, + -0.21050519f, 0.24051785f, -0.013345025f, -0.068468772f, + -0.051269118f, -0.062993497f, 0.024118742f, -0.048320927f, + 0.2322372f, 0.76383394f, -1.1223019f, -0.099851437f, + -0.049968749f, -0.28473893f, -0.13243482f, 0.92270994f, + 0.31419387f, 0.39462399f, -0.093465857f, -0.13037245f, + -0.10422702f, 0.0066663343f, -0.70397991f, 0.2160098f, + -0.13407837f, -0.92615378f, -3.3946073f, -0.64970493f, + -0.43111748f, -0.75532073f, -0.72229236f, -0.8286854f, + -0.15976906f, -0.049117692f, -0.30710545f, -0.11182546f, + -0.070267327f, -0.15796f, -0.22818875f, -0.71293175f, + -1.767676f, -0.44632101f, -0.027801365f, -0.36940181f, + 0.030136632f, -0.092265062f, -1.6036172f, -0.65693432f, + -0.099117398f, -0.04057245f, 0.019757748f, -0.61568487f, + -0.08269269f, 1.0832056f, -0.083232284f, -0.74348295f, + -0.88790143f, -0.013590144f, -0.97294652f, -0.051689286f, + 0.45725021f, -0.66841674f, -0.0098184934f, -2.4497719f, + -0.12165684f, -0.81798548f, -0.11010237f, -0.026729738f, + -0.8907029f, 0.0067331255f, -0.11166732f, -0.076974273f, + -0.05933211f, -0.31460729f, -0.51003867f, -0.27598163f, + 0.034988482f, 0.16835648f, 0.017032307f, -0.079180352f, + 0.22894071f, -0.050570574f, -0.11232803f, -0.02959758f, + -0.46730608f, -0.045440562f, 0.25620937f, 0.18214104f, + -0.019522524f, 0.45225927f, 0.1791708f, -0.25357369f, + -0.2452153f, 0.24183041f, 0.16853772f, 0.31072882f, + -0.16934215f, -0.083371505f, -0.22175349f, 0.18350793f, + -0.87834048f, 0.039204076f, -0.28606606f, -0.70449382f, + 0.44820127f, -0.027161766f, 0.16386746f, 0.57533395f, + -0.06268727f, -0.041156791f, 0.22931442f, -0.28084469f, + 0.035198048f, -0.069726154f, 0.048464619f, -0.22704007f, + 0.0055079018f, 0.28333467f, 0.02059759f, 0.35278407f, + -0.4084639f, 0.047461614f, -0.10277513f, 0.045285188f, + -0.027175512f, -0.025579467f, -0.10027496f, 0.62878704f, + -0.049176332f, 0.35446164f, -0.051825747f, -0.011313948f, + -0.16044648f, 0.0083927531f, 0.016189361f, -0.046802826f, + -0.054726537f, 0.15780437f, -0.26316869f, 0.15517597f, + 0.01722943f, -0.19120158f, -0.053452048f, 0.04591497f, + 0.58688688f, -0.1538913f, -0.032128505f, -0.10273634f, + 0.069977082f, -0.047744796f, 0.30753413f, 0.025897395f, + 0.046558045f, 0.16767628f, 0.17324471f, -0.060277499f, + 0.085942484f, 0.28325486f, 0.18817776f, 0.22310731f, + -0.1452266f, 0.046667967f, 0.30339625f, 0.32465491f, + -0.40638912f, 0.0043262015f, 0.062344577f, -0.024103725f, + -0.12093115f, 0.1115658f, -0.053475723f, 0.72669351f, + -0.074237175f, -0.076053776f, 0.14781231f, -0.51465064f, + -0.028115777f, -0.012449532f, -0.021762103f, 0.12203516f, + 0.006270966f, -0.026557308f, -0.023128258f, -0.028351581f, + 0.048368353f, -0.071874239f, 0.014924669f, 0.063840762f, + 0.21843731f, -0.3921051f, -0.072892517f, 0.082392082f, + 0.05138123f, -0.03189794f, -0.083176367f, -0.14478798f, + -0.10235992f, -0.062090281f, -0.0060063945f, 0.042073786f, + 0.19809513f, 0.60488838f, 0.040504511f, 0.10124884f, + 0.026515109f, -0.10879438f, 0.047002938f, -0.15623885f, + -0.40849853f, -0.32022455f, -0.04404451f, -0.045754276f, + -0.2852352f, -0.1171596f, 0.1395161f, 0.33504716f, + 0.030530592f, 0.38973022f, 0.18968262f, 0.18081388f, + 0.07395716f, 0.41174901f, 0.27076772f, 0.14418961f, + -0.048210561f, 0.052168373f, 0.049107343f, -0.13171871f, + 0.012193359f, -0.091313578f, 0.22781552f, 0.25653544f, + -0.17562778f, 0.38402963f, 0.057123128f, 0.42752853f, + -0.0056222444f, -0.02217745f, 0.24723472f, -0.11113603f, + -0.11210155f, -0.11024981f, 0.52454424f, 0.3699773f, + -0.11768199f, -0.17044221f, 0.14058784f, -0.17493638f, + -0.22959536f, 0.073878728f, 0.0042469264f, -0.12940601f, + 0.47796392f, 0.061177909f, -0.058356088f, 0.11153516f, + 0.1507522f, -0.23192056f, -0.049840782f, -0.026150368f, + -0.1254259f, -0.024509417f, 0.0036111416f, 0.02514472f, + -0.49629429f, 0.87066996f, -0.013142345f, 0.37180758f, + 0.0080322521f, 0.081697956f, 0.012714152f, -0.046662986f, + 0.18522702f, -0.4139874f, -0.083906904f, -0.060497358f, + -0.34181777f, -0.012286503f, -0.11061813f, -0.47191006f, + -0.099740669f, 0.42553556f, 0.32800955f, -0.021869065f, + 0.42612422f, 0.13144773f, 0.11283957f, 0.93140364f, + -0.053545848f, -0.07930804f, 0.47886786f, 0.1989264f, + 0.6759941f, -0.93252534f, 0.032041904f, -0.044144239f, + 0.25779268f, -0.22719018f, -0.79329377f, 0.27659926f, + 0.04300246f, -0.082763404f, -0.42521027f, 0.0792851f, + -0.021661976f, 0.042408686f, 1.0140136f, -1.0645447f, + 0.054064184f, -0.25852275f, -0.47881284f, -0.049923733f, + 0.34506136f, -0.038413223f, 0.025139883f, -0.014884325f, + 0.070005365f, -0.071437962f, -0.11796044f, 0.18567787f, + -0.23104286f, -0.039002981f, -0.11585469f, -0.09725073f, + 0.11350085f, -0.053476967f, -0.00033748028f, -2.0746803f, + 1.0892519f, 1.2690789f, 0.093685426f, -1.0221928f, + 0.029873803f, -0.021360075f, -0.047369055f, 0.20135519f, + 0.67544204f, -0.78479362f, -0.040813062f, 0.030707965f, + 0.35633406f, 0.053189479f, 0.76126802f, 0.86382157f, + -0.094227098f, 0.2094987f, 0.67185611f, 0.051616147f, + 0.52478695f, -0.0040221214f, -0.16001946f, 0.4074913f, + 0.13195656f, -0.0055354983f, 0.44071493f, -0.11988057f, + 0.3157503f, -2.448422f, 1.1344249f, 0.32087708f, + 0.22200321f, -0.41310331f, -0.72897917f, 0.53797102f, + -0.067335732f, 0.069110282f, 0.47809941f, -0.06844195f, + 0.073242836f, 0.029234463f, 2.3849556f, -1.0071533f, + -0.074621722f, -1.0299509f, 0.25219637f, 1.1371839f, + 0.58154786f, 0.036501266f, -0.098814026f, 0.04495085f, + -0.044892538f, 0.12186793f, -0.097985014f, 0.79068494f, + 0.31673107f, -0.10032196f, -0.030443508f, -0.13809051f, + -1.4959624f, -0.056538377f, -0.10310657f, 0.1370534f, + -0.23495708f, -0.73044902f, 0.18916507f, -0.19739078f, + 0.041293621f, 0.16135502f, -0.06817811f, 0.31361419f, + 0.086272888f, 0.38376006f, -0.11216976f, -0.10678454f, + 0.16560866f, 0.030048847f, -0.20908524f, 0.079292983f, + 0.0055380641f, -0.89106131f, -0.97988617f, -1.9143738f, + -0.15053691f, -0.92410147f, -0.5466997f, 0.37636128f, + 0.87934995f, -0.083402321f, -0.015842639f, 0.92357516f, + 0.6919679f, -0.078537926f, -0.036434345f, -0.099174492f, + 0.7420249f, 0.28508922f, -0.10244167f, -0.44078553f, + 0.027031718f, -0.05428832f, 0.082070731f, 0.88231707f, + -0.13507426f, 0.032112505f, -0.062626898f, -0.12602715f, + -0.081384107f, -0.26579115f, 0.069907837f, -0.69814128f, + 0.46079558f, -0.1525809f, -1.8700105f, 0.0096655255f, + -0.090863839f, -0.35729605f, -0.059703141f, 1.0912131f, + -0.0060685948f, 0.070658982f, -0.088824846f, -0.061532471f, + -0.19825327f, -0.086941086f, -0.036978438f, -0.020204669f, + 0.14850084f, 0.041183408f, -0.77396119f, 0.017346062f, + -0.077472478f, -0.90750253f, -0.081773527f, -0.67647892f, + -0.10554776f, -0.18677981f, -0.048647769f, 0.032334592f, + 0.24476331f, -0.06041722f, -0.25738671f, 0.027845029f, + -0.0086891185f, -0.13782775f, -0.53609109f, 1.0249164f, + -0.10954187f, 1.0714134f, -1.4272163f, -0.29305029f, + -0.19894557f, -0.088075787f, -0.10342561f, 0.19910294f, + -0.20500904f, -0.0059708585f, 0.090227962f, -0.39451903f, + -1.0001804f, -0.040206105f, 0.16486336f, -0.40526557f, + -0.11501448f, -0.0082699452f, 0.10817505f, 0.18213055f, + -0.093365677f, -0.046728272f, 0.10475827f, 0.32898527f, + -0.034619723f, -0.0018058298f, -0.058166061f, 0.72530574f, + -0.19440588f, 0.058128193f, 0.4968437f, -0.023293385f, + 0.07964398f, -0.48898467f, -0.090723105f, 0.18957086f, + -0.17588924f, -0.97609276f, -0.067061491f, -0.078593895f, + 0.047857583f, 0.00020589939f, -0.076520763f, 0.0081840139f, + -0.17724007f, 0.30825135f, -0.59013867f, -0.0076708538f, + 0.030222893f, -4.0517411f, -0.12905918f, 0.24119869f, + -2.5502155f, 0.060220517f, -0.044203211f, -0.00029754455f, + -0.31050724f, -0.010221407f, -0.26305288f, 0.11612535f, + -0.099138007f, -1.4022467f, -0.34407756f, -0.59685308f, + -0.048711605f, -3.7913814f, -0.25539663f, -0.31260836f, + 0.50562942f, 0.064073063f, -0.25343916f, -0.2387509f, + -0.0004931771f, -0.013284214f, -0.23185763f, 0.31147602f, + 1.2195642f, -0.092278413f, 0.11848982f, 0.031697195f, + -0.023522919f, -0.044644721f, 0.14595979f, -0.031510849f, + -0.083346665f, -0.076257758f, -0.071750678f, 0.19221945f, + -0.01347756f, -0.6378305f, -0.034699943f, -0.16557711f, + 0.025741464f, -0.15583842f, -0.075682238f, 0.059265688f, + -0.060612939f, -0.029861128f, -0.026723145f, -0.13154434f, + 0.0575196f, -2.4937658f, -0.014991465f, -0.1229187f, + -0.38495475f, 0.017445676f, -0.099207535f, 0.0026815981f, + 0.28468493f, 0.0024244022f, -0.10451413f, -0.041511651f, + -0.010069463f, -2.2675424f, -0.17578207f, 0.27845332f, + -0.018994939f, -0.36881879f, 0.022979388f, -0.017250089f, + 0.55951804f, -0.10441787f, -1.5345714f, -0.067739263f, + -0.037978362f, 0.023755817f, 0.68314815f, -0.70505798f, + -0.081196778f, -0.45844302f, -0.39458638f, -0.23325375f, + -0.66456676f, -0.018451495f, -0.055419952f, 0.83319372f, + -0.54995984f, 0.059924964f, -0.25438184f, -0.26802996f, + -0.0063078678f, 0.018960036f, 0.4143751f, 0.82474947f, + -0.0500587f, -0.073626213f, 0.37799749f, -0.39402369f, + -0.072806105f, -0.072544724f, 0.07179483f, 0.16915679f, + -0.13207372f, -0.20136963f, 0.004122681f, 0.56294417f, + 0.075378686f, 0.021409744f, 2.0969796f, -0.14088786f, + 0.0051329699f, 0.46231446f, 0.029720183f, -0.64508867f, + -0.050677963f, -1.2421119f, 0.014722937f, -0.013800851f, + 0.029554771f, -0.050745077f, 0.024275061f, -0.033146694f, + -0.031272266f, -0.24500942f, 0.12516545f, -0.022896336f, + 0.043533385f, -1.034007f, -0.08267507f, -0.11423747f, + -0.21549088f, -0.1077714f, -0.045855004f, 0.0085909897f, + 0.40672812f, -0.034065176f, -0.55723178f, -0.034804918f, + 0.039994143f, 0.47918519f, 0.32987133f, -0.29725543f, + 0.054816328f, -2.6882472f, -1.4330297f, -0.26057398f, + -0.65218216f, 0.056301065f, -0.03954884f, 0.34676889f, + -0.45563477f, -0.0026467054f, -0.08941786f, -0.18836218f, + -0.71434277f, 0.19056903f, 0.18788125f, 0.07274992f, + -0.090065993f, -0.009852387f, 0.27712256f, -0.8516646f, + -0.10796157f, 0.014842887f, 0.0084828716f, 0.16168131f, + 0.0071278862f, -0.057986718f, 0.0044089449f, 0.36072615f, + 0.26674265f, 0.095395803f, 0.42644367f, 0.033398882f, + -0.085305281f, 0.25617763f, -0.081003092f, -0.14342959f, + -0.0073743379f, 0.61575198f, -0.0042784661f, -0.0063542789f, + -0.16996659f, 0.11337265f, 0.01374953f, -0.026948566f, + 0.0012968327f, -0.031009892f, -0.0049411762f, 0.045056008f, + 0.043849811f, -0.050736312f, 0.017914064f, 0.057961565f, + 0.016079349f, -0.046297923f, 0.033824354f, 0.038194727f, + -0.0022458055f, 0.056684095f, -0.038108345f, -0.019342374f, + 0.020370385f, -0.079301424f, -0.041627381f, 0.01399509f, + -0.030121591f, 0.078922071f, 0.06691692f, 0.046665136f, + 0.054231752f, 0.011625892f, -0.062498033f, -0.023062121f, + -0.05441853f, -0.076128215f, 0.0037477948f, -0.086590186f, + -0.04887709f, 0.054053955f, -0.060640328f, 0.048214883f, + -0.033144433f, 0.072271712f, 0.004403139f, -0.04113584f, + 0.06758821f, 0.020278983f, -0.075054772f, -0.063009501f, + -0.076542236f, 0.014152664f, 0.0040195519f, -0.077394597f, + 0.017626124f, 0.04758041f, -0.019031245f, -0.007710719f, + -0.085866041f, -0.094707951f, 0.018364118f, -0.05713015f, + 0.013804832f, 0.044322014f, 0.08139573f, 0.073071457f, + -0.039255522f, -0.011276198f, 0.018936526f, 0.084448822f, + -0.35604444f, -0.4295575f, -0.030460238f, -0.0086869746f, + 0.0074417582f, -0.073389515f, -0.072730832f, -0.75093496f, + 0.041454937f, -0.71396309f, -0.076336086f, -0.058709688f, + -0.0070260614f, 0.034919091f, -0.18066303f, -0.094583079f, + -0.13678338f, -0.047199894f, -0.18868037f, -0.031605158f, + 0.2034214f, 0.53937656f, -0.10762785f, 0.32352239f, + -0.038108323f, 0.015800292f, 0.023840973f, -0.082104221f, + 0.39220679f, -0.076534599f, 0.43633395f, -0.52492416f, + 0.016195573f, -0.2319791f, -0.11301067f, 0.33706543f, + 0.050245732f, -0.089494184f, 0.21569853f, -0.25391045f, + -0.047090176f, 0.038533777f, -0.047058158f, 0.36345351f, + -0.11003393f, -0.67002392f, 0.059907064f, -0.45064142f, + -0.57659709f, 0.091449909f, -0.79470801f, 0.051363491f, + -0.10312302f, -0.084659874f, -0.076771431f, 0.044911172f, + -0.039984297f, -0.062970161f, -0.021213928f, 0.046590544f, + 0.24859488f, 0.0027417981f, 0.039691087f, -0.038972091f, + -0.07514634f, 0.049779557f, 0.01988285f, 0.0047354861f, + -0.063466385f, 0.050943557f, -0.0025122999f, -0.0087271407f, + -0.075992644f, 0.024023814f, -0.020798564f, 0.03460744f, + -0.0091486257f, -0.021200139f, -0.044306856f, -0.042921703f, + -0.0041623805f, 0.026981376f, -0.013895984f, 0.04122676f, + -0.067684792f, 0.028630108f, -0.0031628408f, -0.049023684f, + 0.0098558189f, -0.0742881f, -0.084268115f, -0.065743655f, + 0.048210934f, -0.058325686f, 0.029994635f, -0.074333005f, + 0.065336041f, -0.077514343f, 0.040873013f, -0.069080658f, + -0.086139865f, 0.025929943f, 0.083754905f, -0.072172016f, + 0.0014183784f, 0.027184853f, -0.0050807353f, 0.045059778f, + 0.07609538f, 0.08985623f, 0.008859084f, 0.05358167f, + -0.010007032f, -0.065254807f, -0.085086815f, 0.072352186f, + 0.024658427f, -0.0091801882f, -0.047240622f, 0.0037755421f, + -0.034217019f, 0.051016942f, -0.081530504f, 0.0074401409f, + -0.033397224f, 0.040092103f, 0.038331166f, 0.0055934223f, + -0.21721621f, 0.0044613481f, 0.14425616f, 0.081001572f, + -0.0092809293f, 0.098630443f, -0.093468465f, -0.10869749f, + 0.36723965f, 0.058426291f, -0.12276745f, -0.037882723f, + 0.30073535f, -0.015976129f, -0.084940523f, -0.23277788f, + 0.011981377f, -0.30290964f, 0.0020272133f, 0.12385984f, + 0.20927586f, -0.050149601f, 0.021094747f, -0.076297738f, + -0.24469151f, -0.05506729f, 0.16253975f, 0.30049735f, + 0.070963755f, 0.16955143f, 0.16041125f, 0.036838166f, + 0.14377439f, -0.10147434f, 0.25371069f, -0.22239608f, + -0.12376334f, -0.10640892f, -0.28710401f, 0.20234807f, + 0.0279705f, 0.041540701f, -0.17223787f, 0.23896542f, + 0.0088777961f, 0.079601459f, 0.18905704f, -0.2999191f, + -0.38566813f, -0.099548101f, 0.24889569f, -0.030487139f, + 0.40924862f, 0.16635776f, -0.078223385f, 0.10216153f, + 0.20076048f, 0.24877758f, -0.00054856314f, 0.044728383f, + -0.023633491f, -0.13426121f, -0.020704255f, 0.07234706f, + 0.1399142f, 0.28044316f, 0.3029713f, 0.068448104f, + -0.03432589f, 0.03961508f, -0.038769793f, -0.4992314f, + 0.29053834f, 0.33702004f, -0.034728177f, -0.0321372f, + 0.099372685f, -0.043256555f, -0.19456948f, 0.06069896f, + -0.058467608f, -0.078830466f, 0.045653526f, -0.096609741f, + 0.10534941f, 0.097656481f, -0.033432283f, 1.0467987f, + -0.072569065f, 0.040155035f, -0.18098469f, 0.55771214f, + 0.041365836f, 0.0075924746f, 0.22691925f, 0.36468107f, + 0.09032505f, -0.045967441f, -0.37086007f, -0.89252973f, + 8.6670552e-05f, -0.11559016f, -0.28508955f, -0.022643689f, + -0.016810777f, -0.019490462f, -0.0010633101f, -0.71484035f, + -0.088997774f, 0.65093875f, 0.084810711f, 0.50678235f, + 0.022502962f, -0.057536311f, 0.036508501f, -0.11714479f, + 0.048986174f, -0.04199174f, -0.074932568f, -0.64357334f, + -0.030952711f, -0.077545159f, -0.001988353f, 0.0055152802f, + 0.5252918f, -0.091930628f, 0.049154978f, 0.018862635f, + -0.19108973f, -0.42104915f, -0.66428715f, 0.033908557f, + -0.031634815f, -0.080745205f, -0.12350164f, -0.11386545f, + -0.038549386f, -0.82489365f, -0.11851548f, -0.0025388247f, + -0.1387051f, -0.100948f, -0.11727837f, 0.076030999f, + -0.044966888f, -0.45697919f, -0.029460283f, 0.053581171f, + 0.044635855f, -1.1471258f, -0.21798912f, -0.22021903f, + 0.36839482f, -0.10257681f, 0.0032056237f, 0.32728827f, + -0.32679555f, -0.015992595f, -0.21892302f, -0.44739786f, + -0.1140606f, 0.31465328f, 0.23327847f, -0.37774172f, + -0.081769526f, -0.10673478f, -0.12319205f, 0.078226492f, + -0.11931137f, -0.087052308f, 0.11646243f, -0.015326788f, + -0.062837593f, 0.29435948f, -0.020985253f, -0.19531916f, + -0.010060692f, -0.2171198f, 0.215896f, -0.060643826f, + 0.10906668f, -0.84568387f, 0.033908855f, 0.12347803f, + -0.040433526f, -0.39997414f, -0.0092395702f, -0.053399824f, + -0.054062497f, -0.032369971f, 0.0097909532f, -0.023947529f, + -0.345456f, -0.12720664f, 0.074573621f, 0.041656896f, + -0.073625907f, 0.054323051f, -0.047540691f, 0.04180323f, + -0.33921915f, 0.5115177f, -0.012709193f, -0.090054214f, + 0.18135604f, -0.012373105f, -0.056829005f, 0.15838836f, + -0.033070851f, 0.12952025f, -0.369311f, -0.27673835f, + 0.29202154f, 0.11325553f, -0.14130242f, 0.014947598f, + -0.4132781f, -0.060090806f, -0.15204106f, 0.58773988f, + -0.21265332f, -0.010979277f, 0.03633447f, -0.15133438f, + 0.3067565f, -0.089902043f, 0.16732386f, 0.44214341f, + -0.09274473f, -0.049837384f, 0.34409618f, -0.03399219f, + -0.012640219f, -0.0019062137f, -0.2673474f, 0.071856186f, + -0.13634966f, 0.052159782f, -0.23577118f, -0.15954338f, + -0.25781372f, 0.025523331f, 0.03140204f, -0.066294789f, + 0.20567179f, 0.3255879f, -0.034971081f, 0.32986873f, + 0.13476248f, 0.10704937f, -0.033010367f, -0.027369441f, + -0.031479191f, 0.010602989f, 0.0094666034f, 0.022232641f, + 0.17480113f, 0.58024585f, -0.23572645f, 0.85355181f, + -0.046451185f, -0.15886016f, 0.010917327f, -0.36971828f, + 0.13278209f, 0.7426374f, -0.054109156f, -0.031007495f, + 0.26665387f, 0.029238772f, -1.1439831f, 1.5388279f, + -0.13697982f, -0.39672363f, 0.39613459f, 0.21325092f, + 0.018916395f, -0.35948268f, -0.14761502f, 0.58843327f, + -0.37133786f, 0.0081373965f, 0.67682034f, 0.49002281f, + 0.93141937f, 2.2761703f, -0.89595389f, 0.27506974f, + 0.11893924f, 0.6059258f, 0.76065189f, 0.67156518f, + -0.069893241f, -0.049767904f, -0.42388961f, -0.030185901f, + -0.021842688f, 0.0304121f, -0.61126435f, 0.34076151f, + 0.027315944f, 0.44200417f, 0.87198651f, -0.63095731f, + 0.031394277f, -0.026488066f, 0.061991602f, 0.015389082f, + -0.7968899f, -0.0047222651f, -0.011255117f, -1.39156f, + 0.68677992f, -0.21080224f, 0.085206598f, 0.032497935f, + 0.26650226f, 0.0014253618f, -0.060522083f, -3.1789269f, + -0.21918523f, 0.37951857f, 0.28817633f, 0.13830267f, + 0.026181454f, 0.39918271f, -0.0032471668f, 0.88193965f, + -0.21062559f, 0.11147624f, -0.058366101f, -0.055110291f, + 0.18883647f, 0.041314501f, -0.12506297f, 0.052628551f, + -0.13070765f, 0.31972888f, -0.15399079f, -2.4617276f, + 0.089222446f, -1.511976f, 0.01977781f, 0.57054031f, + -0.20105816f, -0.087459117f, -0.23046389f, -0.44384912f, + 0.47975838f, -0.015636686f, -0.023190372f, 0.55881834f, + 1.0415086f, 0.16011982f, -0.65591556f, 0.29571688f, + -0.071423836f, 0.02869796f, 0.27233586f, -0.66125834f, + 0.034895819f, -0.083390176f, -0.22062686f, -0.0096407486f, + -0.02546617f, -0.40892282f, -0.0016625248f, -1.0401609f, + 0.45678124f, -0.15948208f, -1.2571337f, 0.035428338f, + -0.08031445f, -0.41157252f, -0.0025361392f, -0.44133377f, + 0.18758667f, -2.8376644f, -0.0073177181f, 0.018630182f, + 0.022143969f, -0.077598974f, -0.065135084f, 0.026039518f, + 0.15680884f, -0.30824134f, 0.051484291f, 0.14780961f, + -0.048264857f, -0.070973366f, -0.0076616141f, 0.083222106f, + 0.036831088f, 0.15843545f, 0.029933063f, -0.0060234927f, + -0.32082537f, -0.017442659f, -0.094673678f, 0.088512354f, + -0.022087438f, 0.011823161f, -0.3170625f, 0.34258321f, + 0.034686241f, 0.13683227f, -0.051475313f, 0.19149557f, + 0.037191581f, -0.027092656f, -0.262054f, 0.040077858f, + 0.49709314f, -0.033908866f, 0.42109326f, -0.37103668f, + -0.31274021f, -0.11985938f, 0.055869721f, 0.19495448f, + 0.02991809f, 0.036892511f, -0.33248276f, 0.30264384f, + 0.041502334f, 0.02686201f, 0.033864852f, 0.062900968f, + -0.03638161f, 0.32382816f, -0.0052728662f, 0.22021227f, + 0.095382296f, 0.064176127f, -0.11442235f, -0.070716947f, + 0.20817639f, 0.093048446f, -0.039981131f, -0.33186433f, + -0.069366932f, 0.27207926f, -0.074059881f, -0.050451417f, + 0.20915659f, -0.073978022f, -0.093518116f, -0.0075220084f, + -0.216548f, -0.34226799f, -0.32743895f, -0.060718771f, + -0.044086162f, -0.74753976f, 0.026476512f, -0.45322981f, + -0.23359735f, 0.60263735f, -0.024121413f, 0.090156034f, + 0.60160321f, 0.068183064f, -0.3571215f, 0.13843761f, + 0.10017211f, 0.37730449f, -1.0723851f, -1.8805131f, + 0.051506739f, -2.4003088f, -1.5047879f, -0.09516634f, + -0.28708073f, -0.02673186f, -0.0068743434f, 0.8503325f, + 0.5532282f, -0.058967747f, 0.34939274f, -0.3736636f, + 0.51732415f, 0.11383957f, -0.38059014f, 0.24807924f, + 0.0080088917f, 0.063173354f, 0.77860284f, -0.16521893f, + -0.058717787f, 0.0034043696f, -0.24946415f, 0.024579048f, + 0.0022739016f, 0.3490828f, -0.049487419f, -0.52700359f, + 0.15264939f, 0.13279822f, -0.5801087f, 0.031472504f, + 0.0077018877f, 0.54949254f, -0.033038717f, 0.980331f, + 0.010973691f, -0.91519994f, 0.033324163f, -0.08013352f, + 0.15621659f, -0.024710126f, -0.077588648f, -0.033380251f, + 0.090357222f, 0.31646615f, 0.73632693f, -0.2920481f, + 0.062617905f, 0.0890157f, -0.055283971f, 0.14700952f, + 0.13267593f, 0.26326042f, -0.041309156f, -0.054097958f, + 0.32445711f, 0.00034308399f, 0.15225688f, -0.089172021f, + -0.095169418f, -0.23209362f, -0.32417288f, 0.22994894f, + -0.19223148f, -0.3254728f, -0.0019539606f, -0.30217826f, + -0.060414825f, -0.085194178f, 0.052194398f, -0.5726946f, + 1.2356108f, -0.034555983f, 0.0075988765f, 0.29342034f, + -0.22953999f, -0.12323862f, -0.8498652f, -0.20150366f, + -0.010350949f, -0.080276348f, 0.15441316f, -0.027279533f, + -0.080647878f, -0.088777386f, -0.062583625f, -0.19831119f, + -0.065156236f, 0.0069769509f, -0.13382119f, 0.19037223f, + -0.1019148f, -0.011187106f, 0.25062618f, -0.0043379306f, + -0.05377515f, 0.049797535f, 0.03351533f, -0.10420026f, + 0.07735958f, 0.20574163f, 0.054282475f, -0.060206819f, + -0.088059016f, -0.030068325f, 0.017515851f, 0.027257966f, + 0.19799745f, 0.35046116f, 0.97124749f, 0.043875381f, + -0.073912591f, -1.3589815f, 0.083201602f, 0.93762487f, + -4.6091461f, 0.20628701f, -0.069281809f, -0.025846548f, + 0.48273748f, -0.13320574f, -0.94015843f, -0.036991298f, + -0.0055573261f, 0.13469413f, -1.0826137f, -3.1072326f, + 0.014256765f, -1.6193044f, -1.7191246f, 0.72171777f, + -1.1593599f, -0.12028071f, 0.13643566f, 0.12723036f, + 0.085482046f, -0.087032937f, 0.34069902f, -0.26810825f, + -0.18196036f, 0.12054919f, 0.33190948f, 0.98711127f, + -0.060674567f, -0.025196863f, 0.40450698f, -1.2760451f, + 0.0086526005f, 0.029751578f, -0.027837785f, 0.96880782f, + -0.028977428f, -0.53839165f, 0.00076311623f, -0.94729f, + 0.60215992f, -0.057353355f, -0.36678332f, -0.10219928f, + 0.26384377f, -0.99845105f, -0.06012357f, -0.75263196f, + -0.015471349f, -2.2279098f, -0.015654461f, -0.10822397f, + 0.089770965f, -0.073609814f, -0.065358937f, -0.020090926f, + 1.8165741f, -0.44177297f, 0.31373987f, 0.10943626f, + -0.019735359f, -0.066037647f, 0.039335564f, -0.35776168f, + 0.31192279f, -0.49497852f, -0.088698283f, 0.0027434162f, + 0.87307495f, -0.058368295f, -0.72713953f, 0.33075947f, + -0.041833293f, 0.10786413f, 0.12021168f, 0.51638949f, + 0.32655165f, 0.11145121f, 0.013895479f, -0.67114162f, + 0.36997157f, -0.079571843f, 0.30079436f, -0.61653894f, + -0.338745f, 1.0444504f, -0.018168256f, 0.2337516f, + -0.48339495f, 1.0341949f, 0.65371621f, 0.19110063f, + -0.10154696f, -0.047133427f, 0.71078151f, -0.12082414f, + -0.051191233f, -0.094030529f, -0.51462561f, 0.79356509f, + -0.095900051f, 0.11212765f, 2.0340374f, 0.076174721f, + 0.50755101f, -0.039917257f, -0.10486105f, -0.041960362f, + 0.00017125542f, 0.085428864f, -0.10386462f, -0.24387336f, + 0.16395546f, -0.16066572f, -0.064769693f, -0.11203276f, + 0.2311358f, 0.012001342f, -0.0011265667f, 0.19181699f, + -0.32669559f, 0.31202328f, 0.20285396f, -0.27944198f, + -0.015201434f, -0.41100943f, 0.0663784f, 0.23657933f, + 0.46743038f, -0.52070791f, -0.11048251f, 0.021390833f, + -0.19860967f, 0.042939875f, 0.24980132f, -0.69802326f, + -0.081422254f, 0.11312445f, 0.1690467f, -0.24703625f, + -0.67206347f, 0.022109421f, 0.16094129f, 0.32609954f, + -0.058933984f, -0.10013467f, 0.19782908f, -0.31345046f, + 0.16307247f, -1.0292261f, -0.09351743f, 0.20699537f, + 0.058243938f, -0.53903443f, -0.21947825f, -0.26156858f, + -0.043637186f, -0.041585192f, 0.17595862f, -0.12351448f, + 0.070899896f, 0.023336269f, 0.35173139f, -0.10801589f, + -0.10997364f, 0.1110784f, -0.65039688f, 0.13270415f, + 0.12729289f, -0.071985781f, 0.13254876f, 0.023909606f, + -0.29408172f, -0.051264856f, -0.015472065f, 0.1071772f, + -0.30533385f, -0.059286721f, 0.060263775f, -0.093638763f, + 0.48850891f, -0.10139623f, -0.075987093f, -0.018699063f, + -0.018411567f, 0.24944775f, 0.1649124f, 0.074141636f, + -0.028963542f, -0.04651048f, 0.045502953f, 0.053250197f, + 0.23725362f, 0.13870187f, -0.083787061f, -0.023569815f, + 0.92127419f, -0.10689509f, -0.030041097f, 0.18981449f, + -0.058907498f, 0.24865019f, -0.03390184f, 0.18755056f, + -0.014077371f, 0.087317064f, 0.12247856f, 0.43950966f, + -0.16562356f, -0.055921022f, -0.37439358f, -0.14698087f, + -0.025298793f, -0.013686493f, -0.26493198f, -0.35979992f, + -0.080786385f, -0.26501381f, 0.35937929f, 0.060493059f, + 0.025977291f, 0.0018984376f, -0.066095658f, 0.11661971f, + -0.020524694f, 0.064751223f, 0.14461139f, 0.1640133f, + -0.10308011f, 0.20304389f, 0.031252105f, 0.071897253f, + 0.36734521f, -0.010913378f, 0.037822597f, -0.063047767f, + 0.010339777f, 0.074561551f, -0.061733056f, 0.22718535f, + -0.061427791f, 0.10794009f, 0.022301748f, -0.0052195713f, + -0.0079652276f, -0.13454258f, -0.083651759f, 0.00098887924f, + 0.41374883f, -0.033708148f, 0.11221488f, 0.18463024f, + -0.023688687f, -0.020520937f, -0.099653602f, -0.20784979f, + 0.12711711f, 0.15190597f, 0.051716805f, 0.0046168203f, + -0.16717909f, -0.0010157316f, 0.10685422f, 0.23980713f, + -0.011777636f, -0.083749197f, -0.23007481f, 0.14212672f, + -0.12410031f, 0.010500002f, -0.045776319f, -0.42464578f, + -0.32531899f, -0.062221657f, -0.15320992f, 0.071441628f, + -0.068475708f, -0.099945471f, 0.089233175f, 0.056867767f, + -0.19928737f, 0.5135271f, 0.38103488f, -0.12284078f, + 0.034620527f, 0.024201205f, -0.25031891f, 0.057368312f, + -0.020997787f, 0.024243435f, -0.029203203f, 0.23819859f, + -0.08181221f, 0.1446235f, 0.084189326f, -0.47072425f, + -0.12273841f, -0.035326481f, 0.021297457f, -0.0060140826f, + 0.28643626f, -0.13772942f, -0.087892845f, 0.19672102f, + 0.06835971f, 0.097044617f, 0.018027319f, -0.03073281f, + -0.087183326f, -0.01045509f, -0.0026354059f, -0.019873137f, + 0.11327863f, 0.30220866f, -0.46379858f, -0.027316498f, + -0.037700262f, -2.7149203f, -0.085213162f, -0.032817747f, + -0.63646013f, -0.32519656f, -0.028247932f, -0.066496909f, + 0.29579276f, -0.020647313f, -1.0548195f, -0.13307209f, + 0.054124452f, -0.94417816f, 0.73531425f, 0.018395014f, + -0.14966959f, -0.31009817f, -1.7295848f, -0.36488721f, + -1.3011451f, 0.043176316f, 0.27173907f, -0.0045247315f, + 0.10515811f, -0.0019273045f, 0.28572515f, -0.50810534f, + -0.97747952f, -0.20364343f, 0.47992295f, 0.23280698f, + 0.036854021f, -0.069137946f, -0.15263222f, -0.17454377f, + -0.076344945f, -0.075739026f, -0.06192676f, -0.012532431f, + 0.00077659846f, -0.46771747f, -0.012701865f, 0.067409143f, + -0.7136603f, -0.092412934f, 1.1545088f, -0.023889337f, + -0.0028748764f, -1.7924207f, -0.080656603f, -0.81815988f, + -0.13751028f, -1.0363584f, -0.1113492f, -0.12297907f, + 0.23963049f, -0.12809315f, -0.089448333f, -0.023514498f, + 0.11993003f, -0.29015848f, 0.50325984f, -0.026119241f, + 0.054748993f, 0.11138102f, -0.031406187f, 0.4331663f, + -0.27960995f, -0.14192049f, 0.020702034f, -0.022346159f, + 0.090919018f, -0.017161433f, 1.0820704f, -0.26815408f, + -0.066726491f, 0.59153992f, 1.3705389f, 0.57431453f, + 0.055103742f, -1.7561235f, 2.2833393f, 0.59466147f, + -0.22010964f, -0.11293369f, 0.53232133f, -0.47186577f, + 0.52457696f, 0.017759509f, -0.15011372f, 0.61946118f, + -0.78460425f, 0.03237918f, -0.40847641f, -0.14216635f, + -0.068328105f, 0.067362443f, -0.28723919f, -1.7890279f, + -0.066340566f, -0.0061328583f, -0.032529276f, -0.50614089f, + 0.032016549f, 0.025200944f, 0.035670251f, 0.42892447f, + -0.051678553f, 0.066648535f, -2.1280332f, 0.026947886f, + 0.052908175f, -0.32305175f, 0.0090133678f, -0.088729218f, + 0.026280142f, 0.57639408f, 0.018343763f, -0.086219221f, + 0.011528177f, -0.11477835f, -0.060906239f, 0.047933318f, + -0.071585536f, 0.29864421f, 0.2281055f, 0.062801801f, + -0.041224543f, -0.15209261f, -0.13409995f, -0.026991557f, + -0.29411542f, 0.35510671f, -0.056106884f, -0.094497412f, + 0.32628092f, -0.076545022f, -0.084254079f, 0.074253187f, + 0.020976787f, -0.24037983f, -0.05348181f, 0.12961268f, + 0.09347342f, 0.10668691f, 0.05002008f, 0.19835037f, + -0.23169179f, 0.0065316502f, -0.49880505f, -0.013974415f, + -0.14876699f, -0.065709241f, 0.083518632f, 0.068322182f, + -0.053781323f, -0.52248645f, -0.1076085f, 0.20207255f, + 0.012211255f, -0.10762402f, 0.21755491f, -0.15902133f, + -0.074965142f, -0.098453492f, -0.063346907f, 0.12458529f, + 0.016865894f, 0.095792085f, -0.067532651f, -0.16019222f, + -0.035414487f, -0.00069053192f, 0.1201297f, -0.053694922f, + -0.027672609f, 0.025208578f, -0.12209167f, -0.10271913f, + -0.044693884f, 0.091708802f, -0.047547445f, -0.0027104623f, + 0.047546018f, 0.0060287602f, -0.068302214f, 0.021599963f, + 0.2701039f, 0.12387545f, 0.48586631f, -0.014242838f, + -0.099928446f, 0.36180824f, -0.093309447f, 0.23569056f, + -0.52252573f, -0.041606843f, 0.044014424f, -0.060399517f, + 0.1385113f, 0.048667114f, -0.12392896f, 0.050376248f, + -0.056870762f, 0.06568791f, 0.062675856f, 0.14013307f, + 0.10989497f, 0.27125666f, -0.033811841f, 0.012184607f, + -0.061741009f, -0.065856941f, 1.1541305f, -0.029818887f, + 0.16978021f, -0.01465035f, 0.1876061f, -0.082702227f, + 0.26606157f, 0.75362784f, 0.1362426f, 0.26870069f, + -0.099637948f, -0.013359617f, 0.20980334f, 0.34061527f, + -0.1163531f, 0.029133044f, -0.1375123f, 0.2153265f, + -0.020309027f, 0.42620754f, -0.060355332f, 0.019974394f, + 0.17786454f, -0.035572167f, -0.06112437f, -0.080669962f, + 0.3365885f, 0.31460732f, -0.099903338f, 0.17181185f, + 0.10175198f, 0.18518992f, 0.01038577f, -0.0085329888f, + 0.085396104f, 0.033276465f, 0.023526175f, 0.039859399f, + 0.0088032139f, -0.60552871f, -0.094940886f, -0.060780078f, + -0.0030782449f, -2.5058024f, 0.042734068f, -0.15015028f, + 0.31861633f, 0.27284369f, -0.042176828f, 0.019643094f, + 0.0053510568f, -0.063717678f, -0.26212212f, 0.058761325f, + -0.077478409f, 0.51392668f, -1.3984368f, -1.0159374f, + 0.078261644f, -2.0211496f, -1.6609184f, -0.24945059f, + -0.68850744f, 0.024499968f, 0.28190455f, 0.99908388f, + 0.30959299f, -0.012000426f, 0.37611496f, -0.57514042f, + -1.1567661f, 0.26425749f, 0.80392557f, 0.32210508f, + -0.015179612f, -0.076126359f, 0.39979699f, 0.042871822f, + -0.0031159432f, -0.088339649f, -0.17406633f, 0.4630717f, + 0.04757889f, -0.088791363f, -0.040518954f, 0.32792839f, + -0.38754952f, 0.0011897294f, 0.082010448f, 0.018398905f, + 0.21496743f, 0.72965211f, -0.07355275f, 0.5231213f, + -0.1765891f, -0.53694755f, -0.057554193f, -0.017527521f, + 0.10045959f, 0.037354108f, -0.11577352f, -0.038011383f, + -0.12134761f, -0.2562829f, -0.3629573f, -0.023202179f, + -0.085269786f, -0.42989916f, 0.013622093f, 0.41372672f, + -0.34076154f, 0.21362899f, 0.0069170147f, -0.093222335f, + -0.46932316f, -0.016947452f, 1.300319f, -0.063528396f, + -0.082130633f, 0.46343902f, 0.68408537f, 1.0447047f, + -0.053108606f, -1.5710015f, 4.4550371f, 0.24157318f, + -0.18978634f, -0.023361206f, 0.036423329f, -0.84380376f, + 0.47321633f, 0.0023737305f, -0.13024056f, 0.86014181f, + -0.73495901f, 0.0062681101f, -0.82759744f, -0.054215644f, + 0.0062986086f, -0.028820001f, -0.30697986f, -0.44853547f, + -0.01312521f, -0.0086173741f, 0.09255483f, -0.57519066f, + 0.042885438f, -0.1982232f, -0.012250693f, 0.2276693f, + -0.38057244f, -0.048124861f, -0.75706828f, 0.063958764f, + 0.10374155f, -0.78331399f, 0.054370183f, -0.18471891f, + 0.056498699f, -1.4191947f, -0.031626392f, -0.020733245f, + 0.25802311f, -5.3440232e-05f, -0.021760033f, -0.015141505f, + 0.0085483771f, 0.0087802811f, 0.098154187f, -0.12725359f, + 0.015444007f, -0.89912027f, -0.070202172f, -0.093677655f, + -4.3970591e-05f, -0.11211503f, 0.0090523353f, 0.038563501f, + -0.073836029f, -0.091354482f, 0.055036917f, -0.047047298f, + -0.12404834f, -0.078838423f, -0.22427662f, -0.61612958f, + -0.12649818f, -0.25283852f, -0.016058017f, 0.096240558f, + -0.071283609f, -0.045197885f, -0.052814625f, 0.12953706f, + 0.091472067f, 0.0044974587f, 0.13832279f, -0.029746842f, + -0.25720921f, 0.2621544f, 0.28330037f, -0.16060819f, + -0.11464735f, 0.028814558f, -0.056717463f, -0.62318599f, + -0.012799f, -0.045367565f, 0.045142144f, -0.1045083f, + -0.067879677f, 0.12871975f, 0.014664381f, -0.21475078f, + -0.11464344f, -0.099776991f, -0.055190921f, -0.054580465f, + 0.20603448f, 0.082596131f, -0.10604522f, 0.1184534f, + -0.09107513f, -0.11857336f, -0.0067600389f, -0.097163714f, + -0.092023671f, -0.093436174f, -0.0085663395f, -0.033963192f, + -0.31803641f, -0.64607406f, -0.17111062f, -0.082599588f, + -0.019577293f, -0.61826289f, -0.0057732142f, 0.58025068f, + -0.5531233f, 0.052743226f, -0.058389314f, -0.069047697f, + 0.21586187f, -0.032912068f, -0.31364775f, -0.15878333f, + -0.13617714f, -1.3715703f, -0.7458272f, -3.0919991f, + -0.012165045f, -1.6941601f, -0.74016964f, 0.83216393f, + 0.29054913f, 0.037681092f, 0.33479142f, 0.76020843f, + 1.004066f, -0.0029882032f, 0.16184826f, -0.28118294f, + 1.1148052f, 0.087633327f, -0.033078767f, -0.18109573f, + -0.081082597f, -0.098427154f, -0.18982488f, 0.25343019f, + 0.046492036f, -0.10664488f, -0.2208181f, -0.4562645f, + -0.14079021f, -0.44225821f, 0.047114275f, -1.4332573f, + 0.097513646f, -0.022019899f, -2.2648797f, -0.037481379f, + -0.12576033f, -2.6721327f, -0.097371981f, 0.4905135f, + 0.070708737f, -1.8188096f, 0.022027932f, -0.078171156f, + -0.059363328f, 0.051208429f, 0.0098886462f, -0.0086130798f, + 0.13335125f, 0.3561694f, -0.12715399f, 0.11622442f, + -0.088984393f, -0.15813239f, -0.078941926f, 0.17063348f, + 0.075664826f, -0.66521537f, 0.03061041f, 0.011105163f, + 0.093841188f, -0.014679448f, -0.40733224f, -0.033424638f, + -0.16240473f, 0.13657472f, 0.70574319f, 1.0724293f, + 0.063476235f, -0.087558255f, -0.49086261f, 0.31880134f, + 0.096107692f, 0.024848428f, -0.13700642f, -0.38874286f, + -0.46514225f, 0.028056689f, 0.046591472f, -0.43235955f, + -0.36436731f, -0.1066218f, 0.48070735f, -0.2061131f, + 0.021329621f, -0.031296883f, -0.22938313f, 0.4288801f, + 0.0054864315f, 0.0055721407f, 0.19949172f, 0.15238662f, + 0.0085770031f, 0.046357498f, -0.02753986f, 0.01407886f, + -0.012720061f, -0.00072066666f, 0.45785689f, -0.09941221f, + 0.036580652f, -0.71058345f, -0.023872687f, -1.0476136f, + -0.14232497f, -0.30241409f, 0.0060457927f, -0.027256198f, + 0.062913246f, -0.076412037f, 0.031562574f, -0.0037905232f, + -1.2327539f, -0.31017068f, -0.057031639f, 1.3976822f, + 0.048310671f, 0.037920456f, -0.069616348f, 0.35335475f, + 1.5135983f, 0.62666065f, 0.0007556862f, -0.071652874f, + -0.56440324f, -0.095784806f, -0.34360337f, -1.9240252f, + -0.14419457f, -0.1117161f, 0.18725653f, 0.0013205055f, + -0.15703197f, 0.063169688f, 0.020190815f, 0.027662193f, + 0.25959614f, -0.12679856f, 0.34210694f, 0.35780057f, + 0.43565026f, 0.62555903f, -1.1405044f, 0.46961322f, + 0.48621899f, -0.56235433f, 0.30025536f, -0.39524311f, + -0.062207416f, 0.01921056f, -0.72722024f, 0.047114056f, + -0.036026884f, 0.037884351f, -1.4316436f, 0.19454548f, + -0.049306337f, 0.8597576f, -0.9783597f, 0.1832325f, + 0.14481026f, -0.16009058f, 0.27939492f, -0.092760034f, + -0.44636962f, -0.021828799f, -0.076180167f, -0.70740277f, + -0.26157853f, 0.14613907f, 0.032237623f, -0.10308491f, + 1.3053287f, -0.12101321f, -0.056209747f, -0.069793746f, + -0.37216568f, 0.0022626503f, 0.7181474f, 0.022359004f, + 0.052739982f, 1.046728f, 0.02212552f, 1.3294014f, + -0.57260323f, 0.49112129f, -0.02411212f, -0.014549642f, + -0.35620692f, 0.033417191f, 0.49654487f, 0.21655348f, + -0.058396313f, -0.10041489f, 0.032208189f, -3.0321178f, + 0.037912287f, -1.7360574f, 0.71514368f, 1.0789305f, + -0.12693369f, 0.033147715f, -0.11483756f, -0.86204815f, + 0.69723964f, -0.012466061f, -0.23030153f, 0.93387419f, + 1.3672816f, 0.19129124f, -0.99858433f, -0.077565268f, + 0.023365257f, -0.061181549f, -0.01115034f, -1.270547f, + -0.070288934f, -0.0060141324f, -0.012699419f, -0.44492453f, + -0.076076038f, -0.91155022f, 0.0096480055f, -1.8896163f, + 0.32375798f, -0.12320092f, -2.4741809f, -0.020266391f, + -0.11874742f, -1.237139f, -0.04413892f, -0.42367265f, + 0.18046735f, -1.7502683f, 0.015014771f, -0.10811576f, + -0.2091589f, -0.039111119f, -0.0092514539f, 0.074964643f, + -0.15852052f, -0.26989311f, 0.16280358f, -0.22807108f, + 0.0028883729f, 0.14782882f, -0.11394846f, -0.037083499f, + -0.14587033f, -0.20750472f, -0.10478958f, 0.023806836f, + 0.079605639f, -0.13563129f, -0.045624819f, -0.15524575f, + -0.10783405f, 0.22182843f, 0.35796154f, -0.074546956f, + -0.59210134f, 0.22307585f, 0.012598827f, -0.084026404f, + 0.45173934f, -0.094061531f, -0.07341972f, -0.38103294f, + -0.094557792f, 0.01553251f, -0.48106596f, 0.18815254f, + 0.29083154f, 0.064861663f, -0.1397981f, 0.12216692f, + -0.091159455f, -0.038171366f, 0.13258041f, -0.068137594f, + 0.054173924f, 0.013508563f, -0.043082122f, -0.19265425f, + -0.074234299f, -0.1972913f, 0.05270151f, 0.50391757f, + 0.34234208f, -0.019569088f, -0.028202973f, -0.08519619f, + -0.011151998f, -0.072498724f, -0.021945907f, -0.042735945f, + -0.14353442f, 0.10598855f, 0.046218585f, -0.073147506f, + -0.20707443f, -0.061039414f, -0.072266355f, 0.033453532f, + -0.29723692f, -0.15491922f, -0.55107999f, -0.060469858f, + 0.004160291f, -0.094175749f, 0.030313326f, -0.68985432f, + 0.45872372f, 0.49328989f, 0.018753828f, -0.09197171f, + -0.18955313f, -0.12351063f, 0.20808695f, -0.22102624f, + -0.082320318f, 0.091820136f, -0.30470327f, 0.017078765f, + -0.13794363f, -0.086603314f, -0.60653967f, 0.3847957f, + -0.21860009f, -0.079446457f, -0.4590759f, 0.43126872f, + 0.37910295f, -0.055717759f, -0.25866231f, -0.68742603f, + 0.055885743f, 0.18267605f, -0.27327737f, -0.31813997f, + -0.06444867f, -0.066543669f, -0.92734176f, -0.13916941f, + -0.038882237f, -0.12230433f, -0.16096558f, -0.37857831f, + -0.0088313557f, -0.61151135f, 0.10344137f, 0.7682364f, + -0.033951961f, -0.094445646f, 0.086845912f, 0.041396193f, + -0.074310839f, 0.044669703f, -0.083412454f, -0.091159433f, + -0.22466017f, -0.22361657f, 0.091038443f, -0.032845218f, + -0.50398171f, -0.05356928f, -0.03163268f, -0.033851627f, + 0.22566949f, 0.46968403f, 0.91328049f, 0.12429783f, + -0.080485761f, -0.13954337f, -0.033490717f, 1.4136647f, + -0.8618871f, 0.15979533f, 0.050244216f, -0.059029378f, + 0.024705932f, -0.099983461f, 0.015904581f, -0.050612904f, + -0.044198636f, 0.13008538f, -0.16183187f, -2.3356886f, + 0.10744064f, -0.43375036f, -0.46851462f, 1.1085918f, + -0.73921466f, -0.078635968f, 0.22476332f, -0.58178008f, + 0.61359948f, -0.005408946f, 0.31964731f, 0.21369061f, + 0.16820727f, 0.016396282f, -0.092245132f, 1.1365739f, + 0.020447437f, -0.074628472f, -0.025958268f, -1.1878029f, + -0.12875456f, -0.074188098f, -0.10817607f, 0.32213265f, + -0.093324319f, -0.61054415f, -0.034469735f, -1.0486958f, + 0.70031369f, -0.057118785f, -1.3868142f, -0.11050398f, + 0.22186136f, -1.1241394f, -0.032272544f, -1.314553f, + 0.12461092f, -2.1759012f, 0.065875262f, -0.016627496f, + 0.063032761f, 0.051779237f, -0.048163433f, 0.0081073698f, + 0.087084696f, 0.18262646f, -0.64155751f, 0.0056975763f, + -0.053032618f, 0.99011797f, 0.002444631f, 0.3386538f, + 0.18233834f, -0.15587364f, 0.010973314f, -0.10813448f, + -0.59636271f, 0.043623004f, 1.1545681f, -0.069147766f, + 0.063460648f, -0.880943f, 0.47743642f, -0.96603328f, + 0.019325377f, 0.67420793f, 0.77603233f, 0.266179f, + 0.16943702f, -0.050350308f, -0.17783859f, -1.0511363f, + 0.65794533f, -0.025684832f, -0.0055766986f, 0.35595372f, + 0.47426346f, -0.041878045f, -0.39591748f, 0.40139759f, + 0.0054422985f, -0.029043209f, -0.34627733f, 0.59653491f, + -0.00059445715f, 0.035214446f, -0.20035081f, -0.52376485f, + -0.024508219f, 0.58469093f, 0.049639821f, -1.102283f, + 0.50248563f, -0.036427986f, -1.2533284f, -0.03191964f, + -0.089410111f, -2.3010967f, -0.051766198f, -0.36242512f, + 0.13420716f, -1.9240879f, -0.044232443f, 0.033381663f, + -0.088931151f, -0.066935681f, 0.015549511f, 0.049213793f, + 0.20501722f, 0.42691022f, -0.69299215f, 0.0080372524f, + -0.022205364f, 1.4833902f, 0.05968409f, 0.33235177f, + -0.28160179f, -0.53590739f, 0.017453888f, 0.03467527f, + 0.19471815f, 0.015505216f, -0.078515604f, 0.0043513556f, + 0.033073805f, -0.8355453f, 0.70667124f, 0.87541878f, + 0.05680931f, 0.45115045f, 0.8830905f, 0.10028797f, + 0.33369586f, -0.041970156f, -0.12234771f, -0.61420059f, + 0.025236068f, 0.013524517f, -0.14602393f, 0.11467069f, + 0.58542836f, 0.19925314f, -0.66485369f, 0.33546835f, + -0.02372149f, -0.071531139f, -0.11570048f, 1.3150827f, + 0.045317244f, -0.072770633f, -0.25078359f, -0.10634013f, + 0.012322004f, 0.011793093f, 0.0034738432f, 0.328008f, + 0.99772793f, -0.17989404f, 0.83817232f, -0.055148251f, + -0.39882606f, -1.1055508f, -0.098209873f, -0.37648007f, + 0.16408248f, -4.2870083f, -0.032786064f, -0.035185784f, + 0.071303464f, 0.056586161f, -0.0102283f, 0.019899108f, + -0.33970413f, 0.026075061f, 0.94260383f, -0.002638838f, + 0.016538396f, -0.072470635f, 0.068477921f, 0.73598993f, + -0.38159266f, -0.26748708f, -0.042671207f, 0.038284399f, + 0.66999388f, -0.084983587f, -0.94507021f, -0.0013545427f, + -0.085426144f, 0.9275943f, 0.33825028f, -1.1086175f, + 0.029845696f, -0.48274484f, -0.093353078f, 0.46839401f, + -1.1612732f, -0.017587833f, -0.12080318f, -0.16350619f, + -0.75893199f, 0.016818887f, -0.22514565f, 0.10042477f, + -1.005684f, 0.084151775f, -0.059056647f, 0.079061121f, + -0.093319304f, -0.13335343f, 0.35890228f, -3.8221745f, + -0.039884169f, -0.0081631569f, 0.046000101f, 0.50115621f, + -0.10605948f, -1.7723382f, -0.13081883f, -1.1613529f, + -0.33706647f, 0.010509137f, -0.29536393f, 0.043913841f, + 0.025351025f, 0.18824227f, -0.10798408f, -1.7501837f, + -0.026348282f, -0.36916584f, 0.002999997f, -0.0045595965f, + -0.059345011f, 0.016923431f, -0.019197743f, -0.07253325f, + 0.018025959f, -0.27013037f, -0.54414803f, -0.054731525f, + -0.048933856f, 0.083960824f, -0.017134074f, -0.23874113f, + -0.44740644f, 0.040651787f, -0.056705918f, -0.05288716f, + -0.08027754f, -0.035587378f, -0.10976227f, -0.061747156f, + 0.014365115f, -0.16850215f, -0.025989966f, 0.052553922f, + -0.086240768f, -0.0076078754f, 0.098464034f, -0.30901372f, + 0.070256069f, 0.019705854f, -0.34421238f, -0.001213617f, + -0.044930629f, -0.014529869f, -0.22576371f, 0.052993417f, + -0.060206164f, 0.34242609f, -0.057777286f, -0.050418139f, + -0.031795271f, -0.020601233f, 0.40329227f, -0.30246958f, + 0.015356916f, -0.040808856f, -0.037358742f, 0.10118619f, + -0.13249859f, 0.095776789f, -0.064637892f, -0.16172002f, + 0.076803096f, -0.057621866f, 0.1041385f, -0.013111176f, + 0.26209205f, -0.28461656f, 0.011170364f, 0.0012598373f, + -0.0020921747f, 0.051144805f, -0.062569268f, -0.11734702f, + -0.41494212f, -0.029276673f, -0.086622268f, -0.018866112f, + 0.17144823f, 0.47775388f, 0.12532753f, 0.16340046f, + -0.038712271f, 0.22285321f, -0.080740437f, 0.022263478f, + 0.15496585f, 0.14634161f, 0.044811897f, -0.14116012f, + 0.0044657462f, -0.052894555f, 0.1956041f, 0.12216938f, + -0.060581688f, -0.10084961f, 0.039961576f, 0.1051508f, + -0.026012389f, 0.1557228f, -0.027120376f, -0.13790223f, + 0.14335988f, -0.092406571f, 0.12246277f, 0.073349595f, + -0.30750936f, -0.17660944f, 0.073859669f, 0.021806819f, + 0.28640017f, -0.43587691f, -0.34530216f, 0.27296597f, + -0.056645494f, -0.054894462f, 0.28112853f, 0.20245969f, + -0.048326433f, 0.04555621f, 0.36103565f, -0.2568208f, + 0.027268011f, 0.55690229f, 0.028111076f, 0.07832361f, + -0.10333095f, -0.0389507f, 0.007711879f, 0.0075840084f, + 0.22226204f, 0.037506174f, -0.051421035f, 0.11127028f, + -0.03307756f, 0.14749166f, -0.091795199f, 0.012897591f, + 0.043295801f, -0.071607925f, -0.065321073f, -0.006247994f, + 0.02322193f, 0.37990043f, -0.67292434f, 0.051225156f, + -0.065843977f, 0.074960433f, -0.17388983f, 0.022204749f, + 0.025632037f, -0.37841326f, 0.040422402f, -0.038695134f, + 0.33106825f, -0.077702239f, -0.29197025f, 0.05656274f, + -0.060745168f, -0.67040759f, -0.21620995f, 0.21379542f, + 0.098386563f, 1.2788368f, -1.0046055f, -0.053566497f, + 0.40156275f, -0.038901746f, -0.045954045f, 0.074224494f, + -0.16794199f, -0.01161437f, -0.068821631f, 0.016328247f, + 0.33180848f, 0.080369011f, -0.063167877f, 0.14789663f, + 0.023408584f, -0.0424225f, 0.34211868f, 0.40792659f, + -0.062469281f, -0.12203625f, -0.040938899f, 0.35136464f, + -0.085075699f, 0.11637149f, -0.043316025f, 0.27365789f, + 0.38382977f, -0.16685995f, 0.6921733f, 0.017096916f, + -0.0057647703f, -0.87845308f, -0.027346913f, 0.18493432f, + 0.014058728f, -4.0578961f, -0.078072868f, -0.048718058f, + -0.073189937f, -0.0090905987f, -0.016830374f, 0.013425765f, + -0.14227715f, 0.26310891f, 0.17784292f, 0.27716425f, + 0.037435811f, 0.24252984f, 0.045651618f, -0.084843367f, + 0.34028077f, 0.16999665f, 0.011471114f, -0.035851251f, + 0.0017178291f, -0.088648446f, -0.18190242f, 0.1515844f, + 0.0017869388f, -0.086183414f, -0.24826139f, 0.28254682f, + 0.20495071f, 0.18597347f, 0.0061889184f, -0.1467312f, + -0.12144526f, 0.024604093f, 0.32722533f, 0.43314525f, + 0.2383417f, -0.12076419f, 0.1921525f, 0.16251379f, + 0.1450928f, -0.29710236f, 0.009185263f, 0.17299077f, + 0.018589349f, -0.02714164f, 0.19055033f, -0.059560947f, + 0.015844686f, 0.0056248358f, 0.3013773f, 0.26723102f, + 0.044358037f, -0.20559587f, 0.071396373f, 0.28729153f, + -0.27509895f, -0.099516407f, 0.011675824f, -0.072288118f, + -0.0029445076f, 0.22832242f, -0.08608105f, 0.32955873f, + 0.0024061892f, 0.28148818f, 0.03024775f, -0.13989224f, + 0.20570785f, -0.044548862f, -0.10030151f, 0.029822215f, + -0.6084286f, -0.91474372f, -0.5575906f, 0.15710703f, + -0.095390141f, 0.18842088f, 0.024838321f, 1.0713129f, + 0.24334092f, 1.055753f, -0.00156241f, -0.084767371f, + -0.37877613f, 0.0097615095f, -0.0093210405f, -0.15986437f, + -0.067080401f, 0.041063927f, -0.7156015f, 0.29381129f, + 0.16315371f, -0.086805709f, 0.35725969f, 0.0075707943f, + 1.1448077f, -0.11020323f, 0.12825142f, 0.9550842f, + -0.4846943f, 0.61099535f, 0.25021029f, -1.3803674f, + 0.056266733f, -0.156698f, 0.22116576f, 0.52692282f, + -0.076911263f, -0.018868001f, -0.079544723f, -0.26240352f, + 0.005559634f, -0.015383162f, -0.24494973f, 0.32668489f, + -0.03761683f, 0.48375359f, -3.0430169f, -0.024909258f, + -0.76250237f, 0.06373325f, -0.067434691f, -0.042564876f, + -0.50535762f, 0.47875214f, 0.034804199f, -0.32520947f, + 0.1274088f, 0.13107622f, -0.037669279f, -0.029787172f, + -0.11067053f, -0.043046169f, 0.036710631f, -0.10968573f, + -0.12700187f, -0.27663299f, 0.13223436f, -0.56639409f, + -0.076162651f, 0.13750058f, 0.0099166036f, -0.2132117f, + 0.03076897f, -1.9804878f, -0.093586527f, 0.003092193f, + 1.270715f, -0.031860765f, 0.69802922f, -3.0704451f, + -0.06488356f, 0.6803413f, 1.092224f, 0.39775962f, + -1.1066754f, -0.19012076f, -0.20947494f, -0.56219077f, + 0.32063201f, -0.053936031f, 0.10180421f, 0.99247468f, + 0.24917977f, -2.7904978f, -3.7618682f, 0.33899513f, + 0.63848108f, -0.22088979f, -0.32334369f, 0.26254132f, + 0.0034765967f, 0.02176642f, -1.0382297f, 0.20340998f, + 0.062408429f, -0.055261075f, -2.7928948f, 0.25211352f, + 0.029983442f, 0.55527443f, -4.0123873f, -0.56294686f, + -0.26350129f, -0.16916883f, 0.31476098f, -0.052130584f, + -0.25658077f, 0.32334065f, 0.0077887946f, 0.92708939f, + -4.1093283f, -0.031807706f, -0.065087453f, -0.11724345f, + -1.4329386f, 0.027760746f, -0.094431303f, -0.026346136f, + -0.049786851f, 0.092506208f, 0.1070324f, 0.08425013f, + -0.079548538f, 0.2267828f, 0.071275227f, 0.37065044f, + -0.00023569088f, 0.32568231f, -0.079712912f, -0.021177033f, + -0.3111316f, -0.043440588f, -0.054754194f, 0.13556106f, + -0.11313973f, -0.16117485f, 0.25889945f, 0.29172531f, + 0.020590313f, 0.014139121f, -0.15618423f, 0.07175637f, + -0.17649904f, 0.07563097f, 0.23382486f, 0.35483748f, + 0.48957032f, 0.15318048f, 0.13569438f, 0.26625592f, + 0.38458908f, -0.18883523f, 0.25804266f, 0.13419002f, + 0.037401449f, 0.010628991f, -0.30732459f, 0.21977299f, + 0.050515063f, -0.070045158f, 0.047530752f, -0.16405764f, + 0.0028993832f, -0.14975674f, 0.049211357f, 0.24790029f, + 0.30944192f, -0.14243987f, 0.18584889f, -0.12271219f, + 0.08161547f, 0.062145706f, -0.054781057f, 0.10777546f, + 0.38482192f, 0.057886068f, -0.084419407f, -0.081561565f, + -0.4221091f, -0.10426192f, -0.030376121f, 0.15955013f, + 0.095885746f, 0.21947211f, 0.27718687f, -0.019434243f, + -0.089904748f, -0.15912169f, -0.020923374f, 0.12232505f, + -0.10931528f, -0.37612134f, -0.10367569f, -0.051561579f, + 0.59231615f, -0.084360465f, -0.14700235f, -0.34035879f, + -0.029519791f, 0.29386374f, 0.043930277f, 0.065046042f, + 0.11595199f, -0.19982634f, -0.01329114f, -0.5027011f, + 0.18653396f, -0.048614807f, -0.05088453f, -0.12927157f, + -0.25194976f, 0.012538667f, 0.1163491f, 0.1336107f, + 0.13820086f, 0.006270065f, 0.62238187f, -0.34098512f, + 0.0067915181f, -0.10963203f, 0.021742437f, 0.14592595f, + -0.065839626f, 0.027110318f, -0.18937095f, 0.61653757f, + -0.0281494f, -0.23897907f, 0.01569166f, 0.58353692f, + 0.062364947f, -0.050666418f, -0.24202712f, -0.0044766911f, + -0.11156211f, -0.19983038f, -0.1020751f, -0.10729793f, + 0.26759663f, -0.31911412f, 0.034653757f, -0.0011933419f, + 0.17186439f, 0.018821282f, -0.048379555f, -0.033069216f, + -0.28616828f, -0.13398957f, -0.14275511f, 0.038295161f, + 0.006101869f, -0.053522088f, -0.15445405f, -0.17072649f, + -0.2162919f, 0.034825943f, -0.072240405f, -0.01286279f, + 0.016643653f, 0.030869624f, 0.35550025f, -0.0065630656f, + 0.015607527f, 0.1778321f, 0.05624079f, 0.27765062f, + 0.047417969f, 0.15766636f, 0.22633761f, 0.11103354f, + 0.2776286f, -0.045517344f, -1.1825643f, 0.10975068f, + -0.20181897f, 0.11098579f, 0.075761601f, 0.24720849f, + 0.074220076f, -0.87110102f, 0.27208278f, -0.12333182f, + -0.052533131f, 0.032511331f, 0.1395694f, 0.2227847f, + -0.10626028f, 0.065350495f, 0.036480393f, 0.1847923f, + -0.14427795f, 0.047005109f, 0.083512895f, 0.17228453f, + 0.11741441f, -0.078615189f, 0.058475111f, -0.022242114f, + -0.088133894f, 0.23631844f, 0.010024169f, -0.13446558f, + 0.16757274f, 0.11797021f, -0.072204717f, -0.030137166f, + -0.013189073f, -0.031281903f, -0.13051216f, -0.017340846f, + -0.17793754f, 0.13914965f, -0.7088542f, 0.12372472f, + 0.05465246f, -0.008983653f, 0.067610316f, -0.052280422f, + 0.030749908f, 0.23195696f, -0.10057241f, 0.0130987f, + -0.82402885f, -0.086276069f, 0.041489832f, 0.11441323f, + 0.054433245f, -0.010246133f, -0.13764526f, 0.19801894f, + 0.039391302f, 0.15793599f, -0.0024961985f, -0.74322474f, + -0.018767204f, -0.069690779f, -0.48508009f, 0.60090816f, + -0.26355487f, 0.034141552f, 0.30398113f, 1.1631874f, + 0.093482442f, 0.30450442f, -0.30725843f, -1.0129858f, + -0.066773675f, -0.075756833f, 0.42901531f, -0.17272873f, + -0.06389831f, -0.082330734f, 0.10110199f, -0.33234793f, + 0.019411886f, 0.17178525f, -0.010571993f, -0.53850156f, + 0.1509245f, -0.13337044f, 0.0041126548f, 0.04714869f, + -0.0019118455f, 0.26056394f, -0.07746087f, -0.31174168f, + 0.004901641f, -0.15405387f, -0.072507985f, -0.077580445f, + 0.18434383f, 0.032994401f, -0.075124159f, 0.005246412f, + 0.11913445f, -0.13110405f, -0.098348387f, -0.033475284f, + 0.019625999f, -0.25714177f, -0.027495963f, 0.0086067645f, + 0.4535194f, -0.45283443f, 0.01460854f, 0.015356762f, + 0.0026075661f, 0.028994882f, -0.080502078f, -0.041417081f, + -0.13491417f, 0.06997361f, 0.047545522f, -0.058066983f, + -0.059445266f, -0.16838586f, -0.046690833f, 0.032490812f, + -0.16262849f, -0.078763075f, 0.62103605f, 0.078432627f, + 0.13109654f, 0.0052289111f, -0.012487362f, -0.12620935f, + 0.089354388f, 0.43151176f, 0.23612323f, -0.045056898f, + -0.090774924f, -0.11889718f, 0.12347053f, -0.058299616f, + -0.11450285f, -0.015817685f, -0.01610963f, 0.040945165f, + 0.055435892f, 0.27311528f, 0.04288736f, -0.018936325f, + 0.2450683f, -0.051742449f, 0.0059147528f, 0.037465423f, + -0.1529015f, -0.17042655f, -0.10502427f, 0.27532986f, + -0.024335656f, -0.0088817505f, -0.031228615f, -0.045406654f, + -0.14637673f, -0.12959422f, -0.073566891f, -0.016931908f, + -0.057633843f, -0.054453343f, 0.24055262f, -0.057345737f, + -0.053702075f, -1.0009429f, -0.13196546f, 0.014657919f, + 0.2942363f, 0.61423182f, -0.075493544f, 0.0068099522f, + -0.52523363f, -0.034813128f, 0.13704145f, 0.025503624f, + -0.0056664264f, -0.17608483f, 0.13523717f, -1.6788685f, + -0.065498777f, -0.40496302f, -0.3430967f, -0.15374826f, + -0.84628403f, -0.074271761f, 0.023710653f, 0.36234081f, + 0.18928857f, -0.021363437f, 0.24202324f, -0.49966177f, + -0.08842887f, -0.1337958f, 0.62912571f, 0.52259886f, + -0.021614484f, -0.079827555f, -0.36116943f, -0.76370305f, + 0.041194476f, -0.084721006f, 0.030246966f, -0.15893973f, + -0.03065997f, -0.09847869f, -0.088939264f, 0.13951112f, + -0.53623056f, -0.11312396f, -0.38343051f, 0.016538544f, + 0.4343901f, -0.37149248f, -0.10749337f, 0.049773965f, + -0.062688567f, -2.1855333f, -0.0033760301f, -0.10001893f, + 0.11167101f, 0.045032397f, -0.068210229f, 0.0070732483f, + 0.066700257f, -0.21372485f, 0.18269914f, -0.046218511f, + -0.0038519825f, -1.1366165f, -0.041731209f, -0.013658674f, + 0.12127063f, 0.31271574f, -0.094790258f, -0.040548384f, + -0.38814765f, -0.051121242f, 0.87043589f, -0.07677874f, + -0.052367285f, -0.2513957f, -0.75978434f, 0.34109643f, + -0.0018600909f, -0.31825647f, -0.32009664f, 0.34142116f, + -0.21213628f, -0.078936748f, 0.36305737f, -0.081842527f, + 0.74195892f, -0.0050165798f, 0.3636657f, 0.010038089f, + -1.1036958f, 0.061471201f, 0.15678406f, -0.41091111f, + 0.033262469f, 0.0064020539f, -0.45745096f, 0.88252056f, + -0.0069079455f, 0.011408147f, 0.0091916984f, -0.15971902f, + -0.1125019f, 0.20670152f, 7.9708101e-05f, 0.62114286f, + -0.28606743f, -0.11446913f, -1.5323354f, -0.0079616848f, + 0.016605711f, -0.26087967f, 0.05691674f, 0.70714211f, + 0.011733172f, 0.17465653f, -0.084311672f, -0.083061412f, + 0.011945603f, -0.010543756f, -0.084723003f, -0.020598715f, + 0.13476476f, 0.27550146f, 0.50162846f, 0.095822088f, + 0.051198255f, -0.28764865f, -0.085659266f, 0.51750988f, + -0.49390465f, 0.42652246f, -0.0062326882f, -0.12113991f, + -0.36385697f, -0.10172484f, 0.23052627f, -0.0034322529f, + -0.020358063f, -0.22124767f, 0.026432874f, -0.22662801f, + 0.045354303f, -0.24373992f, 0.0037235108f, 0.2409707f, + -0.27941617f, 0.034756318f, 0.56543535f, -0.34859869f, + 0.25415748f, 0.035227917f, 0.49575254f, 0.226864f, + -0.30951232f, 0.059466224f, -0.18819183f, -0.35011333f, + 0.037979681f, -0.072131626f, -0.068325624f, 0.30688986f, + -0.046105407f, -0.025762025f, -0.075989693f, 0.046363123f, + -0.020881159f, -0.15412733f, -0.062701084f, 0.030335501f, + -0.14105557f, 0.0026219336f, 0.1697346f, -0.068272337f, + 0.030603658f, 0.26893586f, -0.034346443f, -0.12632817f, + 0.21926209f, -0.32323369f, -0.0037322857f, -0.039721191f, + 0.33655351f, 0.005381017f, -0.0087460596f, 0.03857515f, + 1.300068f, 0.88368869f, 1.7790836f, -0.21379875f, + 0.073240876f, -0.60700285f, 0.023819594f, -3.2354846f, + 1.3246882f, -3.1267869f, -0.043492191f, -0.059265353f, + 1.4825362f, 0.11800591f, -0.45600793f, 0.75192821f, + -0.020045962f, -0.21208093f, 0.10645804f, -1.0345907f, + -0.26220915f, -0.022064488f, -0.51427495f, -1.1270713f, + -4.9363012f, 0.01741744f, 1.469462f, -3.2710311f, + 0.39698824f, 0.46357593f, -0.38004938f, 2.5106604f, + -1.8270977f, 3.267401f, -0.13015632f, -2.783603f, + -0.086977169f, -0.031354889f, 1.4545288f, 0.84215248f, + -0.024043467f, -0.026771752f, -0.11129373f, 0.4317365f, + -0.060114387f, -0.24960469f, 4.6731243f, -2.4958839f, + 0.60445368f, -0.022586476f, -0.053056795f, -0.1006262f, + 2.642297f, -1.7055357f, -0.075939104f, 1.3433661f, + -0.10020057f, -0.47010881f, -0.091422059f, -0.094537124f, + 0.65428382f, -0.047100913f, 0.04296384f, -0.0040477421f, + 0.2508685f, -0.2228974f, -0.32467014f, -0.054795198f, + -0.060900867f, -1.6867628f, 0.014182626f, -0.94948107f, + 0.42415968f, 0.50153065f, -0.030238325f, -0.020633282f, + 0.40262619f, -0.096869364f, -0.78165269f, 0.17041337f, + 0.038574912f, 0.26654607f, -0.70276493f, -0.1294712f, + -0.026410569f, -1.4579649f, -2.0587461f, -0.71018845f, + -0.65402991f, -0.060170051f, -0.039633121f, 0.96106976f, + 0.023390453f, -0.0058451388f, 0.22058751f, -0.94130844f, + -0.53915024f, 0.011504969f, 0.16073443f, 0.29111075f, + -0.098946035f, -0.012021761f, 0.46428391f, -0.50601202f, + -0.075294115f, 0.048309274f, -0.15648773f, 0.176937f, + -0.042092483f, 0.71093833f, -0.034671057f, 0.99557781f, + -0.10896906f, -0.15597101f, 2.995162f, -0.097588621f, + 0.098174483f, 1.0675396f, -0.033689074f, 0.84866357f, + -0.17393157f, 0.34309652f, -0.051637813f, -0.042715974f, + -0.056031805f, -0.014935879f, 0.0093663223f, -0.032225516f, + 0.046978656f, -0.11762147f, -0.50017887f, -0.08691144f, + -0.0022573809f, 0.064877085f, -0.086381219f, -0.12635309f, + 0.37438303f, -0.00090550323f, -0.030320009f, -0.087040462f, + -0.10049476f, -0.10695878f, 0.2246356f, -0.090910874f, + -0.00092836184f, 0.068939447f, 0.073995151f, -0.027328845f, + -0.051009946f, -0.0071875216f, 0.08807677f, -0.089074858f, + 0.025327001f, -0.10029274f, -0.34811124f, 0.43265858f, + 0.020725448f, -0.035046488f, -0.084967345f, -0.36726516f, + -0.17857879f, 0.29308024f, -0.33727497f, 0.63649595f, + 0.070213951f, -0.059896939f, 0.08885961f, 0.041790526f, + -0.0096026203f, 0.042125683f, -0.16517814f, -0.12186266f, + -0.061543699f, 0.078289419f, -4.4446402f, -0.269068f, + -0.11119478f, -0.13334171f, 0.035869472f, -0.094075367f, + 0.028149011f, 0.029487792f, -0.12203489f, 0.40705189f, + 0.044622883f, 0.10044339f, 0.096928582f, 0.012590479f, + -0.33626989f, -0.0016228746f, -0.020348122f, 0.012012934f, + 0.20802163f, 0.03987604f, -0.050222058f, 0.44742039f, + -0.076190315f, 0.16770597f, 0.027559595f, 0.0040790425f, + -0.010017638f, -0.41218615f, 0.040964346f, 0.028802473f, + 1.1706314f, 0.026401056f, 0.44485798f, 0.049465176f, + 0.010526589f, -0.13380353f, 0.020738227f, 0.093899839f, + -0.21789984f, 0.09179543f, 0.0010709245f, -0.0036882085f, + 0.19300072f, -0.070333712f, -0.17888886f, -0.67423809f, + -0.45097959f, -0.6710692f, 1.3279614f, 0.57057261f, + -0.05160813f, 0.40039873f, 0.27649909f, 0.23375373f, + 0.01067217f, -0.091031171f, -1.1385528f, 0.086235031f, + 0.013188956f, -0.10991143f, 0.73865122f, -0.51499689f, + -0.048267484f, 0.22422761f, 0.15996101f, 0.082745351f, + 0.080702864f, -0.00062223448f, -0.27882481f, 0.016926473f, + -0.087930568f, -0.057320777f, -0.083190478f, 0.8553502f, + 0.16781738f, -0.0169532f, -0.050118912f, 0.014267256f, + -1.3540373f, 0.025718523f, -0.11326013f, 0.63258594f, + 0.057723284f, -0.16599168f, -0.22018111f, -0.30793071f, + -0.02778448f, 0.061582707f, -0.0073084864f, -0.13337275f, + -1.0399344f, 0.53843176f, -0.002813434f, 0.00055321626f, + -0.34497032f, 0.0060953959f, 0.034739975f, 0.4832277f, + -0.094333127f, 0.21988149f, -0.2376761f, 0.050213337f, + -0.24952951f, -0.047514655f, -0.10417998f, -0.12455335f, + 0.13691244f, -0.036326453f, -0.49429891f, 0.30354986f, + -0.12416631f, 0.38761458f, -0.0052919211f, 0.019173013f, + 0.055385657f, -0.12715869f, -0.0081797f, 0.42289969f, + -0.018679939f, -0.098876119f, -0.090165466f, 0.060637046f, + 0.012341676f, 0.0024825577f, -0.13882881f, -0.30740687f, + -0.083789788f, -0.013111246f, -0.086845733f, 0.20825f, + 0.17740637f, 0.037536811f, -0.079467528f, -0.041004248f, + 0.047278676f, 0.094046593f, -0.056663726f, -0.087634109f, + 0.21505502f, 0.004491623f, 0.014738492f, -0.039122038f, + -0.45852017f, -0.036510132f, -0.077375606f, 0.048258588f, + 0.11258242f, -0.11517857f, 0.18180187f, 0.10758348f, + -0.037191339f, -0.048536547f, -0.076692238f, 0.077917881f, + 0.3253628f, 0.13795386f, -0.00035974474f, 0.020090038f, + 0.17890815f, -0.075518683f, 0.14144289f, 0.091133706f, + -0.065173678f, -0.17711288f, 0.18779023f, -0.087350227f, + 0.28758678f, 0.044530421f, 0.0078270799f, 0.22517158f, + -0.17587094f, 0.038786139f, 0.025324831f, 0.17544219f, + 0.011972585f, 0.16787139f, -0.064014927f, 0.063430935f, + 0.037431303f, 0.35152945f, 0.52379316f, 0.30880079f, + -0.0080838054f, 0.0025782227f, -0.064842701f, -0.055067569f, + -0.096337497f, -0.10095952f, -0.10136285f, -0.042292643f, + -0.055130627f, 0.16845296f, 0.001841586f, -0.21435723f, + 0.14394617f, -0.10585373f, 0.0067468979f, 0.032732964f, + 0.18008594f, 0.073692061f, 0.0049007307f, -0.083147272f, + 0.097413838f, 0.049456425f, -0.047233764f, -0.10806481f, + -0.1684477f, -0.02350386f, -0.069132321f, 0.09973482f, + 0.093767725f, -0.18580937f, -0.30642566f, 0.078625835f, + 0.035596557f, -0.070210047f, -0.10426425f, 0.17940409f, + -0.082266398f, 0.37884656f, 0.024628146f, -0.098473154f, + -0.029349867f, 0.018384144f, 0.32589039f, -0.09452191f, + -0.043726105f, -0.12591836f, 0.070093237f, 0.12567575f, + -0.016375711f, -0.13870354f, -0.10536418f, -0.32213697f, + 0.048825912f, 0.018062484f, 0.0073692505f, 0.40983844f, + -0.48144931f, 0.067711577f, 0.034841247f, 0.60535169f, + 0.18871009f, 0.026448568f, 0.29304597f, -0.026114795f, + 0.00046964755f, 0.026240209f, 0.062679894f, 0.13152999f, + 0.0038555865f, -0.071757659f, -0.00010918995f, -0.19117549f, + -0.084502727f, -0.08257439f, -0.0065248739f, -0.11425732f, + 0.52284855f, 0.014168662f, 0.083729692f, 0.046876147f, + -0.12058848f, -0.032951042f, -0.029197002f, -0.03717022f, + -7.2325606f, 0.048466682f, 0.021469872f, -0.033394277f, + -0.048280317f, -0.0070536672f, -0.021838125f, -0.033571716f, + 0.41043514f, 0.31569055f, 1.0319127f, -0.053792708f, + 0.01640173f, -0.04471539f, -0.0005450804f, 0.50860643f, + 0.00046176268f, 0.22215228f, -0.092796996f, -0.050908767f, + 0.045029182f, -0.076584294f, -0.55618721f, -0.083282366f, + -0.088221878f, 0.73582464f, 0.007466367f, -0.36806753f, + -0.15962407f, 0.14045878f, 0.035667937f, 0.25321433f, + -1.1620976f, -0.069611609f, 0.25582388f, -0.30512461f, + -0.50340021f, 0.005802589f, 0.13249144f, 0.18043348f, + -0.88523769f, -0.01982322f, 0.32557058f, 0.36974367f, + -0.071805961f, -0.026019435f, 0.2256417f, -1.1871915f, + -0.10126714f, -0.041430946f, 0.014862232f, 0.60663956f, + -0.087166816f, -0.18772106f, -0.050117183f, 0.19847076f, + 0.42653605f, -0.058867149f, 1.0680673f, -0.050037004f, + 0.060493842f, 0.27729869f, 0.018674968f, -1.229182f, + -0.032156285f, 0.064024493f, -0.038351715f, 0.0054317424f, + 0.052777123f, -0.01218435f, -0.048348486f, -0.030850718f, + -0.24753965f, -0.66676283f, 0.25424719f, -0.066449568f, + -0.043042999f, 0.21532464f, -0.048945319f, -0.17952567f, + 0.35476667f, 0.38579243f, -0.043527145f, -0.092947401f, + 0.19953607f, -0.049033154f, 0.10280734f, 0.098391026f, + -0.12606904f, 0.64666027f, -0.2094887f, -0.78126526f, + -0.042779077f, -3.6310332f, -0.61420333f, 0.15607384f, + -0.26473752f, -0.05705044f, 0.14146191f, 0.17781651f, + 0.35937268f, 0.0069209156f, 0.065791838f, -0.30930364f, + -0.57202834f, 0.24565293f, -0.43134156f, -0.38264704f, + 0.049425524f, 0.062250815f, -0.12883118f, -1.7037508f, + -0.014809419f, -0.098922171f, -0.016871965f, -0.28697604f, + -0.091954961f, -0.088361464f, -0.012484444f, -0.16483591f, + -0.049275603f, -0.058710061f, -0.82045496f, -0.10046747f, + -0.047490947f, 0.46645394f, -0.053087577f, 0.31170729f, + -0.10667334f, 0.91380852f, -0.097717091f, -0.0034401631f, + -0.032398235f, -0.032494955f, -0.017510494f, -0.017728373f, + -0.03060592f, -0.20375603f, -1.0156304f, -0.0057887435f, + 0.01762541f, 0.69294852f, -0.071064293f, 0.55454743f, + 0.17544401f, 0.06560199f, -0.11674619f, -0.089036539f, + -0.3967163f, -0.027638005f, 0.00038337932f, 0.16106687f, + 0.018797358f, -0.3924568f, 0.50823623f, 0.015318918f, + 0.080393039f, 0.017248085f, 0.15651686f, -0.11768261f, + 0.2448304f, 0.022332087f, -0.33265331f, -0.14997825f, + -0.26761913f, -0.00065147015f, -0.46899056f, -0.46408185f, + -0.33178502f, 0.2169859f, 0.21597451f, 0.89673954f, + -0.1136399f, -0.07325542f, 0.034944128f, 0.00050530449f, + -0.06100614f, -0.10105786f, 0.069224097f, 0.17279533f, + 0.036998201f, -0.37999222f, 0.012308077f, -0.46022367f, + -0.61219144f, -0.1411334f, 0.27443916f, 0.069597892f, + 0.057043422f, 0.13104744f, -0.066886023f, -0.13609396f, + 0.12402165f, 0.091676511f, -0.077622838f, -0.099067137f, + -0.043037258f, -0.064653985f, -0.09159258f, -0.043558203f, + -0.38642481f, -0.35330632f, -0.54564655f, 0.02886611f, + -0.034514003f, -0.28853965f, -0.044325255f, -0.260528f, + -0.11043114f, -0.028283229f, -0.016377561f, 0.020245155f, + -0.13046725f, -0.054157726f, -0.13737544f, 0.10381761f, + -0.060808547f, -0.21522348f, -0.011772619f, -0.2140466f, + 0.014736393f, -0.58069426f, 0.064694963f, -0.19786388f, + -0.51017624f, -0.014712782f, -0.094564237f, -0.18338966f, + 0.10873664f, 0.01571382f, -0.036375783f, 0.22391155f, + -0.1638719f, 0.33295938f, -0.071504466f, -0.68288296f, + -0.021875001f, -0.053562205f, 0.19280802f, 0.16049054f, + -0.003731377f, -0.10889102f, 0.042080123f, 0.18931749f, + -0.12340768f, -0.34082928f, 0.0078228181f, 0.080283299f, + -0.11585079f, -0.14276451f, -0.040317345f, 0.011406935f, + -0.18357612f, -0.11408061f, -0.092961997f, 0.31284013f, + 0.05616276f, 0.26025468f, 0.0045233457f, 0.026614176f, + -0.12030124f, -0.042934831f, -0.076007955f, -0.018213058f, + 1.6513325f, -0.88391656f, 0.32789236f, -0.8586027f, + -0.056030706f, -0.14232168f, 0.12038498f, 0.78934473f, + 0.70205498f, 0.56136823f, -0.093072206f, -0.089115918f, + -1.0146235f, 0.049935851f, 0.91301298f, -0.60575956f, + -0.040179696f, -0.47331548f, -0.53003538f, -0.54515082f, + -0.44352564f, -0.29344055f, -0.11285051f, -0.34224871f, + -0.20083295f, 0.061157566f, 0.47652197f, 0.31096703f, + -0.19075388f, -0.3026965f, -0.4880375f, -0.41528249f, + 0.1421946f, -0.3329052f, 0.14095552f, -2.5747695f, + -0.027683645f, 0.012007884f, 0.51126748f, -0.037741303f, + 0.10475964f, -0.06997478f, -0.4851886f, 0.74474043f, + 0.096353136f, -0.052736081f, -1.5396994f, 0.18976465f, + -0.8457669f, -0.071033128f, 0.196261f, 0.024158165f, + -4.438374f, -0.064609699f, -0.092012733f, 0.18791977f, + -0.21701804f, 0.11501442f, -0.044039875f, 0.035136916f, + 0.29178834f, -0.086254805f, 0.024013693f, 1.0046295f, + 0.19084254f, 0.21026392f, -0.98308808f, -0.012888511f, + 0.017844893f, -0.30328047f, -0.023401396f, 0.21075144f, + -2.355557f, -0.93679327f, -0.067131817f, 0.041660637f, + -0.16860007f, -0.03005049f, 0.17721006f, -0.12888306f, + 0.023563875f, -1.513953f, 0.71080577f, 0.70097911f, + 0.003025423f, 1.5347781f, 0.62650746f, -0.27314556f, + 0.52238411f, -0.03469272f, 0.16166f, -0.03691227f, + 0.29196632f, 0.034979396f, -0.29282632f, 0.27766857f, + -0.026734171f, 0.075803384f, -0.03509514f, 0.20137627f, + -0.088591047f, 0.0030698264f, -0.28807282f, 1.289519f, + 0.047244404f, -0.05999456f, -0.01904916f, -0.48312134f, + -0.10572351f, -0.06680645f, 0.030298715f, 0.65202588f, + -0.095612243f, 0.0016070482f, -0.51103902f, -0.1025036f, + -0.050015833f, -2.7044544f, -0.13521041f, 0.14551921f, + -0.11943231f, -3.111897f, 0.047278874f, -0.11520971f, + -0.029400604f, 0.033385333f, 0.050444949f, 0.017142087f, + -0.28791997f, 0.1039418f, 0.26541546f, 0.22591586f, + -0.077931866f, 0.1477564f, 0.013980493f, 0.11410692f, + -0.13579483f, 0.16858418f, -0.040521432f, -0.10384158f, + 0.27363107f, 0.039533347f, 0.011838021f, 0.40900403f, + -0.0098846983f, 0.088793375f, -0.41514048f, -0.12439532f, + 0.18635552f, 0.035685755f, -0.078884847f, -0.23246349f, + -0.012019132f, -0.061380256f, 0.46021926f, -0.15031761f, + 1.2662563f, 0.10021018f, 0.039289325f, -0.62462926f, + -0.12676923f, 0.037946444f, 0.2229885f, 0.32727462f, + -0.028705886f, -0.048250504f, -0.094855957f, 0.11168044f, + 0.02705346f, -0.044207726f, -0.075841956f, 0.55944413f, + -0.019856663f, -0.005761297f, -0.044293556f, 0.43718299f, + -0.23413752f, -0.04251352f, 0.070472188f, -0.043038767f, + 0.47927338f, 0.24616031f, -0.12254085f, 0.30803642f, + -0.10932735f, 0.16597863f, -0.034811359f, -0.078232244f, + -0.017999163f, -0.057445846f, 0.0082492931f, 0.10864612f, + 0.15833113f, 0.57652467f, -0.065106615f, 0.15956029f, + -0.050727118f, 0.57500046f, 0.032157488f, -0.074965417f, + -0.43055466f, 0.047970377f, 0.025815835f, 0.049114704f, + 0.55826205f, -0.033170205f, 0.43725204f, 0.073407099f, + 0.025281113f, -0.0828958f, 0.32162628f, 0.33146679f, + 0.0017800049f, 0.25083622f, -0.03226801f, 0.30914015f, + 0.23606911f, 0.026909355f, 0.41393638f, 0.2573294f, + -0.41145715f, 0.080120288f, 0.45225033f, -0.074693859f, + 0.21370928f, 0.30640471f, -0.054914061f, -0.036260102f, + -0.048030213f, 0.014054791f, -0.2300207f, 0.070570767f, + 0.017333629f, -0.039002743f, 0.11036357f, -0.16814595f, + -0.00029198336f, 0.14036448f, 0.20572886f, -0.0072753909f, + 0.022179725f, -0.017318157f, -0.21058463f, -0.12612881f, + -0.092330128f, -0.019026171f, -0.028279826f, 0.064037204f, + 0.33263171f, 0.16616018f, -0.016287744f, -0.07640031f, + 0.38798699f, 0.013265324f, -0.030405523f, 0.068478025f, + -0.15215845f, 0.0048910617f, -0.86250341f, -0.10129414f, + -0.0014308176f, -0.94641221f, 0.037902769f, -0.47398561f, + -0.6011076f, -0.19982621f, -0.020200865f, -0.051700328f, + -0.58794117f, 0.024581928f, 1.6686627f, -0.1586109f, + 0.00035627169f, -1.8781054f, 0.013299476f, 0.8587727f, + -0.091613188f, -0.4378753f, -0.24170732f, 0.012908567f, + 0.20232327f, 0.0071076136f, 0.48003587f, -0.38901958f, + 1.0227575f, -0.031418193f, 0.29532948f, -0.14382879f, + -0.7699371f, -0.17464127f, -0.20234308f, -0.7263875f, + -0.094246209f, -0.046499372f, -0.90763158f, 1.1879029f, + -0.016549369f, -0.023025198f, -0.082782611f, -0.79769915f, + 0.0060625044f, 0.080092289f, 0.032719646f, 0.2836836f, + -0.85430926f, -0.09402997f, -2.2515185f, -0.087030113f, + 0.065520741f, -3.5027056f, -0.06861718f, 1.0204242f, + -0.15156005f, -0.72416943f, -0.071419723f, 0.033496112f, + -0.082043223f, -0.1072385f, 0.046482392f, 0.031000875f, + 0.059389461f, 0.19688019f, -0.17817527f, -0.26414475f, + -0.0874338f, -0.071241096f, -0.071986169f, -0.042084794f, + -0.01518901f, -0.21205886f, -0.018889211f, -0.097466156f, + -0.18395676f, -0.035079911f, 0.04161967f, -0.3201392f, + 0.021473957f, -0.12803495f, 0.12763698f, 0.0093502402f, + -0.014435519f, -0.10543296f, -0.13153534f, 0.26019683f, + -0.06587223f, -0.043107171f, 0.19818543f, -0.07857801f, + 0.14651977f, -0.71555436f, -0.23707868f, -0.16927603f, + 0.089671202f, 0.14285034f, -0.093512304f, -0.030820457f, + -0.10430788f, -0.080423087f, 0.074733064f, -0.15251474f, + -0.049980864f, -0.069064066f, -0.11874246f, -0.24864021f, + -0.022530872f, 0.068654701f, -0.53725088f, -0.055698387f, + 0.010347833f, 0.053851668f, 0.020460365f, -0.010660647f, + -0.092577778f, -0.017060768f, -0.092795961f, -0.077449553f, + -0.21786359f, -0.14085826f, 0.014620484f, -0.0088546984f, + 0.16874704f, -0.0827429f, -0.055283029f, -0.040266138f, + -0.27624017f, -0.87047368f, 0.47792694f, -15.306649f, + -0.056967482f, 0.083714329f, -0.092891678f, -0.32602239f, + -2.0283589f, 0.3058334f, 0.025895741f, -0.097083464f, + -0.22116008f, -0.10336096f, -0.49185783f, 0.41591173f, + -0.17042908f, -0.2029431f, -0.38196212f, -0.027932979f, + -4.469666f, -0.091719881f, 0.011261395f, -0.15358236f, + -0.080396496f, -0.049609229f, -0.55563468f, -0.19465025f, + -0.30687127f, 1.4309853f, -0.18416473f, -0.75361884f, + -0.27129644f, 0.22725882f, 0.082823843f, 0.1931999f, + -0.038157716f, -0.014356066f, 0.23180027f, 0.018372944f, + -0.083737388f, 0.0093438439f, -0.85702932f, -0.47597924f, + 0.0057487315f, -0.27195609f, 0.17170578f, -0.29574278f, + 0.18709596f, -0.0016384633f, -0.074001834f, 0.014973745f, + 0.1641127f, -0.015644884f, 0.0076047229f, -0.2147612f, + -0.097146966f, -0.024545608f, -0.014131124f, -0.045550801f, + 0.30820867f, -0.11803371f, -0.039077051f, -0.023686728f, + -0.17328742f, -0.20374629f, -0.520877f, 0.29805174f, + 0.04460473f, -0.35292032f, -0.031935565f, 0.72705603f, + 0.37082008f, -0.64379019f, 0.048601199f, -0.049423713f, + -0.25115699f, -0.095554464f, 0.45870957f, 0.10644846f, + -0.033336196f, -0.20071767f, -0.58642137f, 0.30133155f, + 0.44884497f, 0.8449316f, 0.22940905f, -0.09327177f, + 0.10985041f, 0.010906496f, 1.1276088f, -0.3349404f, + 0.58402634f, -0.0068193781f, 0.29151678f, 0.081525922f, + -0.34399223f, 0.32140905f, 0.15678167f, 1.3754013f, + -0.041633479f, -0.026116904f, -0.49621877f, 0.079822861f, + -0.011681432f, 0.033518497f, -0.44013885f, 0.32362947f, + -0.018565966f, 0.033350505f, 0.048756659f, -0.42108357f, + 0.19244832f, -0.060806502f, -0.44257283f, 0.030287158f, + 0.28413266f, 1.1119149f, -0.0920498f, -0.22141701f, + 0.011304769f, -0.1077433f, -0.010028548f, 0.064972974f, + -0.50728017f, 0.021453111f, -0.036151417f, 0.20129444f +}; + +static const float mlp_b2[64] = { + -0.46435183f, 0.17441358f, 0.10380459f, 0.11114871f, -0.1108398f, + 0.48980576f, -0.029519089f, -0.35797065f, -0.4262805f, 0.48994166f, + -0.029114468f, -0.024831172f, 0.23569061f, -0.098281726f, 0.34958068f, + 0.074680753f, -0.1055772f, -0.036195558f, 0.086019069f, -0.17827f, + 0.35333028f, -0.05927714f, 0.05149566f, 0.047807787f, 0.066052355f, + -0.028139802f, -0.44006553f, 0.53187931f, 0.1381208f, 0.48516673f, + 0.251524f, -0.0092206467f, 0.091347136f, -0.68939781f, -0.070646204f, + 0.20783794f, -0.025764955f, -0.023495475f, -0.033129167f, 0.32426396f, + -0.084493242f, -0.075500518f, -0.080823801f, 0.33191222f, -0.020375608f, + 0.34267998f, -0.40637219f, 0.083623238f, -0.12775487f, -0.041562572f, + 0.24656406f, -0.023074336f, 0.18648103f, 0.21343975f, 0.038157992f, + 0.11154515f, -0.13542511f, 0.32128665f, -0.026927825f, -0.078881823f, + -0.068031564f, 0.026887003f, -0.10856717f, 0.46738657f +}; + +static const float mlp_w3[2048] = { + -0.12808169f, -0.052328818f, -0.047723845f, 0.11964403f, + 0.12309267f, 0.54723138f, -0.55225176f, -0.078329109f, + 0.45928326f, 0.16719946f, 0.32586497f, 0.11457784f, + 0.0012436403f, -0.038776133f, 0.15088509f, -0.21634188f, + 0.037462622f, -0.23526415f, -0.12875672f, -0.032557297f, + 0.06653402f, -0.13455461f, 0.4131346f, 0.57469982f, + -0.58903617f, 0.11649852f, 0.025624383f, -0.16113316f, + -0.093247868f, -0.34977937f, -0.20837833f, 0.9830789f, + 0.038425215f, -0.0049533639f, 0.32383418f, 0.56653374f, + -0.57082766f, -0.37604418f, 0.07314118f, -0.087049127f, + 0.24241163f, -0.080318563f, 0.33469778f, -0.049214784f, + -0.042889606f, -0.14541984f, -0.18412384f, 0.33761042f, + -0.10844485f, 0.37318283f, -0.070995055f, -0.092720844f, + 0.2613728f, 0.025199251f, -0.10013124f, 1.1342043f, + 0.6386568f, -0.06506341f, 0.13225374f, 0.24741995f, + -0.13484988f, -0.0064254072f, -0.17396714f, -0.086253479f, + -0.0012439672f, 0.043311916f, 0.35495016f, 0.097640775f, + -0.0086776996f, -0.11057793f, 0.061429549f, -0.096415542f, + 0.35926694f, 0.059725013f, 0.02609971f, -0.39239988f, + 0.030055068f, 0.046908211f, 0.12860709f, -0.30041066f, + -0.087252498f, -0.25806609f, -0.033614971f, 0.29054007f, + -0.10404668f, 0.144146f, 0.26916194f, -0.23336118f, + 0.063162796f, 0.18566737f, -0.0037107964f, -0.12751672f, + -0.20060538f, 0.62271231f, 0.3452017f, -0.20108737f, + -0.092888318f, -0.099407479f, -0.21719362f, 0.089890212f, + -0.35062966f, -0.546538f, 0.15392007f, -0.024421945f, + -0.12315128f, 0.83329791f, -0.11315124f, -0.0080690971f, + -0.15232916f, 0.05241856f, 0.022404458f, 0.12902719f, + -0.055372071f, 0.30922425f, 0.024337396f, -0.10757918f, + 0.09631525f, -0.31747311f, -0.41522002f, 0.26986399f, + 0.26998931f, -0.36313564f, -0.0056059775f, 0.1303385f, + 0.032657158f, -0.1349255f, -0.19624053f, 0.10919709f, + -0.045139521f, 0.095419377f, 0.11653599f, 0.049322929f, + -0.019206196f, 0.083462797f, -0.10693606f, -0.065625697f, + 0.012217063f, -0.0065739336f, 0.11337598f, 0.038504455f, + 0.026650399f, 0.12136346f, -0.025767505f, -0.023759797f, + -0.073782951f, 0.099395864f, -0.031783126f, 0.067748487f, + -0.011274989f, 0.065430835f, -0.11752117f, -0.016371733f, + -0.00061125384f, 0.025762219f, -0.046989355f, 0.059648331f, + 0.11273364f, -0.0363218f, 0.04260242f, 0.0058844388f, + -0.09955132f, 0.074069463f, 0.6762358f, -1.0374516f, + 0.21462801f, -0.34456521f, 0.27561879f, 0.082044065f, + 0.59672379f, -0.11085521f, 0.14393911f, 0.62917393f, + 0.079992369f, -0.18744355f, 0.20202486f, -0.55484492f, + -0.071499735f, 0.2741884f, 0.093657531f, -0.10031625f, + 0.92457002f, -0.69968593f, -0.075391561f, -0.31264758f, + 0.066237777f, -0.32634881f, -0.8333683f, 0.05335582f, + -0.19390954f, -0.022559039f, 0.25357795f, -0.13593055f, + 0.053662121f, 0.022681698f, 0.046314333f, -0.026196154f, + -0.034093447f, -0.074744955f, 0.035708468f, 0.084125444f, + 0.037700761f, -0.038668141f, 0.021396032f, -0.14249635f, + 0.10821909f, 0.01788488f, 0.030499186f, -0.10667638f, + 0.040424034f, 0.0076612774f, -0.078438893f, 0.0039569498f, + 0.02581181f, -0.0046388884f, 0.029656813f, -0.012101502f, + 0.15050492f, -0.0097612524f, 0.14144832f, -0.070405096f, + 0.018191054f, -0.00061165792f, -0.014276315f, 0.027391503f, + -0.015624297f, -0.051637225f, -0.47596624f, 0.37382951f, + 0.12582314f, 0.10519083f, 0.28166562f, -0.098703742f, + -0.45995063f, -0.023883313f, 0.033406787f, -0.093590535f, + -0.12720999f, -0.11894552f, -0.0083446875f, -0.14372285f, + -0.088658974f, -0.029776251f, -0.12947649f, 0.56259763f, + 0.038718093f, 0.59793007f, -0.11163558f, -0.2426922f, + -0.43237931f, -0.0051366528f, -0.43077195f, -0.27046204f, + -0.10273743f, -0.2877751f, -0.32668555f, 0.020754779f, + -0.055949986f, -0.11348735f, 1.5081776f, 0.13199894f, + 0.13519076f, 0.64363843f, 2.5271797f, -0.11560567f, + 0.25221241f, 0.82460207f, 0.4098542f, -1.2663355f, + 0.0053175408f, -0.070826963f, -0.93845105f, -0.13116963f, + 0.097363248f, 0.4995949f, 0.023101138f, -1.3653729f, + 0.90163648f, 1.0359263f, 0.097839013f, 0.15566209f, + 0.32654285f, -1.2164307f, -1.9590575f, -0.51122034f, + -0.094879068f, 0.75444579f, -1.0576731f, 0.66238332f, + -0.11439f, 0.049311981f, 0.036566485f, 0.50389266f, + -0.22526339f, 0.22421572f, 0.36273316f, 0.080949113f, + 0.034339059f, -0.15754704f, -0.02651648f, 0.014512315f, + -0.072444737f, -0.20950843f, -0.23004818f, -0.45005545f, + 0.011897321f, 1.2881446f, -0.10352977f, 0.59204018f, + 0.34423134f, 0.35777608f, 0.15454808f, -0.272939f, + 0.34286675f, -0.37851459f, 0.28636226f, 0.28324741f, + -0.097821012f, 0.38627422f, 0.12152672f, -0.37866172f, + -0.094969228f, 0.0018166602f, -0.074816518f, 0.10784334f, + -0.091682047f, 0.13474894f, 0.017185235f, -0.027176445f, + -0.0019459955f, -0.074392214f, -0.094182894f, 0.073130466f, + 0.015551835f, 0.078375749f, 0.017662944f, -0.049590871f, + -0.027468896f, 0.12268973f, 0.076309919f, -0.032916926f, + -0.062150974f, 0.051535029f, 0.059450552f, -0.087331124f, + -0.045875832f, -0.0083243996f, 0.0075756363f, -0.1027914f, + -0.075422466f, 0.04573492f, 0.11026579f, -0.11266793f, + 0.020766094f, -0.095741928f, 0.058222298f, -0.075188175f, + -0.028152788f, 0.086002447f, -0.15424755f, 0.096616283f, + -0.044074647f, -0.071879998f, -0.097033732f, 0.061783671f, + 0.032592043f, -0.025922984f, -0.059847102f, -0.086556107f, + 0.013638243f, -0.00052020629f, 0.051364288f, 0.11157563f, + 0.062240481f, -0.089667514f, -0.008833563f, 0.061276395f, + -0.1295643f, 0.0025272823f, 0.076379403f, -0.038176537f, + -0.018298134f, -0.0043032854f, 0.072002873f, 0.078517422f, + -0.11322817f, 0.009210078f, -0.2237637f, -0.39443782f, + 0.061378136f, 0.19915722f, 0.24407877f, -0.10340229f, + -0.079753712f, -0.072795041f, 0.01773043f, -0.052851539f, + -0.069311924f, -0.14375909f, -0.28917813f, -0.56845909f, + -0.14603393f, 0.36718857f, 0.02324803f, 0.36509931f, + 0.22355039f, 0.15940218f, -0.40130618f, 0.27346289f, + -0.15770985f, -0.11897062f, 0.54017419f, -0.33162582f, + -0.057931595f, -0.073323026f, -0.35368001f, 0.0755044f, + -0.089819804f, 0.062258616f, -0.035000332f, -0.028877415f, + -0.080530331f, -0.069914415f, 0.023817005f, -0.035281286f, + -0.08835192f, -0.0030077838f, 0.018908832f, -0.050792094f, + -0.053585276f, -0.037769198f, 0.010985512f, -0.077394068f, + -0.04079783f, 0.15920036f, 0.084318295f, 0.14209072f, + 0.10315345f, -0.14438976f, -0.026674245f, -0.0077945036f, + 0.096834302f, 0.099224709f, -0.092541933f, -0.0048606326f, + -0.098775581f, -0.11432265f, 0.055885784f, -0.084913552f, + -0.10716181f, -0.017688634f, -0.60415089f, 0.51060236f, + -0.077655502f, 0.5508877f, 0.024048349f, 0.05583518f, + 0.45294696f, -0.15289795f, 0.077675961f, 0.014842644f, + 0.009834839f, -0.0081570698f, -0.18590818f, -0.15969759f, + -0.052648775f, 0.049095254f, -0.093764558f, 0.39467648f, + 0.32655114f, 0.33543554f, -0.14453381f, -0.0031372991f, + 0.40144277f, 0.17933749f, -0.35810965f, 0.3331618f, + -0.062097874f, 0.050819553f, -0.16622131f, 0.11269984f, + -0.0052277134f, -0.070915595f, 0.1658576f, -0.039597124f, + 0.28210583f, -0.2907868f, -1.1772734f, 0.068373039f, + -0.11144102f, -0.39506656f, 0.52445239f, 0.54704225f, + -0.039962277f, -0.057918955f, -1.7528764f, -0.19283889f, + -0.21820737f, -0.39377886f, -0.1548586f, 0.41009155f, + 0.9204343f, 0.24508099f, -0.44279382f, 0.40593028f, + -0.16404152f, 0.20710844f, 0.91169477f, -0.88881183f, + -0.037955798f, -0.37170348f, -0.23565941f, 0.0053365207f, + -0.00034421682f, 0.053085268f, 0.067415811f, -0.10250189f, + -0.076809444f, 0.11787599f, 0.046620507f, -0.039501652f, + -0.085476518f, -0.05755141f, 0.052321121f, 0.09560819f, + 0.052226081f, -0.11736815f, -0.075407214f, 0.071318969f, + -0.039813139f, 0.14792827f, -0.029173169f, 0.048138618f, + -0.040268928f, 0.11465093f, 0.0050193374f, 0.0020091198f, + -0.074755654f, -0.070283301f, -0.0193558f, 0.12508273f, + 0.083046138f, -0.094582997f, 0.0061457357f, 0.085205108f, + -0.053608831f, -0.042753927f, -0.15424778f, -0.22638145f, + 0.25145492f, -0.31952843f, -0.29642463f, -0.15397993f, + 0.41324052f, -0.011015773f, 0.040885266f, 0.21183702f, + -0.11274751f, -0.048897613f, -0.053104933f, -0.68805069f, + -0.14128767f, -0.19656679f, -0.074510165f, -0.29298529f, + -0.21596044f, -0.18962865f, -0.11364055f, -0.21867156f, + -0.86475414f, -0.15597151f, -0.06440302f, 0.40433306f, + 0.013249827f, -0.13420142f, 0.38136631f, 0.097586103f, + -0.17685439f, -0.16638999f, 0.33192483f, -0.70416683f, + 0.050602648f, 0.088059448f, -0.045045558f, -0.19487943f, + -0.010414841f, -0.068591468f, 0.26677215f, -0.057514619f, + -0.14076272f, -0.082323529f, -0.35916865f, 0.50960594f, + -0.18670283f, -0.0325769f, 0.009209442f, -0.40837368f, + -0.14892226f, 0.37924308f, -0.51548338f, 0.3084628f, + 0.16661143f, 0.0044392594f, 0.31869438f, -0.52031928f, + -0.060851134f, 0.36728746f, 0.30322945f, 0.3070536f, + -0.05414686f, -0.047329675f, -0.6979118f, 0.041740224f, + -0.043089554f, 0.73687154f, -0.54720199f, -0.13155709f, + 0.010859033f, 0.033866998f, -0.0082464786f, 0.34360096f, + 0.031311713f, -0.034431335f, 0.072484642f, 0.96680635f, + 0.031584896f, -0.39283586f, -0.045928109f, -0.80608094f, + 0.0082052937f, 1.1616231f, -0.15121417f, 0.33097032f, + -0.10358702f, -0.11722358f, -0.37170202f, -0.024785215f, + -0.13621785f, -0.36030358f, -0.88391191f, 0.5509814f, + -0.08027564f, -0.041821003f, 0.0867154f, -0.063652426f, + 0.58694637f, 0.5556044f, -0.26340449f, 0.055456404f, + 0.32851258f, -0.10824155f, 0.37289032f, 0.054754548f, + -0.092263624f, -0.13214371f, -0.21282426f, -0.045593243f, + -0.14888355f, -0.21615021f, -0.079471029f, 0.0885465f, + -0.21608126f, 0.073165759f, 0.96868116f, -0.5940147f, + -0.40213665f, 0.16432001f, -0.054921333f, -0.107089f, + -0.16761391f, 0.19514263f, 0.45029142f, -0.2462592f, + 0.008666385f, 0.064174294f, 0.16073674f, 0.41148216f, + -1.3422406f, 0.099147864f, 0.44457993f, -0.052424595f, + -1.0678706f, 0.046281461f, -0.11262134f, -0.025473107f, + -0.05078575f, -0.18823294f, -0.027650772f, 0.60829484f, + -0.02463067f, -0.045181222f, 0.017825212f, 0.044377673f, + -0.35956544f, -0.39195868f, 0.022631103f, 0.661982f, + 0.48372534f, 0.21114728f, 0.24770558f, -0.38601598f, + 0.070134796f, -0.61713946f, -0.74522793f, -0.6109156f, + -0.041586477f, -0.11653864f, -2.3759596f, 0.068766005f, + 0.22272666f, -0.37417236f, -0.34418371f, 0.072304152f, + 0.07979627f, 0.087749638f, -0.040664811f, 0.18635148f, + 0.0029790432f, -0.063206404f, 0.2768715f, -0.40018263f, + 0.032177318f, -0.078139663f, -0.11014777f, 0.40319979f, + 0.33231056f, 0.2856499f, 0.2213576f, 0.30882338f, + -0.091569602f, 0.54455078f, -0.055066396f, -0.3293775f, + 0.084119074f, 0.19328763f, 0.055775993f, 0.12362758f, + 0.04999749f, -0.027355021f, -0.33611757f, 0.032002404f, + 0.17296943f, -0.26304245f, 0.15528855f, -0.074398093f, + -0.37826148f, 0.083316714f, -0.20090669f, -0.068102837f, + 0.032205034f, -0.095932774f, 0.17521329f, 0.24313907f, + -0.116514f, 0.27553013f, -0.18104564f, 0.0048792819f, + 0.7917819f, -0.39611658f, -0.36923578f, 0.2087618f, + -0.2080906f, 0.31602949f, 0.24995297f, -0.37101698f, + -0.15413378f, 0.31165168f, -0.079193741f, -0.11548284f, + -0.067733794f, 0.037405804f, -0.2375592f, 0.44498593f, + 0.10634088f, -0.41100451f, 0.74799913f, -0.032684848f, + -0.88100898f, 0.03886513f, -0.22641672f, 0.10536111f, + 0.03480386f, -0.10481006f, 0.13162668f, -0.17961317f, + -0.094271913f, -0.45032275f, 0.072006837f, 0.11769272f, + 0.079360336f, -0.14695689f, 0.1814806f, -0.34118348f, + -0.08532802f, -0.28902808f, -0.31543332f, -0.37635469f, + 0.063687526f, -0.17604162f, -0.82915682f, 0.083995298f, + 0.048676446f, 0.061263889f, 0.071550846f, 0.033616293f, + 0.03908626f, 0.049627922f, -0.017918035f, 0.010347903f, + -0.14348224f, -0.10886894f, 0.072891526f, -0.081765592f, + 0.021628797f, 0.036998361f, 0.11835511f, -0.079074457f, + -0.1104847f, 0.085618615f, 0.062424999f, -0.057408255f, + -0.088246763f, -0.036310278f, 0.061425399f, -0.05202049f, + 0.074198969f, -0.041857563f, 0.10700931f, 0.090149663f, + 0.087373108f, 0.077166028f, 0.077703342f, 0.094369456f, + -0.16907895f, 0.050572537f, 0.54427832f, 0.029185081f, + 0.55644584f, -0.19925909f, 0.33447477f, 0.041042328f, + 0.34432417f, 0.080318071f, -0.36826918f, 0.055131659f, + -0.13133587f, -0.1303139f, 0.17518811f, -0.035097472f, + -0.013238844f, -0.15785122f, 0.024194947f, -0.44838133f, + -0.6009261f, 0.11781777f, 0.068333723f, 0.83684814f, + 0.14589621f, 0.89523894f, -0.10002273f, 0.20113599f, + -0.23377629f, 0.23095767f, -0.51351535f, 0.7437349f, + -0.029806063f, 0.017510295f, 0.36967587f, 0.17328304f, + -0.16048929f, -0.1818929f, 0.15367268f, -0.074203387f, + -0.11756727f, -0.28741392f, 0.048911121f, -0.67120183f, + -0.019262746f, -0.10710866f, -0.011889457f, -0.012330559f, + -0.088957369f, 0.40618631f, -0.062389143f, 0.22486693f, + 0.270219f, 0.13964756f, -0.071549766f, 0.04726886f, + -0.27369639f, 0.22376841f, -0.18887281f, -0.25513321f, + -0.054868035f, 0.13212155f, 0.51510829f, -0.19160578f, + 0.04147194f, -0.13215092f, -0.26315036f, 0.064618424f, + -0.16014434f, -0.34595183f, -0.15407248f, -0.13058089f, + -0.20239624f, -0.023469796f, 0.19844797f, -0.050370187f, + -0.056245167f, -0.15566842f, -0.13869034f, 0.16025729f, + -0.096941046f, 0.26027292f, -0.19061856f, -0.419476f, + -0.35278341f, 0.070402086f, -0.20612645f, 0.21264058f, + -0.057321571f, -0.047857307f, 0.47540215f, 0.16269493f, + 0.039904278f, 0.26168862f, 0.5283829f, -0.16362824f, + -0.14107576f, -0.066373244f, -0.11696251f, -0.28072542f, + -0.74024498f, 0.40233016f, 0.59357321f, -0.05884568f, + -0.3168228f, -7.0787568f, -2.9344666f, 0.17813993f, + -0.077995166f, -0.08587347f, 1.7868339f, 0.27552894f, + -0.12622923f, -0.34379289f, 0.045478005f, 1.2754853f, + 0.14409463f, 0.56534666f, -0.1642376f, -0.022529928f, + 0.76372415f, 0.11891279f, 0.40175417f, -0.3917928f, + 0.039324787f, 0.074408062f, 0.089219488f, 0.28408799f, + -0.15250885f, -0.11486184f, -0.18513222f, -0.43465546f, + 0.0057280306f, 0.3080157f, -0.096519575f, -0.18959592f, + 0.15001473f, -0.25553393f, 1.0474659f, -0.30019799f, + -0.12641026f, -0.083352312f, 0.067715153f, -0.015976181f, + -0.19349313f, -0.047100734f, -0.17550008f, 0.83749127f, + -0.18098085f, 0.19523908f, 0.02333945f, 0.32633597f, + -0.026505021f, 0.39207906f, 0.073412739f, 0.97519147f, + -0.083243489f, -0.106651f, -0.5050981f, -0.12938543f, + -0.13746485f, -0.10747176f, -0.19018923f, -0.45473459f, + 0.025899271f, -0.24586688f, -0.19351897f, -0.050653942f, + -0.24128021f, -0.32487708f, 0.080425449f, 0.19729076f, + -0.078666106f, 0.036795255f, 0.37549052f, 0.01321892f, + 0.037601747f, 0.10448405f, 0.015671587f, 0.27832502f, + -0.1337443f, -0.19461967f, 0.033825111f, 0.45106584f, + -0.17516918f, 0.54119188f, 0.21538986f, 0.037386645f, + -0.018768944f, 0.16602226f, 0.15428469f, -0.22552837f, + -0.032345161f, -0.0032612551f, 0.5189541f, 0.27260458f, + 0.062465627f, -0.46419522f, 0.21681449f, 0.027624637f, + -0.55317742f, -0.046002958f, 0.032691497f, 0.60643226f, + -0.057162181f, 0.056146104f, 0.15326305f, -0.63075864f, + 0.023158951f, 0.49930549f, -0.059872638f, 0.38671863f, + 0.022667617f, -0.58384502f, -0.098061197f, -0.0074940291f, + 0.024085283f, -0.21387111f, 0.14301996f, 0.21881221f, + -0.0009151859f, 0.68360507f, 0.18022797f, -0.026480654f, + 0.01981096f, 0.049449161f, 0.27987421f, 0.57438564f, + -0.20850788f, -0.12587361f, 0.22130537f, -0.0020121168f, + -0.1686731f, 0.092541441f, -0.10871709f, -0.37822133f, + -0.084060445f, -0.12336881f, -0.022436373f, 0.20044103f, + 0.034061641f, 0.036974043f, -0.040070131f, 0.98735344f, + -0.53522623f, 0.29777235f, -0.21055281f, 0.74663371f, + 0.13002819f, 1.4781829f, 1.3201566f, 0.023709066f, + 0.079635203f, 0.222893f, 0.41945404f, 0.39121407f, + 0.080754645f, 0.0088022947f, 0.012209421f, -0.41556174f, + -0.23074119f, -0.12729242f, 0.2268924f, -0.11726107f, + -0.20563805f, 0.10057165f, -0.22267015f, -0.30471572f, + -0.02684449f, -0.11594622f, -0.83518684f, 0.45366839f, + 0.05482344f, -0.041614182f, -0.0018023885f, -0.025613924f, + -0.49203193f, -0.15421465f, -0.15011583f, -0.061337616f, + 0.20556985f, -0.24930742f, 0.84871781f, -0.32617661f, + -0.071681775f, -0.10969488f, -0.24244277f, -0.10812452f, + -0.15851527f, 0.035769477f, 0.16073236f, 0.043961313f, + 0.092654727f, 0.050679158f, -0.10620803f, -0.025578877f, + 0.29613757f, -0.060314238f, 0.14157601f, 0.47224927f, + -0.066812374f, 0.044816624f, 0.25472793f, 0.14106819f, + -0.047971964f, 0.14653988f, -0.010800328f, 0.32895458f, + -0.010116353f, -0.083383858f, 0.21241361f, 0.14219108f, + 0.31254983f, 0.27929658f, 0.42620978f, 0.6723575f, + -0.12281682f, 0.1997274f, 0.18996745f, -0.33229798f, + -0.098339975f, 0.099001765f, 0.020007776f, -0.12151581f, + -0.10598209f, -0.071385354f, 0.10815151f, 0.12270612f, + -0.062319979f, -0.10482923f, -0.00014437787f, -0.065338425f, + -0.10518424f, 0.099664725f, -0.082343712f, 0.013184935f, + -0.075222179f, -0.089549474f, 0.0080029806f, -0.073739268f, + 0.05371803f, -0.040453102f, -0.11520487f, 0.022029867f, + -0.09369836f, -0.042101189f, 0.078816324f, 0.090892993f, + -0.033954352f, -0.058745127f, 0.07795573f, -0.074124902f, + 0.1229554f, -0.041219741f, -0.046193965f, -0.016124239f, + 0.029208429f, -0.022333482f, 0.032514777f, 0.039069902f, + -0.10478068f, 0.028848672f, 0.14295472f, 0.045014191f, + 0.0622405f, 0.040426794f, 0.032488275f, 0.093945377f, + -0.12467057f, 0.024995271f, -0.06020876f, -0.071053952f, + -0.12001889f, 0.044430479f, -0.035120212f, -0.010635448f, + -0.041803632f, 0.16060527f, 0.1219613f, -0.076477282f, + -0.037813663f, -0.066242486f, 0.036473565f, -0.072358482f, + -0.13540964f, -0.025679013f, -0.17081851f, 0.76153582f, + 0.16783667f, 0.59944302f, -0.05644162f, -0.11681476f, + -0.090680964f, 0.45437285f, 0.20775707f, -0.056709409f, + -0.18449141f, -0.098945871f, -0.25565588f, -0.0027552345f, + -0.028514009f, 0.25555778f, -0.16345206f, 0.1775551f, + -0.44079462f, -0.11748049f, 0.35318223f, -0.30726898f, + -0.34348872f, 0.025526537f, 0.09018445f, 0.26397365f, + -0.018639484f, -0.33799535f, 0.34148481f, -0.1988654f, + -0.019395914f, -0.045703731f, 0.088978149f, 0.29183117f, + -0.4410294f, -0.44108409f, 0.54243338f, -0.0089628864f, + -0.12032986f, -0.1426388f, -0.1056268f, 0.7575326f, + -0.12364331f, -0.15796846f, -0.32724255f, -0.39843196f, + -0.177241f, 0.78503591f, -0.15084592f, 0.53910375f, + 0.34901854f, -0.3970035f, 0.044796225f, -0.073601767f, + 0.2736969f, -0.55798066f, -0.016618196f, -0.027247315f, + 0.023574859f, 0.10118458f, -0.021976994f, -0.074213408f, + -0.042265147f, -0.022529513f, -0.082273699f, -0.05212516f, + 0.17467791f, -0.040350839f, -0.10639242f, 0.031507578f, + 0.082896054f, 0.057084072f, 0.034559552f, -0.059383817f, + -0.052243855f, 0.044589724f, 0.0032457809f, 0.014799416f, + -0.12825872f, -0.053543728f, 0.097487673f, 0.068034366f, + -0.016222825f, 0.077319719f, -0.028849339f, 0.16235751f, + -0.046722207f, -0.07608863f, 0.070551313f, 0.046685744f, + 0.094740443f, -0.0217868f, 0.01052319f, 0.080901206f, + -0.079810053f, -0.053437412f, -0.015195488f, -0.090172186f, + 0.0021850727f, -0.092031606f, 0.094410419f, -0.034167767f, + -0.013681914f, -0.056438439f, 0.11146928f, -0.047793429f, + 0.030677661f, 0.0077462494f, -0.089058086f, -0.041890442f, + -0.033342913f, 0.0015690569f, 0.0041591851f, 0.0033997449f, + -0.02063093f, 0.042591605f, 0.12097533f, -0.00620542f, + 0.062765315f, -0.058675308f, 0.0029879932f, -0.021423224f, + 0.065756828f, 0.11648777f, -0.057524025f, 0.085086793f, + -0.10178748f, -0.12179485f, -0.36733526f, -0.86000472f, + -0.97407043f, 0.114894f, 1.3272939f, -0.0081559457f, + -0.69900769f, 0.50968325f, 2.3125041f, 0.42626289f, + 0.038589094f, -0.058702007f, -2.1950099f, -0.14421064f, + -0.11983887f, 0.54484636f, 0.0072034295f, 0.08724238f, + -0.01831007f, 0.64945495f, -0.14855495f, 0.71739477f, + 0.74778157f, 1.2611854f, 1.5102831f, 1.9107484f, + -0.15205151f, -0.54846859f, 0.083387338f, 0.26268476f, + -0.0032104324f, -0.17474824f, 0.39118016f, 0.14064859f, + -0.43868065f, -0.36172801f, -0.092336319f, -0.10934571f, + -0.25762454f, -0.41013438f, -0.5712772f, -0.14033933f, + 0.0065863989f, 0.042271737f, 0.48534566f, 0.065700263f, + -0.060285158f, -0.15928997f, -0.14432748f, -0.023136033f, + 0.36045089f, 0.23650055f, -0.80450082f, 0.18187129f, + 0.040664785f, 0.040958896f, -0.16793801f, 0.50204384f, + -0.11213668f, -0.061356883f, 0.27506778f, 0.22752082f, + 0.0013040155f, 0.086337596f, -0.077009991f, 0.1040458f, + 0.02620507f, 0.02596298f, -0.075251624f, -0.063212551f, + -0.069726482f, -0.072710879f, 0.096028447f, 0.095082253f, + 0.11069809f, -0.080106214f, -0.03705965f, -0.033409968f, + 0.022621611f, -0.091405094f, -0.027347527f, 0.015693963f, + -0.092379101f, -0.039608993f, -0.035596188f, -0.025750414f, + 0.11363354f, -0.012928111f, 0.025824621f, 0.075545959f, + -0.05902537f, 0.11692759f, -0.024616221f, 0.060814053f, + -0.088750854f, -0.051557709f, 0.26731104f, 0.48528317f, + -0.16191565f, 0.29261959f, 0.5503636f, 0.0033399439f, + 0.038604531f, -0.13200238f, -0.28700364f, 0.30316892f, + 0.037305564f, 0.023977783f, 0.061972599f, -0.10208722f, + 0.0095351422f, 0.25961989f, -0.045887496f, 0.25054815f, + -0.21523754f, 0.36987314f, -0.72617f, -0.088565417f, + 0.88023692f, 0.13721777f, -0.084894396f, -0.35656375f, + 0.032858521f, 0.1494735f, -0.51655751f, -0.029780861f, + -0.11138111f, -0.10434926f, 0.36512619f, -0.55376744f, + 0.742459f, 0.42569214f, -0.17315629f, 0.10861661f, + -0.12270316f, 0.15778531f, 0.8655687f, -0.597817f, + -0.11046355f, 0.0082499962f, -0.55923188f, 0.058065567f, + -0.098893017f, 0.21627484f, 0.099116847f, 0.48177633f, + -2.3557522f, -0.026923891f, 0.94279218f, 3.4301777f, + -0.70101994f, -1.7976744f, 0.83219326f, -0.05010888f, + -0.045527559f, -0.31007138f, 2.5043502f, 0.075790413f, + 0.019464925f, -0.16751091f, -0.13510258f, 0.094811164f, + 0.29018015f, 0.43444183f, -0.080070838f, -0.0082832044f, + 0.16182393f, 0.1275004f, 0.12325715f, 0.1300666f, + -0.14430887f, -0.13872628f, 0.10887419f, 0.70045304f, + 0.014707778f, -0.25372976f, -0.08772064f, -0.14787257f, + 0.11650153f, 0.46046254f, -0.087170996f, 0.11495326f, + -0.087107822f, 0.40101755f, 0.029058821f, -0.18764131f, + -0.14268225f, -0.27205557f, -0.081614599f, -0.14898632f, + -0.077019215f, -0.026921529f, 0.32276794f, -0.55241627f, + -0.17651598f, -0.14862873f, 0.028110109f, -0.14585996f, + 0.19053391f, -0.0044995402f, 0.25749692f, 0.38503984f, + -0.18454093f, -0.16495101f, -0.45931721f, 0.14134189f, + -0.18385343f, 0.67873967f, -0.030483684f, 0.017738357f, + 0.27536163f, -0.044384789f, 0.54114848f, -0.26900873f, + 0.028799295f, -0.45952123f, -0.058621179f, -0.014254239f, + 0.07463789f, 0.058148742f, 0.71840823f, 0.055947684f, + -0.058972254f, 0.0083160847f, 0.092256546f, -0.10279186f, + -0.11828593f, 0.090320811f, -0.020149752f, 0.018343568f, + 0.16420552f, -0.00099649036f, -0.10164067f, 0.070518471f, + -0.042265922f, -0.063594349f, -0.087115109f, -0.13146372f, + 0.10286826f, 0.020132421f, -0.017146077f, -0.020656241f, + 0.022712832f, -0.034722485f, 0.011758959f, -0.0683228f, + -0.056001503f, 0.03939534f, -0.0022365269f, -0.047298335f, + 0.11130676f, -0.087764286f, -0.07364881f, 0.10968984f, + -0.13891372f, 0.059901111f, 0.36202097f, 0.63151443f, + 0.43602145f, 0.70505834f, 0.2743499f, 0.027799739f, + -0.083049797f, 0.19949269f, 0.19721423f, 0.34426919f, + -0.17220302f, -0.068907239f, 0.011325719f, -0.17853962f, + -0.088913292f, 0.40525457f, 0.03464843f, -0.18176292f, + -0.29318899f, 0.048454929f, 0.048076723f, -0.26785684f, + 0.11278073f, -0.22618754f, 0.27858546f, 0.16610041f, + -0.054528128f, -1.8183844f, -0.19542356f, 0.032694854f, + -0.057891324f, 0.075661823f, 9.392677e-05f, 0.031244764f, + -0.058199484f, -0.063820988f, -0.076851115f, -0.032369375f, + 0.032117356f, 0.05807187f, 0.066481456f, -0.028165152f, + 0.036686316f, 0.10028576f, 0.10593661f, -0.11820573f, + -0.070384435f, -0.064357318f, 0.090520702f, -0.062103134f, + 0.064692371f, -0.017758237f, -0.085512511f, 0.045926992f, + -0.073643237f, -0.10603441f, 0.0051057879f, -0.056630109f, + -0.034975443f, -0.019103363f, -0.05216597f, -0.10279703f, + -0.059674349f, -0.056211516f, -0.094751209f, 0.085753255f, + 0.23497199f, 0.55872893f, -0.36958593f, -0.042425208f, + 0.090005904f, 0.24737693f, 0.13495326f, -0.21660317f, + -0.13841492f, -0.13420677f, 0.025810795f, -0.2108565f, + -0.061945803f, -0.30425355f, -0.015684234f, -0.031777393f, + 0.29799074f, -0.12519144f, 0.33670935f, 0.35193673f, + -0.86386693f, 0.00053501356f, -0.054052673f, -0.63899094f, + -0.11756013f, -0.34306797f, -0.21611492f, 1.0097325f, + -0.066296041f, 0.038286746f, 0.43414059f, -0.11096265f, + 0.50467777f, -0.03967629f, -0.35756686f, 0.0065737148f, + 0.92268497f, 0.031352203f, -0.066922009f, -0.21426314f, + -0.030387281f, -0.012914934f, 0.026989324f, -0.24181126f, + -0.084439501f, -0.069055855f, -0.061570413f, 0.045114066f, + -0.033102557f, 0.4359957f, 0.052867714f, -0.13958478f, + -0.64547604f, 0.38120481f, 0.22561225f, 0.27908158f, + 0.0020846264f, 0.20626554f, 0.40354964f, -0.31192353f, + 0.014616296f, -0.10976318f, -0.046657927f, -0.039942238f, + 0.098860674f, 0.022845382f, 0.079804786f, 0.042324528f, + -0.017054489f, -0.15316671f, -0.048432387f, 0.017695881f, + -0.059116278f, 0.017228395f, -0.098129831f, -0.062251657f, + -0.057534762f, 0.074851386f, -0.058960684f, -0.082455367f, + -0.11312152f, -0.068200834f, -0.023098355f, -0.12502532f, + -0.011859045f, -0.010796155f, -0.036414146f, 0.092328548f, + 0.050745897f, -0.019039672f, -0.062265962f, -0.018947512f, + -0.13714747f, 0.01293406f, -0.26049718f, 0.090390332f, + 0.34323621f, -0.24375999f, 0.019091573f, -0.087042131f, + -1.2385156f, 0.12128513f, 0.087087356f, 0.093807839f, + -0.02640957f, -0.12679194f, 0.38960424f, 0.14131925f, + -0.16655464f, -0.11519764f, -0.021495372f, 0.9495737f, + 0.59752327f, 0.17217116f, 0.40611541f, -0.014609127f, + 0.074016333f, 0.29384115f, -0.1830001f, 0.23988841f, + -0.14710341f, -0.36187181f, 0.20951857f, 0.05141608f, + -0.11294398f, -0.13120843f, -0.1505899f, 0.73322457f, + -0.28805432f, 0.16593823f, -0.043296061f, -0.028813008f, + -0.16486488f, 1.3133742f, -0.15502197f, 0.33327311f, + -0.11085358f, -0.11033826f, 0.0212528f, -3.8042886e-05f, + -0.099176645f, -0.37971193f, -0.069581941f, -0.73725384f, + 0.64331031f, 0.49662226f, 0.056362499f, -0.15387005f, + 0.0066977004f, 0.46996644f, 1.4572316f, 0.2325218f, + -0.039181605f, 0.10210135f, -0.11419023f, 0.035879612f, + 0.07320185f, -0.048421428f, 0.12494764f, 0.073422953f, + 1.2311269f, -0.051239591f, -0.401795f, -0.083112739f, + 0.73621339f, 0.067578867f, -0.12284096f, -0.80212545f, + -0.027485676f, -0.19483016f, 0.094626933f, -0.11013681f, + 0.022443701f, -1.021263f, -0.062597021f, -0.27611768f, + -0.53071088f, 0.31256691f, -0.0042890566f, -0.17730801f, + -0.41861099f, 0.30111998f, 0.2345648f, 0.15903151f, + -0.10063662f, 1.0092976f, 0.12777299f, -0.16742149f, + -0.045302629f, -0.013556018f, 0.021508049f, 0.0039821607f, + 0.10765424f, 0.06711337f, 0.12328785f, -0.087734878f, + -0.026746146f, 0.070967481f, 0.064689435f, -0.011049374f, + -0.00065116584f, 0.096920602f, 0.023575017f, -0.013746396f, + 0.11398198f, 0.053255565f, 0.1010962f, -0.11084297f, + 0.049939346f, 0.053405888f, -0.067741007f, 0.096235119f, + -0.07247933f, 0.13223854f, 0.018134654f, 0.071205914f, + -0.11877435f, 0.0066712075f, -0.073532216f, 0.037833303f, + -0.085745513f, -0.017983705f, 0.00066700904f, 0.012576376f, + 0.067870982f, -0.079877667f, 0.000389024f, -0.11829557f, + -0.066501074f, 0.085467368f, -0.13496476f, 0.12135644f, + -0.084280357f, 0.032728031f, -0.11148307f, 0.067373142f, + -0.081082612f, 0.047744323f, -0.098822564f, -0.10075f, + 0.0016667494f, 0.07502871f, 0.062817261f, -0.070482142f, + 0.0039751278f, 0.032071497f, -0.009055675f, 0.11055606f, + 0.12262049f, 0.029085901f, 0.017858583f, -0.098588377f, + -0.11903355f, 0.013024852f, 0.56094158f, 0.53240877f, + 0.091005385f, 0.077324525f, -0.31991836f, 0.029789317f, + -0.19224975f, -0.0083467364f, -1.0027844f, 0.61853808f, + -0.03389949f, 0.053026233f, 0.43264109f, 0.094025612f, + 0.050943073f, 0.32325533f, 0.022730427f, -0.35137668f, + 0.14024362f, 0.23900814f, 0.15030634f, 0.055301215f, + -0.00026439416f, 0.27067012f, -0.73692751f, -1.2809602f, + 0.0046216105f, -0.029788772f, 0.63008219f, 0.09897314f, + 0.11863443f, -0.022830173f, 0.094109789f, 0.16808872f, + -0.050856333f, 0.087444343f, -0.066750087f, -0.087693036f, + 0.13017599f, -0.01741311f, 0.10443351f, -0.05513528f, + -0.058158278f, 0.11269247f, -0.034986563f, -0.084804565f, + 0.10201716f, 0.027870361f, 0.054334246f, 0.12536892f, + 0.049083307f, -0.068826757f, 0.10599995f, -0.073616236f, + -0.013055706f, -0.059742935f, -0.031210424f, -0.1245866f, + -0.080658659f, -0.091842912f, -0.087455414f, -0.014562875f, + -0.053336635f, 0.093647748f, -0.10661628f, -0.016495187f, + 0.09298449f, -0.034992035f, -0.067532696f, -0.084189564f, + 0.013928698f, -0.093313687f, 0.057505716f, -0.098298289f, + 0.052680448f, -0.042546123f, 0.08876586f, -0.090458736f, + -0.035629585f, -0.029061344f, 0.12541504f, 0.020058446f, + 0.054717563f, -0.084798917f, -0.095993064f, 0.071631365f, + -0.023227818f, 0.018625271f, 0.082412735f, 0.10526388f, + 0.009243235f, -0.017673258f, -0.043537762f, 0.004020825f, + -0.060351994f, -0.019623704f, 0.17408659f, -0.92767406f, + -1.009668f, -2.082643f, 0.69186121f, -0.10119108f, + 0.010668402f, 0.39311606f, -0.25546196f, 0.47588298f, + -0.072821945f, 0.05396707f, -0.21413152f, 0.34937906f, + -0.12673144f, 1.7565045f, -0.1600538f, -0.10723756f, + -0.060707361f, -0.89953709f, -0.79765761f, 1.1347106f, + 1.6645039f, -0.17100197f, 1.1486231f, 0.15987588f, + -0.019754117f, 1.5889341f, -0.13020813f, -0.92242098f +}; + +static const float mlp_b3[32] = { + -0.10968009f, -0.16340314f, -0.24421391f, -0.080552384f, 0.23548868f, + -0.24623793f, 0.59806424f, -0.13348117f, -0.11154155f, -0.43775216f, + -0.14048497f, 0.45407951f, -0.17403737f, -0.04285378f, 0.13299535f, + 0.076881848f, -0.045535602f, -0.030676574f, -0.0091929445f, 0.050703857f, + 0.16593724f, 0.42112884f, 0.10538655f, 0.09344887f, 0.56198186f, + 0.095342271f, -0.36718959f, 0.16678773f, 0.0053913067f, -0.29552647f, + 0.29012197f, -0.75337625f +}; + +static const float mlp_w4[416] = { + 0.094596989f, 0.06288442f, 0.12718771f, -0.033175159f, 0.10011427f, + 0.17472202f, -0.045381416f, -0.17106755f, -0.040178224f, -0.046387602f, + 0.035888631f, -0.085654847f, -0.031898279f, -0.084416576f, 0.12954213f, + -0.019197203f, 0.14334847f, 0.12339322f, -0.11325313f, -0.11041804f, + -0.096042737f, 0.12469687f, -0.068862468f, -0.07328397f, 0.072394229f, + -0.14079328f, -0.024450636f, 0.13733813f, -0.20091145f, -0.25455621f, + 0.49352795f, 0.49547595f, 0.36006141f, -0.25464246f, -0.17053933f, + -1.1388822f, -1.1223803f, -1.1126039f, -0.70279557f, 0.25435814f, + 0.17821482f, -0.42045811f, -0.521465f, 0.95192599f, -0.26894936f, + 0.33853886f, -0.48565134f, 0.085126981f, -0.87835187f, -0.69419354f, + -0.88736659f, -0.23339145f, -0.056916807f, -0.28715411f, 0.061258089f, + 0.014359321f, 0.37305042f, -0.098464034f, 0.22814548f, -0.23460184f, + -0.25602758f, -1.3935213f, -1.4199532f, -1.2940515f, 0.61722988f, + -0.067339443f, -0.23935886f, 0.41799378f, -0.24969691f, -0.065489046f, + -0.35824585f, 0.71954632f, 0.35146278f, -0.60431612f, -0.50811398f, + -0.60945076f, -0.5628612f, -0.064812481f, 0.060082011f, 0.27067149f, + 0.48866165f, -0.074354358f, -0.14879745f, 0.29514199f, -0.52727407f, + -0.35562652f, -0.06019479f, -0.58384448f, -0.48970336f, -0.54669285f, + 0.18574308f, -0.053562853f, -0.13297042f, -0.10044597f, -0.078793824f, + -0.13249631f, 0.098590761f, 0.0037000955f, -0.18575174f, 0.0308048f, + 0.032723486f, 0.048677407f, -0.17654762f, -0.15617493f, -0.26358837f, + -0.57036453f, 0.046480305f, 0.2772328f, 0.27206808f, 0.039642997f, + 0.35972828f, 0.57681966f, -0.17182148f, -0.55225235f, -0.63511866f, + -0.50438881f, -0.090628378f, -0.2188773f, -0.26015314f, -0.35582486f, + 1.7405083f, -0.31384864f, -0.078761175f, -0.11584404f, -0.2900497f, + -0.18861353f, -3.0858667f, -2.9690156f, -3.2241826f, -0.20935954f, + 0.079795294f, -0.0035807379f, 0.16862454f, 0.35956645f, -1.3134426f, + -0.45219809f, -0.97669882f, 0.46576178f, 0.20853791f, -0.61673069f, + -0.55626649f, -0.69116604f, -0.11829406f, -0.40321204f, -0.054087963f, + -0.43292788f, 0.22613421f, -0.080602393f, 0.0066896928f, -0.27285558f, + 0.43128595f, 0.31567872f, -0.30544886f, -0.30400059f, -0.5190804f, + 0.79768759f, 0.068582863f, 0.066347808f, -0.16299587f, 0.093009301f, + 0.072849102f, 0.065204352f, 0.10955028f, 0.070722014f, 0.092788167f, + 0.13888592f, -0.029725341f, -0.030883001f, -0.077677824f, -0.14708167f, + -0.043405626f, -0.020198913f, 0.016494306f, 0.10039078f, 0.093348123f, + 0.039721511f, 0.0278177f, 0.078775793f, 0.010879831f, 0.099031776f, + -0.12939276f, 0.17250022f, -0.0089361565f, -0.048386127f, -0.05981509f, + -0.050407387f, -0.31641558f, 1.397669f, -0.65246743f, 0.3327406f, + -0.21704319f, -5.9228983f, -5.7209258f, -5.3829961f, 0.21438089f, + 0.018976986f, 0.14582956f, -0.60716021f, 0.37411517f, 0.49923742f, + 0.659266f, -0.40079996f, -0.36533022f, 0.67727506f, -0.10535682f, + -0.1982379f, -0.16341203f, -0.28219289f, -0.037838768f, -0.1063036f, + -0.23568194f, -0.098688267f, 0.039527301f, -0.039885312f, -0.21378198f, + 0.052073944f, 0.033136461f, 0.036039017f, -0.018277396f, 0.15395153f, + -0.030012168f, -0.092376076f, 0.041379508f, -0.60982811f, 0.32165271f, + 0.50186801f, 0.73216844f, -0.84291798f, -0.31024274f, 0.26733771f, + -4.4106951f, -4.4643846f, -4.4935575f, 0.10087162f, -0.06641072f, + -0.066437289f, 0.071750358f, -0.030624392f, -0.053961661f, 0.1057206f, + -0.13145511f, -0.1164212f, 0.15395029f, 0.14054251f, 0.15677489f, + -0.0047813617f, 0.077780604f, 0.17007232f, -0.24666482f, -0.43329957f, + 0.60725212f, -0.53093249f, -0.02618023f, 0.43020755f, -0.22273432f, + 0.16421124f, -0.91348314f, -0.86027437f, -1.0967145f, -0.40910932f, + -0.24579249f, 0.12371838f, -0.0079166684f, -0.15653501f, -0.20083149f, + -0.52984881f, 0.29125381f, 0.38640186f, 0.52269512f, -0.94004035f, + -0.98326969f, -0.95684838f, -0.64285904f, -0.28382075f, 0.23714989f, + 0.67552352f, -0.53934252f, -0.45257297f, 0.25503677f, -0.091955379f, + -0.60075861f, -0.2474319f, -6.1492357f, -5.7194858f, -6.424665f, + 0.36836615f, 0.19018568f, -3.0455503f, 0.2104509f, 0.23294646f, + 0.17624128f, -0.66216677f, 0.43670148f, 0.55418915f, -0.47033316f, + -0.45789427f, -0.11113391f, -0.23643702f, -0.04084583f, 0.095449723f, + 0.64748234f, -0.013467773f, 0.21085183f, -0.21746054f, -0.44804484f, + -0.23621723f, 0.31381965f, -0.72589624f, -0.91103476f, -0.67396498f, + -0.58693492f, 0.27024621f, -0.004497529f, 0.64351982f, -0.53742594f, + -0.29800868f, -0.83512998f, -0.20740654f, -0.79233992f, -0.64630568f, + 0.23093767f, -0.28981692f, -0.20060307f, -0.02689724f, 0.65379632f, + 0.23495597f, -0.35244721f, 0.24243814f, -0.0082328962f, -0.43204969f, + -0.89931804f, -0.5658167f, 0.029426184f, 0.47303501f, -0.83232898f, + -0.83016527f, -0.69590801f, 0.24183336f, 0.27950493f, 0.079353854f, + -0.10478811f, -0.83179426f, -0.16667096f, 0.94305778f, -0.095799863f, + 0.15761009f, -0.28357998f, -3.0708134f, -3.6293287f, -3.3215404f, + 0.16113949f, -0.13782749f, -0.013483082f, -0.040353119f, -0.21905257f, + -0.3917577f, -0.90436566f, 1.1966972f, -0.17893913f, 0.0042714477f, + -0.42237544f, -0.16459632f, -0.23768038f, 0.11304806f, -0.19036941f, + -0.11161107f, 0.16044159f, -0.062734112f, -0.0014498438f, 0.047703449f, + -0.042067681f, 0.088487118f, -0.22252412f, 0.15077302f, 0.10169559f, + 0.10728151f, 0.10769864f, 0.2454515f, -0.24978223f, 0.19290327f, + 0.31748471f, -0.38534704f, -0.34553638f, -0.52825862f, 0.32211635f, + 0.23344353f, -0.8156653f, -0.80838287f, -0.77924055f, -0.29300714f, + -0.0029131824f, -0.4591876f, 0.51204449f, -0.13296774f, 0.67545152f, + -0.5192064f, 0.38222206f, 0.29423666f, -0.7594682f, -0.90086275f, + -1.0140761f, -1.0503962f, -0.19713224f, 1.2565109f, -0.43830112f, + -0.43692917f, -0.2227847f, 0.0011618949f, -0.35920459f, 0.18818201f, + -0.31922451f, -0.18276367f, 0.084138699f, -0.12449738f, 0.080223061f, + -0.70612156f +}; + +static const float mlp_b4[13] = { -0.43986079f, -0.16702375f, 0.48827702f, + 0.39445737f, 0.033325821f, 0.061956905f, + 0.33271062f, -0.47102851f, 0.25886136f, + -0.84312367f, -0.72804022f, -0.8141064f, + -0.33661196f }; + +#endif // INTRA_MODE_MLP_WEIGHTS_H diff --git a/av2/encoder/intra_mode_search.c b/av2/encoder/intra_mode_search.c index 04b8b85ad6..a1008a69d5 100644 --- a/av2/encoder/intra_mode_search.c +++ b/av2/encoder/intra_mode_search.c @@ -10,10 +10,13 @@ * aomedia.org/license/patent-license/. */ +#include + #include "av2/common/av2_common_int.h" #include "av2/common/intra_dip.h" #include "av2/common/reconintra.h" +#include "av2/encoder/intra_mode_mlp.h" #include "av2/encoder/intra_mode_search.h" #include "av2/encoder/intra_mode_search_utils.h" #include "av2/encoder/palette.h" @@ -322,28 +325,20 @@ void av2_count_colors_highbd(const uint16_t *src, int stride, int rows, } } -/*! \brief prune luma intra mode based on the model rd. - * \param[in] this_model_rd model rd for current mode. - * \param[in] best_model_rd Best model RD seen for this block so - * far. - * \param[in] top_intra_model_rd Top intra model RD seen for this - * block so far. - */ int prune_intra_y_mode(int64_t this_model_rd, int64_t *best_model_rd, - int64_t top_intra_model_rd[]) { + int64_t top_intra_model_rd[], int k) { const double thresh_top = 1.00; - for (int i = 0; i < TOP_INTRA_MODEL_COUNT; i++) { + for (int i = 0; i < k; i++) { if (this_model_rd < top_intra_model_rd[i]) { - for (int j = TOP_INTRA_MODEL_COUNT - 1; j > i; j--) { + for (int j = k - 1; j > i; j--) { top_intra_model_rd[j] = top_intra_model_rd[j - 1]; } top_intra_model_rd[i] = this_model_rd; break; } } - if (top_intra_model_rd[TOP_INTRA_MODEL_COUNT - 1] != INT64_MAX && - this_model_rd > - thresh_top * top_intra_model_rd[TOP_INTRA_MODEL_COUNT - 1]) + if (top_intra_model_rd[k - 1] != INT64_MAX && + this_model_rd > thresh_top * top_intra_model_rd[k - 1]) return 1; if (this_model_rd < *best_model_rd) *best_model_rd = this_model_rd; @@ -1031,7 +1026,8 @@ static INLINE int prune_intra_dip_mode(const AV2_COMP *cpi, MACROBLOCK *x, const MACROBLOCKD *xd = &x->e_mbd; const MB_MODE_INFO *const mbmi = xd->mi[0]; const int64_t this_model_rd = intra_model_yrd(cpi, x, bsize, mode_cost); - if (prune_intra_y_mode(this_model_rd, best_model_rd, top_intra_model_rd) && + if (prune_intra_y_mode(this_model_rd, best_model_rd, top_intra_model_rd, + TOP_INTRA_MODEL_COUNT) && (!xd->lossless[mbmi->segment_id] || mbmi->use_dpcm_y == 0)) return 1; return 0; @@ -1241,9 +1237,14 @@ int64_t av2_handle_intra_mode(IntraModeSearchState *intra_search_state, } int64_t this_model_rd = intra_model_yrd(cpi, x, bsize, mode_cost); - if (prune_intra_y_mode(this_model_rd, best_model_rd, top_intra_model_rd) && + const int k = + cpi->sf.intra_sf.intra_pruning_with_mlp ? 4 : TOP_INTRA_MODEL_COUNT; + if (prune_intra_y_mode(this_model_rd, best_model_rd, top_intra_model_rd, k) && (!xd->lossless[mbmi->segment_id] || mbmi->use_dpcm_y == 0)) return INT64_MAX; + if (cpi->sf.intra_sf.intra_pruning_with_mlp && mbmi->mrl_index == 0 && + av2_is_directional_mode(mbmi->mode)) + intra_search_state->mrl0_dir_mode_survived[mbmi->mode] = 1; av2_init_rd_stats(rd_stats_y); x->prune_tx_partition = 0; av2_pick_uniform_tx_size_type_yrd(cpi, x, rd_stats_y, bsize, best_rd); @@ -1527,7 +1528,7 @@ void search_fsc_mode(const AV2_COMP *const cpi, MACROBLOCK *x, int *rate, this_model_rd = intra_model_yrd(cpi, x, bsize, mode_costs); if (prune_intra_y_mode(this_model_rd, best_model_rd, - top_intra_model_rd) && + top_intra_model_rd, TOP_INTRA_MODEL_COUNT) && (!xd->lossless[mbmi->segment_id] || mbmi->use_dpcm_y == 0)) { continue; } @@ -1596,6 +1597,75 @@ void search_fsc_mode(const AV2_COMP *const cpi, MACROBLOCK *x, int *rate, } } +// Compute MLP-derived base-mode mask for the current block. See header for +// API doc. Runs once per block. +void av2_intra_mlp_compute_mode_mask( + const AV2_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, + uint8_t mlp_mode_mask[INTRA_MODES], int *mlp_fallback, + uint8_t directional_mode_skip_mask[INTRA_MODES]) { + MACROBLOCKD *const xd = &x->e_mbd; + + memset(mlp_mode_mask, 0, INTRA_MODES * sizeof(mlp_mode_mask[0])); + *mlp_fallback = 0; + + // Fall back for 4x4, 4x8, 8x4 blocks. + if (block_size_wide[bsize] * block_size_high[bsize] <= 32) { + *mlp_fallback = 1; + if (cpi->sf.intra_sf.intra_pruning_with_hog) { + prune_intra_mode_with_hog(x, bsize, + cpi->sf.intra_sf.intra_pruning_with_hog_thresh, + directional_mode_skip_mask); + } + return; + } + + float mlp_features[MLP_INPUT_DIM]; + float mlp_logits[MLP_OUTPUT_DIM]; + int mlp_topk_modes[MLP_TOP_K]; + + // Extract neighbor context. Treat inter / IBC neighbors as unavailable so + // the MLP receives the same "no intra neighbor" sentinel it saw during + // training; otherwise mbmi->mode would be an inter mode index (>= + // INTRA_MODES), which collides with the [0, 12] intra range and is + // out-of-distribution. + int above_mode = -1, above_delta = 0, left_mode = -1, left_delta = 0; + const MB_MODE_INFO *above_mi = xd->above_mbmi; + const MB_MODE_INFO *left_mi = xd->left_mbmi; + if (above_mi && !is_inter_block(above_mi, SHARED_PART)) { + above_mode = above_mi->mode; + above_delta = above_mi->angle_delta[PLANE_TYPE_Y]; + } + if (left_mi && !is_inter_block(left_mi, SHARED_PART)) { + left_mode = left_mi->mode; + left_delta = left_mi->angle_delta[PLANE_TYPE_Y]; + } + + intra_mode_mlp_prepare_features( + x->plane[0].src.buf, x->plane[0].src.stride, xd->bd, + block_size_wide[bsize], block_size_high[bsize], + x->qindex - MAXQ_OFFSET * (xd->bd - 8), above_mode, above_delta, + left_mode, left_delta, !frame_is_intra_only(&cpi->common), mlp_features); + + intra_mode_mlp_predict(mlp_features, mlp_logits); + + // Use MLP top-K if confident, fall back to HOG if all logits negative. + float max_logit = mlp_logits[0]; + for (int i = 1; i < MLP_OUTPUT_DIM; i++) + if (mlp_logits[i] > max_logit) max_logit = mlp_logits[i]; + + if (max_logit >= 0.0f) { + intra_mode_mlp_get_topk(mlp_logits, MLP_TOP_K, mlp_topk_modes); + for (int i = 0; i < MLP_TOP_K; i++) mlp_mode_mask[mlp_topk_modes[i]] = 1; + } else { + *mlp_fallback = 1; + if (cpi->sf.intra_sf.intra_pruning_with_hog) { + prune_intra_mode_with_hog(x, bsize, + cpi->sf.intra_sf.intra_pruning_with_hog_thresh, + directional_mode_skip_mask); + } + } +} + // Finds the best non-intrabc mode on an intra frame. int64_t av2_rd_pick_intra_sby_mode(const AV2_COMP *const cpi, ThreadData *td, MACROBLOCK *x, int *rate, @@ -1633,7 +1703,12 @@ int64_t av2_rd_pick_intra_sby_mode(const AV2_COMP *const cpi, ThreadData *td, int mode_costs = 0; mbmi->angle_delta[PLANE_TYPE_Y] = 0; - if (cpi->sf.intra_sf.intra_pruning_with_hog) { + uint8_t mlp_mode_mask[INTRA_MODES] = { 0 }; + int mlp_fallback = !cpi->sf.intra_sf.intra_pruning_with_mlp; + if (cpi->sf.intra_sf.intra_pruning_with_mlp) { + av2_intra_mlp_compute_mode_mask(cpi, x, bsize, mlp_mode_mask, &mlp_fallback, + directional_mode_skip_mask); + } else if (cpi->sf.intra_sf.intra_pruning_with_hog) { prune_intra_mode_with_hog(x, bsize, cpi->sf.intra_sf.intra_pruning_with_hog_thresh, directional_mode_skip_mask); @@ -1657,6 +1732,8 @@ int64_t av2_rd_pick_intra_sby_mode(const AV2_COMP *const cpi, ThreadData *td, mbmi->dpcm_mode_y = 0; // mbmi->dpcm_angle_delta = 0; // Searches the intra-modes except for intrabc, palette, and filter_intra. + const int model_rd_k = + cpi->sf.intra_sf.intra_pruning_with_mlp ? 4 : TOP_INTRA_MODEL_COUNT; int64_t top_intra_model_rd[TOP_INTRA_MODEL_COUNT]; for (int i = 0; i < TOP_INTRA_MODEL_COUNT; i++) { top_intra_model_rd[i] = INT64_MAX; @@ -1671,6 +1748,7 @@ int64_t av2_rd_pick_intra_sby_mode(const AV2_COMP *const cpi, ThreadData *td, dpcm_loop_num = 2; } for (int dpcm_index = 0; dpcm_index < dpcm_loop_num; ++dpcm_index) { + uint8_t mrl0_dir_mode_survived[INTRA_MODES] = { 0 }; for (int mrl_idx = 0; mrl_idx < (enable_mrls_flag ? MRL_LINE_NUMBER : 1); ++mrl_idx) { mbmi->mrl_index = mrl_idx; @@ -1736,12 +1814,18 @@ int64_t av2_rd_pick_intra_sby_mode(const AV2_COMP *const cpi, ThreadData *td, mbmi->mode == PAETH_PRED) continue; is_directional_mode = av2_is_directional_mode(mbmi->mode); + if (cpi->sf.intra_sf.intra_pruning_with_mlp && mrl_idx > 0 && + is_directional_mode && mode_idx >= FIRST_MODE_COUNT && + !mrl0_dir_mode_survived[mbmi->mode]) + continue; + if (!is_directional_mode && mrl_idx) continue; + if (!mlp_fallback && mode_idx >= FIRST_MODE_COUNT && + !mlp_mode_mask[mbmi->mode]) + continue; if (is_directional_mode && directional_mode_skip_mask[mbmi->mode] && mode_idx >= FIRST_MODE_COUNT) continue; - if (!is_directional_mode && mrl_idx) continue; - if (((best_mbmi.mrl_index == 0 && av2_is_directional_mode(best_mbmi.mode) == 0) || (best_mbmi.mrl_index && mbmi->multi_line_mrl == 0)) && @@ -1765,10 +1849,14 @@ int64_t av2_rd_pick_intra_sby_mode(const AV2_COMP *const cpi, ThreadData *td, int64_t this_model_rd; this_model_rd = intra_model_yrd(cpi, x, bsize, mode_costs); if (prune_intra_y_mode(this_model_rd, &best_model_rd, - top_intra_model_rd) && + top_intra_model_rd, model_rd_k) && (!xd->lossless[mbmi->segment_id] || mbmi->use_dpcm_y == 0)) continue; + if (cpi->sf.intra_sf.intra_pruning_with_mlp && mrl_idx == 0 && + is_directional_mode) + mrl0_dir_mode_survived[mbmi->mode] = 1; + av2_pick_uniform_tx_size_type_yrd(cpi, x, &this_rd_stats, bsize, best_rd); this_rate_tokenonly = this_rd_stats.rate; diff --git a/av2/encoder/intra_mode_search.h b/av2/encoder/intra_mode_search.h index 26ffa326b8..91ca729215 100644 --- a/av2/encoder/intra_mode_search.h +++ b/av2/encoder/intra_mode_search.h @@ -71,6 +71,15 @@ typedef struct IntraModeSearchState { int dir_mode_skip_mask_ready; /**@}*/ + /*! + * \brief Inter-frame MRL=0 survival mask: directional base modes whose + * model_rd at (mrl_index=0) survived prune_intra_y_mode. Read at MRL>0 + * call sites to skip unnecessary MRL>0 search. Reset by the caller before + * each inter-frame intra evaluation. Only used when intra_pruning_with_mlp is + * enabled. + */ + uint8_t mrl0_dir_mode_survived[INTRA_MODES]; + /** \name Chroma mode search cache * A cache of the best chroma prediction mode to avoid having to search for * chroma predictions repeatedly in \ref av2_handle_intra_mode() @@ -189,6 +198,27 @@ int64_t av2_handle_intra_mode(IntraModeSearchState *intra_search_state, int64_t *best_intra_rd, int64_t *best_model_rd, int64_t top_intra_model_rd[]); +/*!\brief Compute the MLP-derived intra base-mode mask for the current block. + * + * Runs once per block. Output mlp_mode_mask is a bitmap over INTRA_MODES; + * entries set to 1 are MLP top-K base modes that should be evaluated. + * + * If MLP cannot be applied (4x4, 4x8, or 8x4 block, or low confidence), + * *mlp_fallback is set to 1 and directional_mode_skip_mask is populated by + * prune_intra_mode_with_hog so the caller can use HOG pruning instead. + * + * \param[in] cpi + * \param[in] x + * \param[in] bsize + * \param[out] mlp_mode_mask Bitmap of base modes selected by MLP. + * \param[out] mlp_fallback Set to 1 if MLP cannot be applied. + * \param[out] directional_mode_skip_mask Filled by HOG when *mlp_fallback==1. + */ +void av2_intra_mlp_compute_mode_mask( + const AV2_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, + uint8_t mlp_mode_mask[INTRA_MODES], int *mlp_fallback, + uint8_t directional_mode_skip_mask[INTRA_MODES]); + /*!\brief Search for the best forward skip coding mode for intra blocks. * * \ingroup intra_mode_search @@ -357,9 +387,11 @@ void av2_count_colors_highbd(const uint16_t *src, int stride, int rows, * far. * \param[in] top_intra_model_rd Top intra model RD seen for this * block so far. + * \param[in] k Number of top model RD candidates to + * keep in top_intra_model_rd. */ int prune_intra_y_mode(int64_t this_model_rd, int64_t *best_model_rd, - int64_t top_intra_model_rd[]); + int64_t top_intra_model_rd[], int k); #ifdef __cplusplus } // extern "C" diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 954466216b..5640841233 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -8575,8 +8575,25 @@ static void av2_evaluate_intra_modes_in_inter_frame( } mbmi->dpcm_mode_y = 0; + uint8_t mlp_mode_mask[INTRA_MODES] = { 0 }; + int mlp_fallback = !sf->intra_sf.intra_pruning_with_mlp; + uint8_t mlp_dir_skip_mask[INTRA_MODES] = { 0 }; + if (sf->intra_sf.intra_pruning_with_mlp && is_intra_mode_allowed) { + av2_intra_mlp_compute_mode_mask(cpi, x, bsize, mlp_mode_mask, &mlp_fallback, + mlp_dir_skip_mask); + // mlp_dir_skip_mask is only populated (via prune_intra_mode_with_hog) when + // mlp_fallback is set. Seed av2_handle_intra_mode's lazy HOG cache with it + // so that call doesn't redundantly recompute the identical HOG mask. + if (mlp_fallback) { + memcpy(search_state->intra_search_state.directional_mode_skip_mask, + mlp_dir_skip_mask, sizeof(mlp_dir_skip_mask)); + search_state->intra_search_state.dir_mode_skip_mask_ready = 1; + } + } for (int dpcm_idx = 0; dpcm_idx < dpcm_loop_num; dpcm_idx++) { mbmi->use_dpcm_y = dpcm_idx; + memset(search_state->intra_search_state.mrl0_dir_mode_survived, 0, + sizeof(search_state->intra_search_state.mrl0_dir_mode_survived)); for (int fsc_mode = 0; fsc_mode < (allow_fsc_intra(cm, bsize, mbmi) ? FSC_MODES : 1); fsc_mode++) { @@ -8667,6 +8684,15 @@ static void av2_evaluate_intra_modes_in_inter_frame( mbmi->angle_delta[0] == 0) { mbmi->dpcm_mode_y = mbmi->mode - 1; } + if (!mlp_fallback && mbmi->y_mode_idx >= FIRST_MODE_COUNT && + !mlp_mode_mask[mbmi->mode]) + continue; + if (sf->intra_sf.intra_pruning_with_mlp && mbmi->mrl_index > 0 && + av2_is_directional_mode(mbmi->mode) && + mbmi->y_mode_idx >= FIRST_MODE_COUNT && + !search_state->intra_search_state + .mrl0_dir_mode_survived[mbmi->mode]) + continue; RD_STATS intra_rd_stats, intra_rd_stats_y, intra_rd_stats_uv; intra_rd_stats.rdcost = av2_handle_intra_mode( &search_state->intra_search_state, cpi, x, bsize, diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 425e40f86e..3ddab1f7c7 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -350,6 +350,7 @@ static void set_good_speed_features_framesize_independent( sf->inter_sf.prune_refinemv_by_ref_idx = 1; sf->inter_sf.prune_interintra_by_ref_idx = 1; sf->inter_sf.prune_warp_delta_by_ref_idx = 1; + sf->intra_sf.intra_pruning_with_mlp = 1; sf->intra_sf.include_dip_for_top_n_model_rd_pruning = true; @@ -816,6 +817,7 @@ static AVM_INLINE void init_interp_sf(INTERP_FILTER_SPEED_FEATURES *interp_sf) { static AVM_INLINE void init_intra_sf(INTRA_MODE_SPEED_FEATURES *intra_sf) { intra_sf->skip_intra_in_interframe = 1; intra_sf->intra_pruning_with_hog = 0; + intra_sf->intra_pruning_with_mlp = 0; intra_sf->src_var_thresh_intra_skip = 1; intra_sf->prune_palette_search_level = 0; intra_sf->reuse_uv_mode_rd_info = false; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 9b79d50fc3..2c76d444fd 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -804,6 +804,10 @@ typedef struct INTRA_MODE_SPEED_FEATURES { // TODO(anyone): tune intra_pruning_with_hog_thresh for various speeds. float intra_pruning_with_hog_thresh; + // Prune intra mode candidates using an MLP trained on source pixels and + // neighbor context. Enabled at speed >= 1. + int intra_pruning_with_mlp; + // Enable/disable smooth intra modes. int disable_smooth_intra; diff --git a/av2/encoder/x86/intra_mode_mlp_avx2.c b/av2/encoder/x86/intra_mode_mlp_avx2.c new file mode 100644 index 0000000000..290cfdcd63 --- /dev/null +++ b/av2/encoder/x86/intra_mode_mlp_avx2.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include + +#include "config/av2_rtcd.h" + +// Processes 8 output neurons at a time. Assumes out_dim is a multiple of 8, +// true for all layer sizes this is called with (MLP_H1/H2/H3_DIM). +void av2_intra_mlp_layer_avx2(const float *input, int in_dim, + const float *weights, const float *bias, + float *output, int out_dim, int apply_relu) { + for (int i = 0; i < out_dim; i += 8) { + __m256 sum0 = _mm256_loadu_ps(&bias[i]); + __m256 sum1 = _mm256_setzero_ps(); + __m256 sum2 = _mm256_setzero_ps(); + __m256 sum3 = _mm256_setzero_ps(); + int j = 0; + for (; j + 3 < in_dim; j += 4) { + __m256 w0 = _mm256_loadu_ps(&weights[(j + 0) * out_dim + i]); + __m256 w1 = _mm256_loadu_ps(&weights[(j + 1) * out_dim + i]); + __m256 w2 = _mm256_loadu_ps(&weights[(j + 2) * out_dim + i]); + __m256 w3 = _mm256_loadu_ps(&weights[(j + 3) * out_dim + i]); + __m256 f0 = _mm256_broadcast_ss(&input[j + 0]); + __m256 f1 = _mm256_broadcast_ss(&input[j + 1]); + __m256 f2 = _mm256_broadcast_ss(&input[j + 2]); + __m256 f3 = _mm256_broadcast_ss(&input[j + 3]); + sum0 = _mm256_add_ps(sum0, _mm256_mul_ps(f0, w0)); + sum1 = _mm256_add_ps(sum1, _mm256_mul_ps(f1, w1)); + sum2 = _mm256_add_ps(sum2, _mm256_mul_ps(f2, w2)); + sum3 = _mm256_add_ps(sum3, _mm256_mul_ps(f3, w3)); + } + sum0 = _mm256_add_ps(sum0, sum1); + sum2 = _mm256_add_ps(sum2, sum3); + sum0 = _mm256_add_ps(sum0, sum2); + for (; j < in_dim; j++) { + __m256 w = _mm256_loadu_ps(&weights[j * out_dim + i]); + __m256 f = _mm256_broadcast_ss(&input[j]); + sum0 = _mm256_add_ps(sum0, _mm256_mul_ps(f, w)); + } + if (apply_relu) { + __m256 zero = _mm256_setzero_ps(); + sum0 = _mm256_max_ps(sum0, zero); + } + _mm256_storeu_ps(&output[i], sum0); + } +} diff --git a/av2/encoder/x86/intra_mode_mlp_sse2.c b/av2/encoder/x86/intra_mode_mlp_sse2.c new file mode 100644 index 0000000000..081bf708e2 --- /dev/null +++ b/av2/encoder/x86/intra_mode_mlp_sse2.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include + +#include "config/av2_rtcd.h" + +// Processes 4 output neurons at a time. Assumes out_dim is a multiple of 4, +// true for all layer sizes this is called with (MLP_H1/H2/H3_DIM). +void av2_intra_mlp_layer_sse2(const float *input, int in_dim, + const float *weights, const float *bias, + float *output, int out_dim, int apply_relu) { + for (int i = 0; i < out_dim; i += 4) { + __m128 sum0 = _mm_loadu_ps(&bias[i]); + __m128 sum1 = _mm_setzero_ps(); + int j = 0; + for (; j + 1 < in_dim; j += 2) { + __m128 w0 = _mm_loadu_ps(&weights[(j + 0) * out_dim + i]); + __m128 w1 = _mm_loadu_ps(&weights[(j + 1) * out_dim + i]); + __m128 f0 = _mm_set1_ps(input[j + 0]); + __m128 f1 = _mm_set1_ps(input[j + 1]); + sum0 = _mm_add_ps(sum0, _mm_mul_ps(f0, w0)); + sum1 = _mm_add_ps(sum1, _mm_mul_ps(f1, w1)); + } + sum0 = _mm_add_ps(sum0, sum1); + for (; j < in_dim; j++) { + __m128 w = _mm_loadu_ps(&weights[j * out_dim + i]); + __m128 f = _mm_set1_ps(input[j]); + sum0 = _mm_add_ps(sum0, _mm_mul_ps(f, w)); + } + if (apply_relu) { + __m128 zero = _mm_setzero_ps(); + sum0 = _mm_max_ps(sum0, zero); + } + _mm_storeu_ps(&output[i], sum0); + } +} diff --git a/test/av2_intra_mlp_layer_test.cc b/test/av2_intra_mlp_layer_test.cc new file mode 100644 index 0000000000..9790e309fc --- /dev/null +++ b/test/av2_intra_mlp_layer_test.cc @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include +#include +#include + +#include "third_party/googletest/src/googletest/include/gtest/gtest.h" + +#include "avm/avm_integer.h" +#include "config/avm_config.h" +#include "config/av2_rtcd.h" +#include "av2/encoder/intra_mode_mlp_weights.h" +#include "test/acm_random.h" +#include "test/clear_system_state.h" +#include "test/util.h" + +namespace { +typedef void (*IntraMlpLayer_Func)(const float *input, int in_dim, + const float *weights, const float *bias, + float *output, int out_dim, int apply_relu); + +typedef std::tuple IntraMlpLayerTestParam; + +const float epsilon = 1e-3f; // Error threshold for functional equivalence + +class IntraMlpLayerTest + : public ::testing::TestWithParam { + public: + virtual void SetUp() { target_func_ = GET_PARAM(0); } + + protected: + void RunLayerTest(int in_dim, int out_dim, int apply_relu); + + IntraMlpLayer_Func target_func_; + libavm_test::ACMRandom rng_; +}; +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(IntraMlpLayerTest); + +void IntraMlpLayerTest::RunLayerTest(int in_dim, int out_dim, int apply_relu) { + libavm_test::ClearSystemState(); + std::vector input(in_dim); + std::vector weights(in_dim * out_dim); + std::vector bias(out_dim); + std::vector output_ref(out_dim); + std::vector output_test(out_dim); + + for (int iter = 0; iter < 1000 && !HasFatalFailure(); ++iter) { + for (int i = 0; i < in_dim; i++) + input[i] = ((float)rng_.Rand31() - (1 << 30)) / (1u << 31); + for (int i = 0; i < in_dim * out_dim; i++) + weights[i] = ((float)rng_.Rand31() - (1 << 30)) / (1u << 31); + for (int i = 0; i < out_dim; i++) + bias[i] = ((float)rng_.Rand31() - (1 << 30)) / (1u << 31); + + av2_intra_mlp_layer_c(input.data(), in_dim, weights.data(), bias.data(), + output_ref.data(), out_dim, apply_relu); + target_func_(input.data(), in_dim, weights.data(), bias.data(), + output_test.data(), out_dim, apply_relu); + libavm_test::ClearSystemState(); + + for (int i = 0; i < out_dim; i++) { + if (fabsf(output_ref[i]) < epsilon) { + ASSERT_LE(fabsf(output_test[i]), epsilon) + << "Reference output was near-zero, test output was not " + << "(in_dim=" << in_dim << ", out_dim=" << out_dim << ")"; + } else { + const float relative_error = + fabsf((output_ref[i] - output_test[i]) / output_ref[i]); + ASSERT_LE(relative_error, epsilon) + << "Excessive relative error between reference and test " + << "(in_dim=" << in_dim << ", out_dim=" << out_dim << ")"; + } + } + } +} + +// Covers the layer shapes actually used by intra_mode_mlp_predict() +// (MLP_INPUT_DIM->MLP_H1_DIM->MLP_H2_DIM->MLP_H3_DIM), all with ReLU applied. +TEST_P(IntraMlpLayerTest, RandomValues) { + RunLayerTest(MLP_INPUT_DIM, MLP_H1_DIM, 1); + RunLayerTest(MLP_H1_DIM, MLP_H2_DIM, 1); + RunLayerTest(MLP_H2_DIM, MLP_H3_DIM, 1); +} + +#if HAVE_SSE2 && !CONFIG_EXCLUDE_SIMD_MISMATCH +INSTANTIATE_TEST_SUITE_P(SSE2, IntraMlpLayerTest, + ::testing::Values(av2_intra_mlp_layer_sse2)); +#endif + +#if HAVE_AVX2 && !CONFIG_EXCLUDE_SIMD_MISMATCH +INSTANTIATE_TEST_SUITE_P(AVX2, IntraMlpLayerTest, + ::testing::Values(av2_intra_mlp_layer_avx2)); +#endif + +#if HAVE_NEON && !CONFIG_EXCLUDE_SIMD_MISMATCH +INSTANTIATE_TEST_SUITE_P(NEON, IntraMlpLayerTest, + ::testing::Values(av2_intra_mlp_layer_neon)); +#endif + +} // namespace diff --git a/test/intra_mode_mlp_test.cc b/test/intra_mode_mlp_test.cc new file mode 100644 index 0000000000..b55bb614e7 --- /dev/null +++ b/test/intra_mode_mlp_test.cc @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include +#include + +#include "third_party/googletest/src/googletest/include/gtest/gtest.h" + +#include "av2/encoder/intra_mode_mlp.h" +#include "av2/encoder/intra_mode_mlp_weights.h" +#include "test/acm_random.h" + +namespace { + +constexpr float kEps = 1e-4f; + +// --------------------------------------------------------------------------- +// intra_mode_mlp_get_topk +// --------------------------------------------------------------------------- + +TEST(IntraModeMlpGetTopk, ReturnsDescendingOrderIndices) { + // Distinct values, so the top-k order is unambiguous. + float logits[MLP_OUTPUT_DIM] = { 0.1f, 0.9f, 0.3f, -0.2f, 0.05f, 0.7f, 0.15f, + 0.0f, 0.4f, -1.0f, 0.6f, 0.25f, 0.55f }; + int modes[MLP_OUTPUT_DIM]; + intra_mode_mlp_get_topk(logits, 5, modes); + // Sorted descending: 0.9(1), 0.7(5), 0.6(10), 0.55(12), 0.4(8) + const int expected[5] = { 1, 5, 10, 12, 8 }; + for (int i = 0; i < 5; i++) { + EXPECT_EQ(modes[i], expected[i]) << "mismatch at top-" << i; + } +} + +TEST(IntraModeMlpGetTopk, NoDuplicatesEvenWithTies) { + float logits[MLP_OUTPUT_DIM]; + for (int i = 0; i < MLP_OUTPUT_DIM; i++) logits[i] = 0.5f; // all tied + int modes[MLP_OUTPUT_DIM]; + intra_mode_mlp_get_topk(logits, MLP_OUTPUT_DIM, modes); + bool seen[MLP_OUTPUT_DIM] = { false }; + for (int i = 0; i < MLP_OUTPUT_DIM; i++) { + ASSERT_GE(modes[i], 0); + ASSERT_LT(modes[i], MLP_OUTPUT_DIM); + ASSERT_FALSE(seen[modes[i]]) << "duplicate mode " << modes[i]; + seen[modes[i]] = true; + } +} + +// Regression test: a NaN logit must not corrupt the fallback and produce a +// duplicate index (see intra_mode_mlp_get_topk's NaN-safe best_idx fallback). +TEST(IntraModeMlpGetTopk, NanLogitsDoNotProduceDuplicates) { + float logits[MLP_OUTPUT_DIM] = { 0.9f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, + 0.7f, 0.8f, 0.0f, -0.1f, -0.2f, -0.3f }; + const float nan_val = std::nanf(""); + for (int i = 5; i < MLP_OUTPUT_DIM; i++) logits[i] = nan_val; + + int modes[MLP_OUTPUT_DIM]; + intra_mode_mlp_get_topk(logits, MLP_OUTPUT_DIM, modes); + bool seen[MLP_OUTPUT_DIM] = { false }; + for (int i = 0; i < MLP_OUTPUT_DIM; i++) { + ASSERT_GE(modes[i], 0); + ASSERT_LT(modes[i], MLP_OUTPUT_DIM); + ASSERT_FALSE(seen[modes[i]]) + << "duplicate mode " << modes[i] << " with NaN logits present"; + seen[modes[i]] = true; + } +} + +TEST(IntraModeMlpGetTopk, KEqualsOneReturnsMax) { + float logits[MLP_OUTPUT_DIM] = { 0.1f, 0.2f, 0.9f, 0.3f, 0.4f, 0.5f, 0.6f, + 0.7f, 0.8f, 0.0f, -0.1f, -0.2f, -0.3f }; + int modes[1]; + intra_mode_mlp_get_topk(logits, 1, modes); + EXPECT_EQ(modes[0], 2); +} + +// --------------------------------------------------------------------------- +// intra_mode_mlp_prepare_features +// --------------------------------------------------------------------------- + +class IntraModeMlpPrepareFeaturesTest : public ::testing::Test { + protected: + static constexpr int kBw = 16; + static constexpr int kBh = 16; + static constexpr int kStride = kBw; + static constexpr int kBd = 10; + + std::vector src_buf_ = std::vector(kStride * kBh); +}; + +TEST_F(IntraModeMlpPrepareFeaturesTest, ConstantBlockDownsamplesToConstant) { + const uint16_t kValue = 100; + for (int i = 0; i < kStride * kBh; i++) src_buf_[i] = kValue; + + float features[MLP_INPUT_DIM]; + intra_mode_mlp_prepare_features(src_buf_.data(), kStride, kBd, kBw, kBh, 128, + -1, 0, -1, 0, 0, features); + + const float pixel_norm = (float)((1 << kBd) - 1); + for (int i = 0; i < 64; i++) { + EXPECT_NEAR(features[i], kValue / pixel_norm, kEps) + << "pixel feature " << i; + } +} + +TEST_F(IntraModeMlpPrepareFeaturesTest, AbsentNeighborUsesSentinel) { + for (int i = 0; i < kStride * kBh; i++) src_buf_[i] = 0; + float features[MLP_INPUT_DIM]; + intra_mode_mlp_prepare_features(src_buf_.data(), kStride, kBd, kBw, kBh, 128, + /*neighbor_above_mode=*/-1, /*delta=*/5, + /*neighbor_left_mode=*/-1, /*delta=*/-5, 0, + features); + // Absent neighbor -> sentinel mode 13, delta forced to 0 regardless of the + // (don't-care) delta argument passed in. + EXPECT_NEAR(features[64], 13.0f / MLP_NORM_NEIGHBOR_MODE, kEps); + EXPECT_NEAR(features[65], + (0.0f + MLP_NORM_DELTA_OFFSET) / MLP_NORM_DELTA_RANGE, kEps); + EXPECT_NEAR(features[66], 13.0f / MLP_NORM_NEIGHBOR_MODE, kEps); + EXPECT_NEAR(features[67], + (0.0f + MLP_NORM_DELTA_OFFSET) / MLP_NORM_DELTA_RANGE, kEps); +} + +TEST_F(IntraModeMlpPrepareFeaturesTest, PresentNeighborUsesActualValues) { + for (int i = 0; i < kStride * kBh; i++) src_buf_[i] = 0; + float features[MLP_INPUT_DIM]; + intra_mode_mlp_prepare_features(src_buf_.data(), kStride, kBd, kBw, kBh, 128, + /*neighbor_above_mode=*/5, /*delta=*/2, + /*neighbor_left_mode=*/1, /*delta=*/-1, 0, + features); + EXPECT_NEAR(features[64], 5.0f / MLP_NORM_NEIGHBOR_MODE, kEps); + EXPECT_NEAR(features[65], + (2.0f + MLP_NORM_DELTA_OFFSET) / MLP_NORM_DELTA_RANGE, kEps); + EXPECT_NEAR(features[66], 1.0f / MLP_NORM_NEIGHBOR_MODE, kEps); + EXPECT_NEAR(features[67], + (-1.0f + MLP_NORM_DELTA_OFFSET) / MLP_NORM_DELTA_RANGE, kEps); +} + +TEST_F(IntraModeMlpPrepareFeaturesTest, + SizeQpAndInterFlagAreNormalizedCorrectly) { + for (int i = 0; i < kStride * kBh; i++) src_buf_[i] = 0; + float features[MLP_INPUT_DIM]; + intra_mode_mlp_prepare_features(src_buf_.data(), kStride, kBd, kBw, kBh, 128, + -1, 0, -1, 0, /*is_inter_frame=*/1, features); + EXPECT_NEAR(features[68], (float)kBw / MLP_NORM_BW, kEps); + EXPECT_NEAR(features[69], (float)kBh / MLP_NORM_BH, kEps); + EXPECT_NEAR(features[70], 128.0f / MLP_NORM_QP, kEps); + EXPECT_FLOAT_EQ(features[71], 1.0f); + + intra_mode_mlp_prepare_features(src_buf_.data(), kStride, kBd, kBw, kBh, 128, + -1, 0, -1, 0, /*is_inter_frame=*/0, features); + EXPECT_FLOAT_EQ(features[71], 0.0f); +} + +// Block where pixel value depends only on column (dx-dominant gradient) +// produces a Sobel dx of exactly 8 and dy of exactly 0 at every interior +// pixel (verified by hand from the Sobel kernel weights), landing all HOG +// energy in bin 0 with no truncation ambiguity (mag=8 is even). +TEST_F(IntraModeMlpPrepareFeaturesTest, DxOnlyGradientConcentratesInBinZero) { + for (int r = 0; r < kBh; r++) + for (int c = 0; c < kBw; c++) src_buf_[r * kStride + c] = (uint16_t)c; + + float features[MLP_INPUT_DIM]; + intra_mode_mlp_prepare_features(src_buf_.data(), kStride, kBd, kBw, kBh, 128, + -1, 0, -1, 0, 0, features); + const float *hog = &features[72]; + EXPECT_NEAR(hog[0], 1.0f, 0.01f); + for (int i = 1; i < 32; i++) EXPECT_NEAR(hog[i], 0.0f, 0.01f) << "bin " << i; +} + +// Block where pixel value depends only on row (dy-dominant gradient, dx==0) +// hits the dx==0 special case, which splits energy evenly between bin 0 and +// bin 31. +TEST_F(IntraModeMlpPrepareFeaturesTest, DyOnlyGradientSplitsBinZeroAndBin31) { + for (int r = 0; r < kBh; r++) + for (int c = 0; c < kBw; c++) src_buf_[r * kStride + c] = (uint16_t)r; + + float features[MLP_INPUT_DIM]; + intra_mode_mlp_prepare_features(src_buf_.data(), kStride, kBd, kBw, kBh, 128, + -1, 0, -1, 0, 0, features); + const float *hog = &features[72]; + EXPECT_NEAR(hog[0], 0.5f, 0.01f); + EXPECT_NEAR(hog[31], 0.5f, 0.01f); + for (int i = 1; i < 31; i++) EXPECT_NEAR(hog[i], 0.0f, 0.01f) << "bin " << i; +} + +// --------------------------------------------------------------------------- +// intra_mode_mlp_predict +// --------------------------------------------------------------------------- + +TEST(IntraModeMlpPredict, ProducesFiniteOutputForZeroInput) { + float features[MLP_INPUT_DIM] = { 0.0f }; + float logits[MLP_OUTPUT_DIM]; + intra_mode_mlp_predict(features, logits); + for (int i = 0; i < MLP_OUTPUT_DIM; i++) { + EXPECT_TRUE(std::isfinite(logits[i])) << "logit " << i << " not finite"; + } +} + +TEST(IntraModeMlpPredict, IsDeterministic) { + libavm_test::ACMRandom rng; + float features[MLP_INPUT_DIM]; + for (int i = 0; i < MLP_INPUT_DIM; i++) + features[i] = ((float)rng.Rand31() - (1 << 30)) / (1u << 31); + + float logits_a[MLP_OUTPUT_DIM]; + float logits_b[MLP_OUTPUT_DIM]; + intra_mode_mlp_predict(features, logits_a); + intra_mode_mlp_predict(features, logits_b); + for (int i = 0; i < MLP_OUTPUT_DIM; i++) { + EXPECT_TRUE(std::isfinite(logits_a[i])); + EXPECT_FLOAT_EQ(logits_a[i], logits_b[i]) << "logit " << i; + } +} + +TEST(IntraModeMlpPredict, TopkOnPredictOutputIsWellFormed) { + float features[MLP_INPUT_DIM] = { 0.0f }; + float logits[MLP_OUTPUT_DIM]; + intra_mode_mlp_predict(features, logits); + + int modes[MLP_TOP_K]; + intra_mode_mlp_get_topk(logits, MLP_TOP_K, modes); + bool seen[MLP_OUTPUT_DIM] = { false }; + for (int i = 0; i < MLP_TOP_K; i++) { + ASSERT_GE(modes[i], 0); + ASSERT_LT(modes[i], MLP_OUTPUT_DIM); + ASSERT_FALSE(seen[modes[i]]); + seen[modes[i]] = true; + } +} + +} // namespace diff --git a/test/test.cmake b/test/test.cmake index e2eed9ff56..c87dc301af 100644 --- a/test/test.cmake +++ b/test/test.cmake @@ -206,6 +206,8 @@ if(NOT BUILD_SHARED_LIBS) "${AVM_ROOT}/test/arf_freq_test.cc" "${AVM_ROOT}/test/av2_convolve_test.cc" "${AVM_ROOT}/test/av2_nn_predict_test.cc" + "${AVM_ROOT}/test/av2_intra_mlp_layer_test.cc" + "${AVM_ROOT}/test/intra_mode_mlp_test.cc" "${AVM_ROOT}/test/av2_wedge_utils_test.cc" "${AVM_ROOT}/test/av2_ccso_simd_cmp.cc" "${AVM_ROOT}/test/blend_a64_mask_1d_test.cc" From 0efefd130410eb876a707db01a260e7c3ae68497 Mon Sep 17 00:00:00 2001 From: ram Date: Wed, 29 Jul 2026 01:37:59 +0530 Subject: [PATCH 38/51] Cleanup PartitionSearchState context (#5157) - partition_allowed_*, prune_partition_* fields are grouped into one array and made accessible via partition_type No stats changed Change-Id: I9983d117e36805b9c936038cdcdbd22c2fc23413 --- av2/encoder/encodeframe_utils.h | 24 +- av2/encoder/partition_search.c | 415 ++++++++++++++----------------- av2/encoder/partition_search.h | 24 +- av2/encoder/partition_strategy.c | 155 ++++++------ av2/encoder/partition_strategy.h | 31 +-- 5 files changed, 298 insertions(+), 351 deletions(-) diff --git a/av2/encoder/encodeframe_utils.h b/av2/encoder/encodeframe_utils.h index d8f1b5b922..caf5a04c9c 100644 --- a/av2/encoder/encodeframe_utils.h +++ b/av2/encoder/encodeframe_utils.h @@ -152,29 +152,23 @@ typedef struct PartitionSearchState { // rect_part_rd[1][i] is the RD cost of ith partition index of PARTITION_VERT. int64_t rect_part_rd[NUM_RECT_PARTS][SUB_PARTITIONS_RECT]; + // Allowed partition types for the partition block. + PARTITION_TYPE forced_partition; + bool is_block_splittable; + bool do_rectangular_split; + bool partition_allowed[ALL_PARTITION_TYPES]; + // Flags to prune/skip particular partition size evaluation. - int terminate_partition_search; - int partition_none_allowed; - int partition_rect_allowed[NUM_RECT_PARTS]; - int do_rectangular_split; - int partition_split_allowed; - bool prune_partition_none; + bool terminate_partition_search; + bool prune_partition[EXT_PARTITION_TYPES]; #if CONFIG_ML_PART_SPLIT bool prune_partition_split; #endif // CONFIG_ML_PART_SPLIT - bool partition_3_allowed[NUM_RECT_PARTS]; - bool prune_partition_3[NUM_RECT_PARTS]; - bool partition_4a_allowed[NUM_RECT_PARTS]; - bool partition_4b_allowed[NUM_RECT_PARTS]; - bool prune_partition_4a[NUM_RECT_PARTS]; - bool prune_partition_4b[NUM_RECT_PARTS]; - PARTITION_TYPE forced_partition; + // Pointer to an array that traces out the current best partition boundary. // Used by prune_part_h_with_partition_boundary and // prune_part_4_with_partition_boundary. bool *partition_boundaries; - bool prune_rect_part[NUM_RECT_PARTS]; - int is_block_splittable; // Chroma subsampling in x and y directions. int ss_x; diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index bc62a0db80..748cca2afa 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -2970,82 +2970,79 @@ static AVM_INLINE void init_allowed_partitions( PartitionSearchState *part_search_state, const PartitionCfg *part_cfg, const SPEED_FEATURES *const sf, const int bru_skip, const bool *partition_allowed) { - const PartitionBlkParams *blk_params = &part_search_state->part_blk_params; - const BLOCK_SIZE bsize = blk_params->bsize; if (bru_skip) { - part_search_state->do_rectangular_split = 0; - part_search_state->is_block_splittable = 0; - part_search_state->partition_none_allowed = 1; - part_search_state->partition_rect_allowed[HORZ] = 0; - part_search_state->partition_rect_allowed[VERT] = 0; + part_search_state->is_block_splittable = false; + part_search_state->do_rectangular_split = false; + part_search_state->partition_allowed[PARTITION_NONE] = true; + part_search_state->partition_allowed[PARTITION_HORZ] = false; + part_search_state->partition_allowed[PARTITION_VERT] = false; part_search_state->found_best_partition = true; #if CONFIG_ML_PART_SPLIT part_search_state->prune_partition_split = false; #endif // CONFIG_ML_PART_SPLIT return; } + + const PartitionBlkParams *blk_params = &part_search_state->part_blk_params; + const BLOCK_SIZE bsize = blk_params->bsize; const bool allow_rect = part_cfg->enable_rect_partitions || !(blk_params->has_rows && blk_params->has_cols); const int min_partition_size = (blk_params->has_rows && blk_params->has_cols) ? blk_params->min_partition_size : BLOCK_4X4; - part_search_state->do_rectangular_split = allow_rect; - - const BLOCK_SIZE horz_subsize = get_partition_subsize(bsize, PARTITION_HORZ); - const BLOCK_SIZE vert_subsize = get_partition_subsize(bsize, PARTITION_VERT); - // Initialize allowed partition types for the partition block. part_search_state->is_block_splittable = is_partition_point(bsize); - part_search_state->partition_none_allowed = partition_allowed[PARTITION_NONE]; - part_search_state->partition_rect_allowed[HORZ] = + part_search_state->do_rectangular_split = allow_rect; + part_search_state->partition_allowed[PARTITION_NONE] = + partition_allowed[PARTITION_NONE]; + part_search_state->partition_allowed[PARTITION_HORZ] = partition_allowed[PARTITION_HORZ] && allow_rect && - is_bsize_geq(horz_subsize, min_partition_size); - part_search_state->partition_rect_allowed[VERT] = + is_bsize_geq(get_partition_subsize(bsize, PARTITION_HORZ), + min_partition_size); + part_search_state->partition_allowed[PARTITION_VERT] = partition_allowed[PARTITION_VERT] && allow_rect && - is_bsize_geq(vert_subsize, min_partition_size); - - part_search_state->partition_3_allowed[HORZ] = + is_bsize_geq(get_partition_subsize(bsize, PARTITION_VERT), + min_partition_size); + part_search_state->partition_allowed[PARTITION_HORZ_3] = !sf->part_sf.disable_ext_partitions && partition_allowed[PARTITION_HORZ_3] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_HORZ_3), blk_params->min_partition_size) && is_bsize_geq(get_h_partition_subsize(bsize, 1, PARTITION_HORZ_3), blk_params->min_partition_size); - - part_search_state->partition_3_allowed[VERT] = + part_search_state->partition_allowed[PARTITION_VERT_3] = !sf->part_sf.disable_ext_partitions && partition_allowed[PARTITION_VERT_3] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_VERT_3), blk_params->min_partition_size) && is_bsize_geq(get_h_partition_subsize(bsize, 1, PARTITION_VERT_3), blk_params->min_partition_size); - - part_search_state->partition_4a_allowed[HORZ] = + part_search_state->partition_allowed[PARTITION_HORZ_4A] = !sf->part_sf.disable_ext_partitions && !sf->part_sf.disable_uneven_4way_partitions && partition_allowed[PARTITION_HORZ_4A] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_HORZ_4A), blk_params->min_partition_size); - part_search_state->partition_4b_allowed[HORZ] = + part_search_state->partition_allowed[PARTITION_HORZ_4B] = !sf->part_sf.disable_ext_partitions && !sf->part_sf.disable_uneven_4way_partitions && partition_allowed[PARTITION_HORZ_4B] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_HORZ_4B), blk_params->min_partition_size); - part_search_state->partition_4a_allowed[VERT] = + part_search_state->partition_allowed[PARTITION_VERT_4A] = !sf->part_sf.disable_ext_partitions && !sf->part_sf.disable_uneven_4way_partitions && partition_allowed[PARTITION_VERT_4A] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_VERT_4A), blk_params->min_partition_size); - part_search_state->partition_4b_allowed[VERT] = + part_search_state->partition_allowed[PARTITION_VERT_4B] = !sf->part_sf.disable_ext_partitions && !sf->part_sf.disable_uneven_4way_partitions && partition_allowed[PARTITION_VERT_4B] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_VERT_4B), blk_params->min_partition_size); - part_search_state->partition_split_allowed = + part_search_state->partition_allowed[PARTITION_SPLIT] = partition_allowed[PARTITION_SPLIT] && is_bsize_geq(get_partition_subsize(bsize, PARTITION_SPLIT), blk_params->min_partition_size); @@ -3053,9 +3050,10 @@ static AVM_INLINE void init_allowed_partitions( // Reset the flag indicating whether a partition leading to a rdcost lower // than the bound best_rdc has been found. part_search_state->found_best_partition = false; - assert(part_search_state->partition_none_allowed || - part_search_state->partition_rect_allowed[VERT] || - part_search_state->partition_rect_allowed[HORZ]); + + assert(part_search_state->partition_allowed[PARTITION_NONE] || + part_search_state->partition_allowed[PARTITION_VERT] || + part_search_state->partition_allowed[PARTITION_HORZ]); #if CONFIG_COLLECT_PARTITION_STATS init_partition_block_timing_stats(&part_search_state->part_timing_stats); @@ -3073,8 +3071,10 @@ static void init_partition_search_state_params( const AV2_COMMON *const cm = &cpi->common; PartitionBlkParams *blk_params = &part_search_state->part_blk_params; const CommonModeInfoParams *const mi_params = &cpi->common.mi_params; - assert(pc_tree != NULL); TREE_TYPE tree_type = xd->tree_type; + assert(pc_tree != NULL); + assert(bsize < BLOCK_SIZES_ALL); + // Special case: for INTRA region in inter frame, luma partition tree type // needs to be changed to SHARED_PART to match the signaling logic. if (!frame_is_intra_only(cm) && xd->tree_type == LUMA_PART && @@ -3082,8 +3082,6 @@ static void init_partition_search_state_params( tree_type = SHARED_PART; } - assert(bsize < BLOCK_SIZES_ALL); - // Initialization of block size related parameters. blk_params->mi_step = mi_size_wide[bsize] / 2; blk_params->mi_step_h = mi_size_high[bsize] / 2; @@ -3094,17 +3092,16 @@ static void init_partition_search_state_params( blk_params->mi_col_edge = mi_col + blk_params->mi_step_w; blk_params->width = block_size_wide[bsize]; blk_params->min_partition_size = x->sb_enc.min_partition_size; - blk_params->subsize = get_partition_subsize(bsize, PARTITION_SPLIT); + // Check if the partition corresponds to edge block. + blk_params->has_rows = (blk_params->mi_row_edge < mi_params->mi_rows); + blk_params->has_cols = (blk_params->mi_col_edge < mi_params->mi_cols); blk_params->bsize = bsize; + blk_params->subsize = get_partition_subsize(bsize, PARTITION_SPLIT); // Chroma subsampling. part_search_state->ss_x = x->e_mbd.plane[1].subsampling_x; part_search_state->ss_y = x->e_mbd.plane[1].subsampling_y; - // Check if the partition corresponds to edge block. - blk_params->has_rows = (blk_params->mi_row_edge < mi_params->mi_rows); - blk_params->has_cols = (blk_params->mi_col_edge < mi_params->mi_cols); - // Update intra partitioning related info. part_search_state->intra_part_info = &x->part_search_info; // Prepare for segmentation CNN-based partitioning for intra-frame. @@ -3140,18 +3137,17 @@ static void init_partition_search_state_params( av2_zero(part_search_state->rect_part_rd); // Initialize partition search flags to defaults. - part_search_state->terminate_partition_search = 0; - - av2_zero(part_search_state->prune_rect_part); - - part_search_state->partition_boundaries = NULL; - part_search_state->prune_partition_none = false; + part_search_state->terminate_partition_search = false; + part_search_state->prune_partition[PARTITION_NONE] = false; + const bool prune_partition = max_recursion_depth == 0; + for (PARTITION_TYPE partition_type = PARTITION_HORZ; + partition_type < EXT_PARTITION_TYPES; ++partition_type) { + part_search_state->prune_partition[partition_type] = prune_partition; + } #if CONFIG_ML_PART_SPLIT - part_search_state->prune_partition_split = false; + part_search_state->prune_partition_split = prune_partition; #endif // CONFIG_ML_PART_SPLIT - av2_zero(part_search_state->prune_partition_3); - av2_zero(part_search_state->prune_partition_4a); - av2_zero(part_search_state->prune_partition_4b); + part_search_state->partition_boundaries = NULL; const bool ss_x = cm->seq_params.subsampling_x; const bool ss_y = cm->seq_params.subsampling_y; @@ -3160,26 +3156,13 @@ static void init_partition_search_state_params( partition_allowed, cm, tree_type, (pc_tree->parent ? pc_tree->parent->region_type : INTRA_REGION), mi_row, mi_col, ss_x, ss_y, bsize, &pc_tree->chroma_ref_info); - part_search_state->forced_partition = get_forced_partition_type( cm, x, mi_row, mi_col, bsize, ptree_luma, template_tree, pc_tree->region_type, partition_allowed); - init_allowed_partitions( part_search_state, &cpi->oxcf.part_cfg, &cpi->sf, is_bru_not_active_and_not_on_partial_border(cm, mi_col, mi_row, bsize), partition_allowed); - - if (max_recursion_depth == 0) { - part_search_state->prune_rect_part[HORZ] = - part_search_state->prune_rect_part[VERT] = true; - part_search_state->prune_partition_3[HORZ] = - part_search_state->prune_partition_3[VERT] = true; - part_search_state->prune_partition_4a[HORZ] = - part_search_state->prune_partition_4a[VERT] = true; - part_search_state->prune_partition_4b[HORZ] = - part_search_state->prune_partition_4b[VERT] = true; - } } static const int rect_partition_type[NUM_RECT_PARTS] = { PARTITION_HORZ, @@ -3275,15 +3258,15 @@ static void rd_pick_rect_partition( if (partition_found && ((!bru_is_sb_active(&cpi->common, x->e_mbd.mi_col, x->e_mbd.mi_row)) || cpi->common.bridge_frame_info.is_bridge_frame)) { - part_search_state->terminate_partition_search = 1; - part_search_state->do_rectangular_split = 0; - part_search_state->is_block_splittable = 0; + part_search_state->terminate_partition_search = true; + part_search_state->do_rectangular_split = false; + part_search_state->is_block_splittable = false; part_search_state->forced_partition = 0; - part_search_state->partition_none_allowed = 0; + part_search_state->partition_allowed[PARTITION_NONE] = false; if (rect_type == HORZ) - part_search_state->partition_rect_allowed[VERT] = 0; + part_search_state->partition_allowed[PARTITION_VERT] = false; else - part_search_state->partition_rect_allowed[HORZ] = 0; + part_search_state->partition_allowed[PARTITION_HORZ] = false; part_search_state->found_best_partition = true; #if CONFIG_ML_PART_SPLIT part_search_state->prune_partition_split = false; @@ -3306,11 +3289,12 @@ static AVM_INLINE int is_rect_part_allowed( PartitionBlkParams blk_params = part_search_state->part_blk_params; const int mi_step = (rect_part == HORZ) ? blk_params.mi_step_h : blk_params.mi_step_w; + const PARTITION_TYPE partition_type = rect_partition_type[rect_part]; const int is_part_allowed = (!part_search_state->terminate_partition_search && - part_search_state->partition_rect_allowed[rect_part] && - !part_search_state->prune_rect_part[rect_part] && - is_partition_valid(blk_params.bsize, rect_partition_type[rect_part]) && + part_search_state->partition_allowed[partition_type] && + !part_search_state->prune_partition[partition_type] && + is_partition_valid(blk_params.bsize, partition_type) && (part_search_state->do_rectangular_split || active_edge[rect_part](cpi, mi_pos, mi_step))); return is_part_allowed; @@ -3337,7 +3321,7 @@ static AVM_INLINE void prune_rect_with_none_rd( const int64_t est_rd = (int64_t)(part_none_rd / discount_factor) + RDCOST(rdmult, part_rate, 0); if (est_rd > part_none_rd) { - part_search_state->prune_rect_part[rect] = true; + part_search_state->prune_partition[partition_type] = true; } } } @@ -3412,8 +3396,8 @@ static void rectangular_partition_search( const bool is_hd = AVMMIN(cm->width, cm->height) >= 1080; av2_erp_prune_rect(bsize, is_hd, ml_features, - &part_search_state->prune_rect_part[HORZ], - &part_search_state->prune_rect_part[VERT]); + &part_search_state->prune_partition[PARTITION_HORZ], + &part_search_state->prune_partition[PARTITION_VERT]); } if (cpi->sf.part_sf.prune_rect_with_none_rd && part_search_state->forced_partition == PARTITION_INVALID && @@ -3546,16 +3530,16 @@ static AVM_INLINE void set_part_none_allowed_flag( PartitionSearchState *part_search_state) { PartitionBlkParams blk_params = part_search_state->part_blk_params; if (tree_type == CHROMA_PART && blk_params.bsize == BLOCK_8X8) { - part_search_state->partition_none_allowed = 1; + part_search_state->partition_allowed[PARTITION_NONE] = true; return; } if (sdp_inter_chroma_flag) { - part_search_state->partition_none_allowed = 1; + part_search_state->partition_allowed[PARTITION_NONE] = true; return; } if (is_bsize_geq(blk_params.min_partition_size, blk_params.bsize) && blk_params.has_rows && blk_params.has_cols) - part_search_state->partition_none_allowed = 1; + part_search_state->partition_allowed[PARTITION_NONE] = true; } // Set params needed for PARTITION_NONE search. @@ -3585,7 +3569,7 @@ static void set_none_partition_params(const AV2_COMMON *const cm, } // Set PARTITION_NONE type cost. - if (part_search_state->partition_none_allowed) { + if (part_search_state->partition_allowed[PARTITION_NONE]) { if (part_search_state->is_block_splittable && !is_inter_sdp_chroma(cm, pc_tree->region_type, x->e_mbd.tree_type)) { *pt_cost = part_search_state->partition_cost[PARTITION_NONE] < INT_MAX @@ -3627,7 +3611,7 @@ static void prune_partitions_after_none(AV2_COMP *const cpi, MACROBLOCK *x, if (use_ml_based_breakout) { if (av2_ml_predict_breakout(cpi, bsize, x, this_rdc, *pb_source_variance)) { - part_search_state->do_rectangular_split = 0; + part_search_state->do_rectangular_split = false; } } @@ -3651,7 +3635,7 @@ static void prune_partitions_after_none(AV2_COMP *const cpi, MACROBLOCK *x, // disable the early termination at that speed. if (best_rdc->dist < dist_breakout_thr && best_rdc->rate < rate_breakout_thr) { - part_search_state->do_rectangular_split = 0; + part_search_state->do_rectangular_split = false; } } @@ -3674,13 +3658,13 @@ static void prune_partitions_after_none(AV2_COMP *const cpi, MACROBLOCK *x, // force early terminate after successful none in not active if ((!bru_is_sb_active(cm, blk_params.mi_col, blk_params.mi_row)) || cm->bridge_frame_info.is_bridge_frame) { - part_search_state->terminate_partition_search = 1; - part_search_state->do_rectangular_split = 0; - part_search_state->is_block_splittable = 0; + part_search_state->terminate_partition_search = true; + part_search_state->do_rectangular_split = false; + part_search_state->is_block_splittable = false; part_search_state->forced_partition = 0; - part_search_state->partition_none_allowed = 1; - part_search_state->partition_rect_allowed[HORZ] = 0; - part_search_state->partition_rect_allowed[VERT] = 0; + part_search_state->partition_allowed[PARTITION_NONE] = true; + part_search_state->partition_allowed[PARTITION_HORZ] = false; + part_search_state->partition_allowed[PARTITION_VERT] = false; part_search_state->found_best_partition = true; #if CONFIG_ML_PART_SPLIT part_search_state->prune_partition_split = false; @@ -3764,10 +3748,11 @@ static void none_partition_search( // Set PARTITION_NONE allowed flag. set_part_none_allowed_flag(x->e_mbd.tree_type, sdp_inter_chroma_flag, part_search_state); - if (!part_search_state->partition_none_allowed) { + if (!part_search_state->partition_allowed[PARTITION_NONE]) { return; } - if (part_search_state->prune_partition_none && !sdp_inter_chroma_flag) { + if (part_search_state->prune_partition[PARTITION_NONE] && + !sdp_inter_chroma_flag) { return; } @@ -3880,7 +3865,7 @@ static void none_partition_search( pc_tree->parent->none_rd.rate == INT_MAX && pc_tree->parent->parent->none_rd.rate == INT_MAX && best_rdc->rdcost < INT64_MAX) { - part_search_state->terminate_partition_search = 1; + part_search_state->terminate_partition_search = true; } av2_restore_context(cm, x, x_ctx, mi_row, mi_col, bsize, av2_num_planes(cm)); restore_level_banks(&x->e_mbd, level_banks); @@ -3901,8 +3886,8 @@ static void av2_ml_prune_after_split(AV2_COMP *const cpi, MACROBLOCK *x, !frame_is_intra_only(cm) && !part_search_state->terminate_partition_search && part_search_state->do_rectangular_split && - (part_search_state->partition_rect_allowed[HORZ] || - part_search_state->partition_rect_allowed[VERT]) && + (part_search_state->partition_allowed[PARTITION_HORZ] || + part_search_state->partition_allowed[PARTITION_VERT]) && sms_tree) { av2_ml_early_term_after_split( cpi, x, sms_tree, best_rdc->rdcost, part_none_rd, part_split_rd, @@ -3932,7 +3917,7 @@ static void split_partition_search( // Check if partition split is allowed. (void)sms_tree; if (part_search_state->terminate_partition_search || - !part_search_state->partition_split_allowed || + !part_search_state->partition_allowed[PARTITION_SPLIT] || !is_square_split_eligible(bsize, cm->sb_size)) { return; } @@ -4064,12 +4049,12 @@ static void split_partition_search( if (part_search_state->found_best_partition && ((!bru_is_sb_active(cm, mi_col, mi_row)) || cm->bridge_frame_info.is_bridge_frame)) { - part_search_state->terminate_partition_search = 1; - part_search_state->do_rectangular_split = 0; + part_search_state->terminate_partition_search = true; + part_search_state->do_rectangular_split = false; part_search_state->forced_partition = 0; - part_search_state->partition_none_allowed = 0; - part_search_state->partition_rect_allowed[VERT] = 0; - part_search_state->partition_rect_allowed[HORZ] = 0; + part_search_state->partition_allowed[PARTITION_NONE] = false; + part_search_state->partition_allowed[PARTITION_VERT] = false; + part_search_state->partition_allowed[PARTITION_HORZ] = false; #if CONFIG_ML_PART_SPLIT part_search_state->prune_partition_split = false; #endif // CONFIG_ML_PART_SPLIT @@ -4383,7 +4368,7 @@ static AVM_INLINE void prune_part_3_with_partition_boundary( } } } - part_search_state->prune_partition_3[HORZ] |= !keep_horz_3; + part_search_state->prune_partition[PARTITION_HORZ_3] |= !keep_horz_3; } if (can_search_vert) { bool keep_vert_3 = false; @@ -4416,7 +4401,7 @@ static AVM_INLINE void prune_part_3_with_partition_boundary( } } } - part_search_state->prune_partition_3[VERT] |= !keep_vert_3; + part_search_state->prune_partition[PARTITION_VERT_3] |= !keep_vert_3; } } @@ -4476,8 +4461,8 @@ static AVM_INLINE void prune_part_4_with_partition_boundary( } } } - part_search_state->prune_partition_4a[HORZ] |= !keep_horz_4a; - part_search_state->prune_partition_4b[HORZ] |= !keep_horz_4b; + part_search_state->prune_partition[PARTITION_HORZ_4A] |= !keep_horz_4a; + part_search_state->prune_partition[PARTITION_HORZ_4B] |= !keep_horz_4b; } if (can_search_vert_4a || can_search_vert_4b) { for (int row = 0; row < mi_height; row++) { @@ -4516,8 +4501,8 @@ static AVM_INLINE void prune_part_4_with_partition_boundary( } } } - part_search_state->prune_partition_4a[VERT] |= !keep_vert_4a; - part_search_state->prune_partition_4b[VERT] |= !keep_vert_4b; + part_search_state->prune_partition[PARTITION_VERT_4A] |= !keep_vert_4a; + part_search_state->prune_partition[PARTITION_VERT_4B] |= !keep_vert_4b; } } @@ -4536,12 +4521,12 @@ static AVM_INLINE void prune_ext_partitions_3way( REGION_TYPE cur_region_type = pc_tree->region_type; // Prune horz 3 with speed features - if (part_search_state->partition_3_allowed[HORZ] && + if (part_search_state->partition_allowed[PARTITION_HORZ_3] && !frame_is_intra_only(cm) && forced_partition != PARTITION_HORZ_3) { if (part_sf->prune_ext_part_with_part_none && pc_tree->partitioning == PARTITION_NONE) { // Prune if the best partition does not split - part_search_state->prune_partition_3[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_3] = true; } if (part_sf->prune_ext_part_with_part_rect) { // Prune if the best partition is rect but the subtrees did not further @@ -4551,24 +4536,24 @@ static AVM_INLINE void prune_ext_partitions_3way( pc_tree->horizontal[cur_region_type][1] && !node_uses_horz(pc_tree->horizontal[cur_region_type][0]) && !node_uses_horz(pc_tree->horizontal[cur_region_type][1])) { - part_search_state->prune_partition_3[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_3] = true; } if (pc_tree->partitioning == PARTITION_VERT && pc_tree->vertical[cur_region_type][0] && pc_tree->vertical[cur_region_type][1] && !node_uses_horz(pc_tree->vertical[cur_region_type][0]) && !node_uses_horz(pc_tree->vertical[cur_region_type][1])) { - part_search_state->prune_partition_3[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_3] = true; } } } - if (part_search_state->partition_3_allowed[VERT] && + if (part_search_state->partition_allowed[PARTITION_VERT_3] && !frame_is_intra_only(cm) && forced_partition != PARTITION_VERT_3) { if (part_sf->prune_ext_part_with_part_none && pc_tree->partitioning == PARTITION_NONE) { // Prune if the best partition does not split - part_search_state->prune_partition_3[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_3] = true; } if (part_sf->prune_ext_part_with_part_rect) { // Prune if the best partition is rect but the subtrees did not further @@ -4578,22 +4563,24 @@ static AVM_INLINE void prune_ext_partitions_3way( pc_tree->vertical[cur_region_type][1] && !node_uses_vert(pc_tree->vertical[cur_region_type][0]) && !node_uses_vert(pc_tree->vertical[cur_region_type][1])) { - part_search_state->prune_partition_3[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_3] = true; } if (pc_tree->partitioning == PARTITION_HORZ && pc_tree->horizontal[cur_region_type][0] && pc_tree->horizontal[cur_region_type][1] && !node_uses_vert(pc_tree->horizontal[cur_region_type][0]) && !node_uses_vert(pc_tree->horizontal[cur_region_type][1])) { - part_search_state->prune_partition_3[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_3] = true; } } } - const bool can_search_horz = part_search_state->partition_3_allowed[HORZ] && - !part_search_state->prune_partition_3[HORZ]; - const bool can_search_vert = part_search_state->partition_3_allowed[VERT] && - !part_search_state->prune_partition_3[VERT]; + const bool can_search_horz = + part_search_state->partition_allowed[PARTITION_HORZ_3] && + !part_search_state->prune_partition[PARTITION_HORZ_3]; + const bool can_search_vert = + part_search_state->partition_allowed[PARTITION_VERT_3] && + !part_search_state->prune_partition[PARTITION_VERT_3]; const PartitionBlkParams *blk_params = &part_search_state->part_blk_params; const int mi_row = blk_params->mi_row, mi_col = blk_params->mi_col, bsize = blk_params->bsize; @@ -4832,12 +4819,12 @@ static AVM_INLINE void prune_ext_partitions_4way( const int cur_region_type = pc_tree->region_type; // Prune HORZ 4A with speed features - if (part_search_state->partition_4a_allowed[HORZ] && + if (part_search_state->partition_allowed[PARTITION_HORZ_4A] && forced_partition != PARTITION_HORZ_4A) { if (part_sf->prune_ext_part_with_part_none && pc_tree->partitioning == PARTITION_NONE) { // Prune if the best partition does not split - part_search_state->prune_partition_4a[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4A] = true; } if (part_sf->prune_ext_part_with_part_rect) { // Prune if the best partition is rect but subtrees did not further split @@ -4845,12 +4832,12 @@ static AVM_INLINE void prune_ext_partitions_4way( if (pc_tree->partitioning == PARTITION_HORZ && !node_uses_horz(pc_tree->horizontal[cur_region_type][0]) && !node_uses_horz(pc_tree->horizontal[cur_region_type][1])) { - part_search_state->prune_partition_4a[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4A] = true; } if (pc_tree->partitioning == PARTITION_VERT && !node_uses_horz(pc_tree->vertical[cur_region_type][0]) && !node_uses_horz(pc_tree->vertical[cur_region_type][1])) { - part_search_state->prune_partition_4a[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4A] = true; } } if (part_sf->prune_part_4_with_part_3) { @@ -4859,33 +4846,33 @@ static AVM_INLINE void prune_ext_partitions_4way( !node_uses_horz(pc_tree->horizontal3[cur_region_type][3])) { // Prune if best partition is horizontal H, but first and last // subpartitions did not further split in horizontal direction. - part_search_state->prune_partition_4a[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4A] = true; } if (pc_tree->partitioning == PARTITION_VERT_3 && !node_uses_horz(pc_tree->vertical3[cur_region_type][1]) && !node_uses_horz(pc_tree->vertical3[cur_region_type][2])) { // Prune if best partition is vertical H, but middle two // subpartitions did not further split in horizontal direction. - part_search_state->prune_partition_4a[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4A] = true; } } if (part_sf->prune_part_4_horz_or_vert && pc_tree->partitioning == PARTITION_VERT && - part_search_state->partition_rect_allowed[HORZ] && + part_search_state->partition_allowed[PARTITION_HORZ] && (!frame_is_intra_only(cm) || (!node_uses_horz(pc_tree->vertical[cur_region_type][0]) && !node_uses_horz(pc_tree->vertical[cur_region_type][1])))) { - part_search_state->prune_partition_4a[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4A] = true; } } // Prune HORZ 4B with speed features - if (part_search_state->partition_4b_allowed[HORZ] && + if (part_search_state->partition_allowed[PARTITION_HORZ_4B] && forced_partition != PARTITION_HORZ_4B) { if (part_sf->prune_ext_part_with_part_none && pc_tree->partitioning == PARTITION_NONE) { // Prune if the best partition does not split - part_search_state->prune_partition_4b[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4B] = true; } if (part_sf->prune_ext_part_with_part_rect) { // Prune if the best partition is rect but subtrees did not further split @@ -4893,12 +4880,12 @@ static AVM_INLINE void prune_ext_partitions_4way( if (pc_tree->partitioning == PARTITION_HORZ && !node_uses_horz(pc_tree->horizontal[cur_region_type][0]) && !node_uses_horz(pc_tree->horizontal[cur_region_type][1])) { - part_search_state->prune_partition_4b[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4B] = true; } if (pc_tree->partitioning == PARTITION_VERT && !node_uses_horz(pc_tree->vertical[cur_region_type][0]) && !node_uses_horz(pc_tree->vertical[cur_region_type][1])) { - part_search_state->prune_partition_4b[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4B] = true; } } if (part_sf->prune_part_4_with_part_3) { @@ -4907,33 +4894,33 @@ static AVM_INLINE void prune_ext_partitions_4way( !node_uses_horz(pc_tree->horizontal3[cur_region_type][3])) { // Prune if best partition is horizontal H, but first and last // subpartitions did not further split in horizontal direction. - part_search_state->prune_partition_4b[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4B] = true; } if (pc_tree->partitioning == PARTITION_VERT_3 && !node_uses_horz(pc_tree->vertical3[cur_region_type][1]) && !node_uses_horz(pc_tree->vertical3[cur_region_type][2])) { // Prune if best partition is vertical H, but middle two // subpartitions did not further split in horizontal direction. - part_search_state->prune_partition_4b[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4B] = true; } } if (part_sf->prune_part_4_horz_or_vert && pc_tree->partitioning == PARTITION_VERT && - part_search_state->partition_rect_allowed[HORZ] && + part_search_state->partition_allowed[PARTITION_HORZ] && (!frame_is_intra_only(cm) || (!node_uses_horz(pc_tree->vertical[cur_region_type][0]) && !node_uses_horz(pc_tree->vertical[cur_region_type][1])))) { - part_search_state->prune_partition_4b[HORZ] = 1; + part_search_state->prune_partition[PARTITION_HORZ_4B] = true; } } // Prune VERT_4A with speed features - if (part_search_state->partition_4a_allowed[VERT] && + if (part_search_state->partition_allowed[PARTITION_VERT_4A] && forced_partition != PARTITION_VERT_4A) { if (part_sf->prune_ext_part_with_part_none && pc_tree->partitioning == PARTITION_NONE) { // Prune if the best partition does not split - part_search_state->prune_partition_4a[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4A] = true; } if (part_sf->prune_ext_part_with_part_rect) { // Prune if the best partition is rect but subtrees did not further split @@ -4941,12 +4928,12 @@ static AVM_INLINE void prune_ext_partitions_4way( if (pc_tree->partitioning == PARTITION_VERT && !node_uses_vert(pc_tree->vertical[cur_region_type][0]) && !node_uses_vert(pc_tree->vertical[cur_region_type][1])) { - part_search_state->prune_partition_4a[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4A] = true; } if (pc_tree->partitioning == PARTITION_HORZ && !node_uses_vert(pc_tree->horizontal[cur_region_type][0]) && !node_uses_vert(pc_tree->horizontal[cur_region_type][1])) { - part_search_state->prune_partition_4a[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4A] = true; } } if (part_sf->prune_part_4_with_part_3) { @@ -4955,33 +4942,33 @@ static AVM_INLINE void prune_ext_partitions_4way( !node_uses_vert(pc_tree->vertical3[cur_region_type][3])) { // Prune if best partition is vertical H, but first and last // subpartitions did not further split in vertical direction. - part_search_state->prune_partition_4a[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4A] = true; } if (pc_tree->partitioning == PARTITION_HORZ_3 && !node_uses_vert(pc_tree->horizontal3[cur_region_type][1]) && !node_uses_vert(pc_tree->horizontal3[cur_region_type][2])) { // Prune if best partition is horizontal H, but middle two // subpartitions did not further split in vertical direction. - part_search_state->prune_partition_4a[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4A] = true; } } if (part_sf->prune_part_4_horz_or_vert && pc_tree->partitioning == PARTITION_HORZ && - part_search_state->partition_rect_allowed[VERT] && + part_search_state->partition_allowed[PARTITION_VERT] && (!frame_is_intra_only(cm) || (!node_uses_vert(pc_tree->horizontal[cur_region_type][0]) && !node_uses_vert(pc_tree->horizontal[cur_region_type][1])))) { - part_search_state->prune_partition_4a[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4A] = true; } } // Prune VERT_4B with speed features - if (part_search_state->partition_4b_allowed[VERT] && + if (part_search_state->partition_allowed[PARTITION_VERT_4B] && forced_partition != PARTITION_VERT_4B) { if (part_sf->prune_ext_part_with_part_none && pc_tree->partitioning == PARTITION_NONE) { // Prune if the best partition does not split - part_search_state->prune_partition_4b[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4B] = true; } if (part_sf->prune_ext_part_with_part_rect) { // Prune if the best partition is rect but subtrees did not further split @@ -4989,12 +4976,12 @@ static AVM_INLINE void prune_ext_partitions_4way( if (pc_tree->partitioning == PARTITION_VERT && !node_uses_vert(pc_tree->vertical[cur_region_type][0]) && !node_uses_vert(pc_tree->vertical[cur_region_type][1])) { - part_search_state->prune_partition_4b[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4B] = true; } if (pc_tree->partitioning == PARTITION_HORZ && !node_uses_vert(pc_tree->horizontal[cur_region_type][0]) && !node_uses_vert(pc_tree->horizontal[cur_region_type][1])) { - part_search_state->prune_partition_4b[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4B] = true; } } if (part_sf->prune_part_4_with_part_3) { @@ -5003,38 +4990,38 @@ static AVM_INLINE void prune_ext_partitions_4way( !node_uses_vert(pc_tree->vertical3[cur_region_type][3])) { // Prune if best partition is vertical H, but first and last // subpartitions did not further split in vertical direction. - part_search_state->prune_partition_4b[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4B] = true; } if (pc_tree->partitioning == PARTITION_HORZ_3 && !node_uses_vert(pc_tree->horizontal3[cur_region_type][1]) && !node_uses_vert(pc_tree->horizontal3[cur_region_type][2])) { // Prune if best partition is horizontal H, but middle two // subpartitions did not further split in vertical direction. - part_search_state->prune_partition_4b[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4B] = true; } } if (part_sf->prune_part_4_horz_or_vert && pc_tree->partitioning == PARTITION_HORZ && - part_search_state->partition_rect_allowed[VERT] && + part_search_state->partition_allowed[PARTITION_VERT] && (!frame_is_intra_only(cm) || (!node_uses_vert(pc_tree->horizontal[cur_region_type][0]) && !node_uses_vert(pc_tree->horizontal[cur_region_type][1])))) { - part_search_state->prune_partition_4b[VERT] = 1; + part_search_state->prune_partition[PARTITION_VERT_4B] = true; } } const bool can_search_horz_4a = - part_search_state->partition_4a_allowed[HORZ] && - !part_search_state->prune_partition_4a[HORZ]; + part_search_state->partition_allowed[PARTITION_HORZ_4A] && + !part_search_state->prune_partition[PARTITION_HORZ_4A]; const bool can_search_horz_4b = - part_search_state->partition_4b_allowed[HORZ] && - !part_search_state->prune_partition_4b[HORZ]; + part_search_state->partition_allowed[PARTITION_HORZ_4B] && + !part_search_state->prune_partition[PARTITION_HORZ_4B]; const bool can_search_vert_4a = - part_search_state->partition_4a_allowed[VERT] && - !part_search_state->prune_partition_4a[VERT]; + part_search_state->partition_allowed[PARTITION_VERT_4A] && + !part_search_state->prune_partition[PARTITION_VERT_4A]; const bool can_search_vert_4b = - part_search_state->partition_4b_allowed[VERT] && - !part_search_state->prune_partition_4b[VERT]; + part_search_state->partition_allowed[PARTITION_VERT_4B] && + !part_search_state->prune_partition[PARTITION_VERT_4B]; const PartitionBlkParams *blk_params = &part_search_state->part_blk_params; const int mi_row = blk_params->mi_row, mi_col = blk_params->mi_col, bsize = blk_params->bsize; @@ -5083,27 +5070,13 @@ static void search_extended_partition( return; if (search_state->terminate_partition_search) return; if (!is_partition_valid(bsize, partition_type)) return; + if (!part_search_state->partition_allowed[partition_type] || + part_search_state->prune_partition[partition_type]) + return; const RECT_PART_TYPE rect_type = get_rect_part_type(partition_type); const bool is_h_partition = partition_type == PARTITION_HORZ_3 || partition_type == PARTITION_VERT_3; - if (is_h_partition) { - if (!part_search_state->partition_3_allowed[rect_type] || - part_search_state->prune_partition_3[rect_type]) - return; - } else { - const UNEVEN_4WAY_PART_TYPE uneven_type = - get_4way_part_type(partition_type); - bool skip_search; - if (uneven_type == UNEVEN_4A) { - skip_search = (!part_search_state->partition_4a_allowed[rect_type] || - part_search_state->prune_partition_4a[rect_type]); - } else { - skip_search = (!part_search_state->partition_4b_allowed[rect_type] || - part_search_state->prune_partition_4b[rect_type]); - } - if (skip_search) return; - } if (rect_type == HORZ) { if (!blk_params->has_rows) return; if (!(search_state->do_rectangular_split || @@ -5382,7 +5355,7 @@ static AVM_INLINE void prune_none_after_rect( // Give up on PARTITION_NONE if either of the subtrees decided to split // further. for (int idx = 0; idx < num_sub_parts && tree[idx]; ++idx) { - part_search_state->prune_partition_none |= + part_search_state->prune_partition[PARTITION_NONE] |= tree[idx]->partitioning != PARTITION_NONE; } } @@ -5407,8 +5380,8 @@ static void prune_partitions_after_split( max_depth = AVMMAX(max_depth, depth); } if (min_depth > 4) { - part_search_state->prune_rect_part[HORZ] = true; - part_search_state->prune_rect_part[VERT] = true; + part_search_state->prune_partition[PARTITION_HORZ] = true; + part_search_state->prune_partition[PARTITION_VERT] = true; } (void)max_depth; } @@ -5422,20 +5395,20 @@ static AVM_INLINE void prune_4way_partitions_based_on_4way_search( PARTITION_TYPE partition_type) { if (partition_type == PARTITION_HORZ_4A) { if (part_sf->prune_part_4b_with_part_4a) { - if (part_search_state->partition_4a_allowed[HORZ] && - !part_search_state->prune_partition_4a[HORZ] && + if (part_search_state->partition_allowed[PARTITION_HORZ_4A] && + !part_search_state->prune_partition[PARTITION_HORZ_4A] && part_search_state->found_best_partition && pc_tree->partitioning != PARTITION_HORZ_4A) { - part_search_state->prune_partition_4b[HORZ] = true; + part_search_state->prune_partition[PARTITION_HORZ_4B] = true; } } } else if (partition_type == PARTITION_VERT_4A) { if (part_sf->prune_part_4b_with_part_4a) { - if (part_search_state->partition_4a_allowed[VERT] && - !part_search_state->prune_partition_4a[VERT] && + if (part_search_state->partition_allowed[PARTITION_VERT_4A] && + !part_search_state->prune_partition[PARTITION_VERT_4A] && part_search_state->found_best_partition && pc_tree->partitioning != PARTITION_VERT_4A) { - part_search_state->prune_partition_4b[VERT] = true; + part_search_state->prune_partition[PARTITION_VERT_4B] = true; } } } @@ -5478,16 +5451,17 @@ static void prune_partitions_using_ml_results( const AV2_COMMON *const cm = &cpi->common; MACROBLOCK *const x = &td->mb; TileInfo *const tile_info = &tile_data->tile_info; - - part_search_state->prune_partition_none |= force_prune_flags[PRUNE_OTHER]; - part_search_state->prune_partition_3[HORZ] |= force_prune_flags[PRUNE_OTHER]; - part_search_state->prune_partition_3[VERT] |= force_prune_flags[PRUNE_OTHER]; - part_search_state->prune_partition_4a[HORZ] |= force_prune_flags[PRUNE_OTHER]; - part_search_state->prune_partition_4a[VERT] |= force_prune_flags[PRUNE_OTHER]; - part_search_state->prune_partition_4b[HORZ] |= force_prune_flags[PRUNE_OTHER]; - part_search_state->prune_partition_4b[VERT] |= force_prune_flags[PRUNE_OTHER]; - part_search_state->prune_rect_part[HORZ] |= force_prune_flags[PRUNE_HORZ]; - part_search_state->prune_rect_part[VERT] |= force_prune_flags[PRUNE_VERT]; + bool *prune_partition = part_search_state->prune_partition; + + prune_partition[PARTITION_NONE] |= force_prune_flags[PRUNE_OTHER]; + prune_partition[PARTITION_HORZ_3] |= force_prune_flags[PRUNE_OTHER]; + prune_partition[PARTITION_VERT_3] |= force_prune_flags[PRUNE_OTHER]; + prune_partition[PARTITION_HORZ_4A] |= force_prune_flags[PRUNE_OTHER]; + prune_partition[PARTITION_VERT_4A] |= force_prune_flags[PRUNE_OTHER]; + prune_partition[PARTITION_HORZ_4B] |= force_prune_flags[PRUNE_OTHER]; + prune_partition[PARTITION_VERT_4B] |= force_prune_flags[PRUNE_OTHER]; + prune_partition[PARTITION_HORZ] |= force_prune_flags[PRUNE_HORZ]; + prune_partition[PARTITION_VERT] |= force_prune_flags[PRUNE_VERT]; // Don't want to run ML in the second stage of the forced split. Want the // force split to carry out without interference. @@ -5500,21 +5474,21 @@ static void prune_partitions_using_ml_results( av2_ml_part_split_infer(cpi, x, mi_row, mi_col, bsize, tile_info, td, search_none_after_rect, prune_list); if (ml_result == ML_PART_FORCE_NONE || ml_result == ML_PART_FORCE_SPLIT) { - part_search_state->prune_partition_3[HORZ] = true; - part_search_state->prune_partition_3[VERT] = true; - part_search_state->prune_partition_4a[HORZ] = true; - part_search_state->prune_partition_4a[VERT] = true; - part_search_state->prune_partition_4b[HORZ] = true; - part_search_state->prune_partition_4b[VERT] = true; + prune_partition[PARTITION_HORZ_3] = true; + prune_partition[PARTITION_VERT_3] = true; + prune_partition[PARTITION_HORZ_4A] = true; + prune_partition[PARTITION_VERT_4A] = true; + prune_partition[PARTITION_HORZ_4B] = true; + prune_partition[PARTITION_VERT_4B] = true; } if (ml_result == ML_PART_FORCE_NONE) { - part_search_state->prune_rect_part[VERT] = true; - part_search_state->prune_rect_part[HORZ] = true; + prune_partition[PARTITION_VERT] = true; + prune_partition[PARTITION_HORZ] = true; } else if (ml_result == ML_PART_FORCE_SPLIT) { - part_search_state->prune_partition_none = true; + prune_partition[PARTITION_NONE] = true; if (is_square_split_eligible(bsize, cm->sb_size)) { - part_search_state->prune_rect_part[VERT] = true; - part_search_state->prune_rect_part[HORZ] = true; + prune_partition[PARTITION_VERT] = true; + prune_partition[PARTITION_HORZ] = true; } else { next_force_prune_flags[HORZ][PRUNE_OTHER] = true; next_force_prune_flags[VERT][PRUNE_OTHER] = true; @@ -5523,7 +5497,7 @@ static void prune_partitions_using_ml_results( } } else { if (prune_list[PT_NONE]) { - part_search_state->prune_partition_none = true; + prune_partition[PARTITION_NONE] = true; } if (prune_list[PT_SPLIT]) { if (is_square_split_eligible(bsize, cm->sb_size)) { @@ -5735,8 +5709,8 @@ bool av2_rd_pick_partition( // Pruning: Disable rectangular partitions for inner blocks when the current // block is forced to only use square partitions. if (is_bsize_gt(bsize, cpi->sf.part_sf.use_square_partition_only_threshold)) { - part_search_state.partition_rect_allowed[HORZ] &= !blk_params.has_rows; - part_search_state.partition_rect_allowed[VERT] &= !blk_params.has_cols; + part_search_state.partition_allowed[PARTITION_HORZ] &= !blk_params.has_rows; + part_search_state.partition_allowed[PARTITION_VERT] &= !blk_params.has_cols; } LevelBanksRDO level_banks = { @@ -5753,15 +5727,10 @@ bool av2_rd_pick_partition( // motion search results to prune out unlikely partitions. if (part_search_state.forced_partition == PARTITION_INVALID && is_bsize_gt(bsize, x->sb_enc.min_partition_size)) { - int do_square_split = true; - av2_prune_partitions_before_search( - cpi, x, mi_row, mi_col, bsize, sms_tree, - &part_search_state.partition_none_allowed, - &part_search_state.partition_rect_allowed[HORZ], - &part_search_state.partition_rect_allowed[VERT], - &part_search_state.do_rectangular_split, &do_square_split, - &part_search_state.prune_rect_part[HORZ], - &part_search_state.prune_rect_part[VERT], pc_tree); + bool do_square_split = true; + av2_prune_partitions_before_search(cpi, x, mi_row, mi_col, bsize, sms_tree, + &part_search_state, &do_square_split, + pc_tree); } // Pruning: eliminating partition types leading to coding block sizes @@ -5789,10 +5758,10 @@ bool av2_rd_pick_partition( is_bru_not_active_and_not_on_partial_border(cm, mi_col, mi_row, bsize), partition_allowed); #if CONFIG_ML_PART_SPLIT - part_search_state.prune_rect_part[HORZ] = 0; - part_search_state.prune_rect_part[VERT] = 0; - part_search_state.prune_partition_none = 0; - part_search_state.prune_partition_split = 0; + part_search_state.prune_partition[PARTITION_HORZ] = false; + part_search_state.prune_partition[PARTITION_VERT] = false; + part_search_state.prune_partition[PARTITION_NONE] = false; + part_search_state.prune_partition_split = false; #endif // CONFIG_ML_PART_SPLIT } @@ -5801,7 +5770,7 @@ bool av2_rd_pick_partition( int next_force_prune_flags[NUM_RECT_PARTS][MAX_PRUNE_TYPES] = { { 0 } }; // Don't use ML pruning if this is the second attempt to find a valid // partition. - if (cpi->sf.part_sf.prune_split_with_ml && force_prune_flags && + if (cpi->sf.part_sf.prune_split_with_ml && part_search_state.forced_partition == PARTITION_INVALID && !x->must_find_valid_partition && is_partition_point(bsize)) { prune_partitions_using_ml_results( @@ -5811,9 +5780,10 @@ bool av2_rd_pick_partition( #endif // CONFIG_ML_PART_SPLIT // Search partition none. - int partition_none_allowed = part_search_state.partition_none_allowed; + bool partition_none_allowed = + part_search_state.partition_allowed[PARTITION_NONE]; if (is_intra_child_of_mixed_region(pc_tree) && xd->tree_type != CHROMA_PART) - partition_none_allowed = 0; + partition_none_allowed = false; unsigned int pb_source_variance = UINT_MAX; int64_t part_none_rd = INT64_MAX; if (!search_none_after_rect && !search_none_after_split && @@ -5835,9 +5805,6 @@ bool av2_rd_pick_partition( &part_split_rd, &level_banks, ptree_luma, template_tree, max_recursion_depth - 1); prune_partitions_after_split(cpi, pc_tree, &part_search_state); - // Based on split result, decide if we want to further delay the search to - // after rect - if (!search_none_after_rect && !search_none_after_split && partition_none_allowed) { // Prune partitions based on PARTITION_NONE and PARTITION_SPLIT. @@ -5845,6 +5812,8 @@ bool av2_rd_pick_partition( part_none_rd, part_split_rd); } + // Based on split result, decide if we want to further delay the search to + // after rect if (search_none_after_split && pc_tree->partitioning == PARTITION_SPLIT) { for (int idx = 0; idx < SUB_PARTITIONS_SPLIT; idx++) { const int depth = diff --git a/av2/encoder/partition_search.h b/av2/encoder/partition_search.h index f47eb7fecf..a501ff31c4 100644 --- a/av2/encoder/partition_search.h +++ b/av2/encoder/partition_search.h @@ -32,20 +32,18 @@ void av2_rd_use_partition(AV2_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, int mi_col, BLOCK_SIZE bsize, int *rate, int64_t *dist, int do_recon, PARTITION_TREE *ptree, PC_TREE *pc_tree, PARTITION_TREE *ptree_luma); -bool av2_rd_pick_partition(AV2_COMP *const cpi, ThreadData *td, - TileDataEnc *tile_data, TokenExtra **tp, int mi_row, - int mi_col, BLOCK_SIZE bsize, - PARTITION_TYPE parent_partition, RD_STATS *rd_cost, - RD_STATS best_rdc, PC_TREE *pc_tree, - const PARTITION_TREE *ptree_luma, - const PARTITION_TREE *template_tree, - int max_recursion_depth, - SIMPLE_MOTION_DATA_TREE *sms_tree, int64_t *none_rd, - SB_MULTI_PASS_MODE multi_pass_mode, - RD_RECT_PART_WIN_INFO *rect_part_win_info +bool av2_rd_pick_partition( + AV2_COMP *const cpi, ThreadData *td, TileDataEnc *tile_data, + TokenExtra **tp, const int mi_row, const int mi_col, const BLOCK_SIZE bsize, + const PARTITION_TYPE parent_partition, RD_STATS *rd_cost, RD_STATS best_rdc, + PC_TREE *pc_tree, const PARTITION_TREE *ptree_luma, + const PARTITION_TREE *template_tree, const int max_recursion_depth, + SIMPLE_MOTION_DATA_TREE *sms_tree, int64_t *none_rd, + const SB_MULTI_PASS_MODE multi_pass_mode, + RD_RECT_PART_WIN_INFO *rect_part_win_info #if CONFIG_ML_PART_SPLIT - , - int prune_rect_flags[3] + , + int prune_rect_flags[3] #endif // CONFIG_ML_PART_SPLIT ); diff --git a/av2/encoder/partition_strategy.c b/av2/encoder/partition_strategy.c index 62b9678f09..f9e7313dd3 100644 --- a/av2/encoder/partition_strategy.c +++ b/av2/encoder/partition_strategy.c @@ -63,11 +63,8 @@ static INLINE int convert_bsize_to_idx(BLOCK_SIZE bsize) { // -- use chroma pixels in addition to luma pixels void av2_intra_mode_cnn_partition(const AV2_COMMON *const cm, MACROBLOCK *x, BLOCK_SIZE bsize, int quad_tree_idx, - int *partition_none_allowed, - int *partition_horz_allowed, - int *partition_vert_allowed, - int *do_rectangular_split, - int *do_square_split) { + PartitionSearchState *partition_search_state, + bool *do_square_split) { assert(cm->sb_size >= BLOCK_64X64 && "Invalid sb_size for intra_cnn!"); const int bsize_idx = convert_bsize_to_idx(bsize); @@ -241,26 +238,22 @@ void av2_intra_mode_cnn_partition(const AV2_COMMON *const cm, MACROBLOCK *x, } if (logits[0] > split_only_thresh) { - *partition_none_allowed = 0; - *partition_horz_allowed = 0; - *partition_vert_allowed = 0; - *do_rectangular_split = 0; + partition_search_state->partition_allowed[PARTITION_NONE] = false; + partition_search_state->partition_allowed[PARTITION_HORZ] = false; + partition_search_state->partition_allowed[PARTITION_VERT] = false; + partition_search_state->do_rectangular_split = false; } if (logits[0] < no_split_thresh) { - *do_square_split = 0; + *do_square_split = false; } } void av2_simple_motion_search_based_split( AV2_COMP *const cpi, MACROBLOCK *x, SIMPLE_MOTION_DATA_TREE *sms_tree, - int mi_row, int mi_col, BLOCK_SIZE bsize, int *partition_none_allowed, - int *partition_horz_allowed, int *partition_vert_allowed, - int *do_rectangular_split, int *do_square_split) { + int mi_row, int mi_col, BLOCK_SIZE bsize, + PartitionSearchState *partition_search_state, bool *do_square_split) { avm_clear_system_state(); - (void)partition_horz_allowed; - (void)partition_vert_allowed; - (void)do_rectangular_split; const AV2_COMMON *const cm = &cpi->common; const int bsize_idx = convert_bsize_to_idx(bsize); @@ -297,15 +290,12 @@ void av2_simple_motion_search_based_split( avm_clear_system_state(); if (score > split_only_thresh) { - *partition_none_allowed = 0; - (void)partition_horz_allowed; - (void)partition_vert_allowed; - (void)do_rectangular_split; + partition_search_state->partition_allowed[PARTITION_NONE] = false; } if (cpi->sf.part_sf.simple_motion_search_split >= 2 && score < no_split_thresh) { - *do_square_split = 0; + *do_square_split = false; } } @@ -512,8 +502,8 @@ static AVM_INLINE void simple_motion_search_prune_part_features( void av2_simple_motion_search_prune_rect( AV2_COMP *const cpi, MACROBLOCK *x, SIMPLE_MOTION_DATA_TREE *sms_tree, - int mi_row, int mi_col, BLOCK_SIZE bsize, int partition_horz_allowed, - int partition_vert_allowed, bool *prune_horz, bool *prune_vert) { + int mi_row, int mi_col, BLOCK_SIZE bsize, + PartitionSearchState *partition_search_state) { // TODO(urvang): Need to change for uneven 4-way partition support. assert(0 && "Not implemented"); avm_clear_system_state(); @@ -563,10 +553,13 @@ void av2_simple_motion_search_prune_rect( // Determine if we should prune rectangular partitions. if (cpi->sf.part_sf.simple_motion_search_prune_rect && !frame_is_intra_only(cm) && - (partition_horz_allowed || partition_vert_allowed) && + (partition_search_state->partition_allowed[PARTITION_HORZ] || + partition_search_state->partition_allowed[PARTITION_VERT]) && bsize >= BLOCK_8X8) { - *prune_horz = probs[PARTITION_HORZ] <= prune_thresh; - *prune_vert = probs[PARTITION_VERT] <= prune_thresh; + partition_search_state->prune_partition[PARTITION_HORZ] = + probs[PARTITION_HORZ] <= prune_thresh; + partition_search_state->prune_partition[PARTITION_VERT] = + probs[PARTITION_VERT] <= prune_thresh; } } @@ -579,7 +572,7 @@ void av2_simple_motion_search_prune_rect( void av2_simple_motion_search_early_term_none( AV2_COMP *const cpi, MACROBLOCK *x, SIMPLE_MOTION_DATA_TREE *sms_tree, int mi_row, int mi_col, BLOCK_SIZE bsize, const RD_STATS *none_rdc, - int *early_terminate) { + bool *early_terminate) { // TODO(chiyotsai@google.com): There are other features we can extract from // PARTITION_NONE. Play with this later. float features[FEATURE_SIZE_SMS_TERM_NONE] = { 0.0f }; @@ -629,7 +622,7 @@ void av2_simple_motion_search_early_term_none( score += ml_model[FEATURE_SIZE_SMS_TERM_NONE]; if (score >= 0.0f) { - *early_terminate = 1; + *early_terminate = true; } } } @@ -858,9 +851,7 @@ int av2_ml_predict_breakout(const AV2_COMP *const cpi, BLOCK_SIZE bsize, void av2_prune_partitions_before_search( AV2_COMP *const cpi, MACROBLOCK *const x, int mi_row, int mi_col, BLOCK_SIZE bsize, SIMPLE_MOTION_DATA_TREE *const sms_tree, - int *partition_none_allowed, int *partition_horz_allowed, - int *partition_vert_allowed, int *do_rectangular_split, - int *do_square_split, bool *prune_horz, bool *prune_vert, + PartitionSearchState *partition_search_state, bool *do_square_split, const PC_TREE *pc_tree) { const AV2_COMMON *const cm = &cpi->common; const CommonModeInfoParams *const mi_params = &cm->mi_params; @@ -878,10 +869,9 @@ void av2_prune_partitions_before_search( mi_col + mi_size_wide[bsize] <= mi_params->mi_cols; if (try_intra_cnn_split) { - av2_intra_mode_cnn_partition( - &cpi->common, x, bsize, x->part_search_info.quad_tree_idx, - partition_none_allowed, partition_horz_allowed, partition_vert_allowed, - do_rectangular_split, do_square_split); + av2_intra_mode_cnn_partition(&cpi->common, x, bsize, + x->part_search_info.quad_tree_idx, + partition_search_state, do_square_split); } // Use simple motion search to prune out split or non-split partitions. This @@ -897,14 +887,13 @@ void av2_prune_partitions_before_search( bsize < BLOCK_256X256 && mi_col + mi_size_wide[bsize] <= mi_params->mi_cols && !frame_is_intra_only(cm) && is_square_block(bsize) && sms_tree && - *partition_none_allowed; + partition_search_state->partition_allowed[PARTITION_NONE]; if (try_split_only) { - av2_simple_motion_search_based_split( - cpi, x, sms_tree, mi_row, mi_col, bsize, partition_none_allowed, - partition_horz_allowed, partition_vert_allowed, do_rectangular_split, - do_square_split); - if (!*partition_none_allowed) { + av2_simple_motion_search_based_split(cpi, x, sms_tree, mi_row, mi_col, + bsize, partition_search_state, + do_square_split); + if (!partition_search_state->partition_allowed[PARTITION_NONE]) { av2_cache_best_partition(x->sms_bufs, mi_row, mi_col, bsize, cm->sb_size, PARTITION_HORZ, (int8_t)pc_tree->region_type); const int mi_step = block_size_high[bsize] / 2; @@ -925,22 +914,25 @@ void av2_prune_partitions_before_search( const int try_prune_rect = !cpi->is_screen_content_type && cpi->sf.part_sf.simple_motion_search_prune_rect && - !frame_is_intra_only(cm) && *do_rectangular_split && - (*do_square_split || *partition_none_allowed || - (*prune_horz && *prune_vert)) && - (*partition_horz_allowed || *partition_vert_allowed) && + !frame_is_intra_only(cm) && + partition_search_state->do_rectangular_split && + (*do_square_split || + partition_search_state->partition_allowed[PARTITION_NONE] || + (partition_search_state->prune_partition[PARTITION_HORZ] && + partition_search_state->prune_partition[PARTITION_VERT])) && + (partition_search_state->partition_allowed[PARTITION_HORZ] || + partition_search_state->partition_allowed[PARTITION_VERT]) && bsize >= BLOCK_8X8; if (try_prune_rect) { - av2_simple_motion_search_prune_rect( - cpi, x, sms_tree, mi_row, mi_col, bsize, *partition_horz_allowed, - *partition_vert_allowed, prune_horz, prune_vert); + av2_simple_motion_search_prune_rect(cpi, x, sms_tree, mi_row, mi_col, bsize, + partition_search_state); } } void av2_prune_partitions_by_max_min_bsize( SuperBlockEnc *sb_enc, BLOCK_SIZE bsize, int is_not_edge_block, - PartitionSearchState *partition_search_state, int *do_square_split) { + PartitionSearchState *partition_search_state, bool *do_square_split) { if (!is_partition_point(bsize) || partition_search_state->forced_partition != PARTITION_INVALID) { // Special case. We can't enforce min/max constraints here. @@ -963,51 +955,52 @@ void av2_prune_partitions_by_max_min_bsize( if (is_gt_max_sq_part) { // current block size is larger than max size. // Disable some partition types to partition down to max allowed size. - partition_search_state->prune_partition_none = true; - partition_search_state->prune_partition_3[HORZ] = true; - partition_search_state->prune_partition_3[VERT] = true; - partition_search_state->prune_partition_4a[HORZ] = true; - partition_search_state->prune_partition_4a[VERT] = true; - partition_search_state->prune_partition_4b[HORZ] = true; - partition_search_state->prune_partition_4b[VERT] = true; - if (partition_search_state->partition_split_allowed) { // only allow split - partition_search_state->prune_rect_part[HORZ] = true; - partition_search_state->prune_rect_part[VERT] = true; + partition_search_state->prune_partition[PARTITION_NONE] = true; + partition_search_state->prune_partition[PARTITION_HORZ_3] = true; + partition_search_state->prune_partition[PARTITION_VERT_3] = true; + partition_search_state->prune_partition[PARTITION_HORZ_4A] = true; + partition_search_state->prune_partition[PARTITION_VERT_4A] = true; + partition_search_state->prune_partition[PARTITION_HORZ_4B] = true; + partition_search_state->prune_partition[PARTITION_VERT_4B] = true; + if (partition_search_state->partition_allowed[PARTITION_SPLIT]) { + // only allow split + partition_search_state->prune_partition[PARTITION_HORZ] = true; + partition_search_state->prune_partition[PARTITION_VERT] = true; } else { // only allow one of horz or vert - assert(partition_search_state->partition_rect_allowed[HORZ] || - partition_search_state->partition_rect_allowed[VERT]); - if (partition_search_state->prune_rect_part[HORZ] && - partition_search_state->prune_rect_part[VERT]) { - if (partition_search_state->partition_rect_allowed[HORZ]) { - partition_search_state->prune_rect_part[HORZ] = false; + assert(partition_search_state->partition_allowed[PARTITION_HORZ] || + partition_search_state->partition_allowed[PARTITION_VERT]); + if (partition_search_state->prune_partition[PARTITION_HORZ] && + partition_search_state->prune_partition[PARTITION_VERT]) { + if (partition_search_state->partition_allowed[PARTITION_HORZ]) { + partition_search_state->prune_partition[PARTITION_HORZ] = false; } - if (partition_search_state->partition_rect_allowed[VERT]) { - partition_search_state->prune_rect_part[VERT] = false; + if (partition_search_state->partition_allowed[PARTITION_VERT]) { + partition_search_state->prune_partition[PARTITION_VERT] = false; } } - if (partition_search_state->partition_rect_allowed[HORZ] && - partition_search_state->partition_rect_allowed[VERT] && - !partition_search_state->prune_rect_part[HORZ] && - !partition_search_state->prune_rect_part[VERT]) { + if (partition_search_state->partition_allowed[PARTITION_HORZ] && + partition_search_state->partition_allowed[PARTITION_VERT] && + !partition_search_state->prune_partition[PARTITION_HORZ] && + !partition_search_state->prune_partition[PARTITION_VERT]) { if (is_wide_block(bsize)) { // Allow VERT partition only. - partition_search_state->prune_rect_part[HORZ] = true; + partition_search_state->prune_partition[PARTITION_HORZ] = true; } else { // Allow HORZ partition only. assert(is_square_block(bsize) || is_tall_block(bsize)); - partition_search_state->prune_rect_part[VERT] = true; + partition_search_state->prune_partition[PARTITION_VERT] = true; } } } } else if (is_le_min_sq_part) { // current block size is less or equal to min // Disallow all 2-way partitions. - partition_search_state->prune_rect_part[HORZ] = true; - partition_search_state->prune_rect_part[VERT] = true; + partition_search_state->prune_partition[PARTITION_HORZ] = true; + partition_search_state->prune_partition[PARTITION_VERT] = true; // Disallow all H and uneven-4way partitions. - partition_search_state->prune_partition_3[HORZ] = true; - partition_search_state->prune_partition_3[VERT] = true; - partition_search_state->prune_partition_4a[HORZ] = true; - partition_search_state->prune_partition_4a[VERT] = true; - partition_search_state->prune_partition_4b[HORZ] = true; - partition_search_state->prune_partition_4b[VERT] = true; + partition_search_state->prune_partition[PARTITION_HORZ_3] = true; + partition_search_state->prune_partition[PARTITION_VERT_3] = true; + partition_search_state->prune_partition[PARTITION_HORZ_4A] = true; + partition_search_state->prune_partition[PARTITION_VERT_4A] = true; + partition_search_state->prune_partition[PARTITION_HORZ_4B] = true; + partition_search_state->prune_partition[PARTITION_VERT_4B] = true; } } diff --git a/av2/encoder/partition_strategy.h b/av2/encoder/partition_strategy.h index 71924ad46d..4d7ac27a04 100644 --- a/av2/encoder/partition_strategy.h +++ b/av2/encoder/partition_strategy.h @@ -46,30 +46,27 @@ typedef struct { int rect_part_win[NUM_RECT_PARTS]; } RD_RECT_PART_WIN_INFO; -void av2_intra_mode_cnn_partition(const AV2_COMMON *const cm, MACROBLOCK *x, - BLOCK_SIZE bsize, int label_idx, - int *partition_none_allowed, - int *partition_horz_allowed, - int *partition_vert_allowed, - int *do_rectangular_split, - int *do_square_split); +struct PartitionSearchState; + +void av2_intra_mode_cnn_partition( + const AV2_COMMON *const cm, MACROBLOCK *x, BLOCK_SIZE bsize, int label_idx, + struct PartitionSearchState *partition_search_state, bool *do_square_split); // Performs a simple_motion_search with a single reference frame and extract // the variance of residues. Then use the features to determine whether we want // to go straight to splitting without trying PARTITION_NONE void av2_simple_motion_search_based_split( AV2_COMP *const cpi, MACROBLOCK *x, SIMPLE_MOTION_DATA_TREE *sms_tree, - int mi_row, int mi_col, BLOCK_SIZE bsize, int *partition_none_allowed, - int *partition_horz_allowed, int *partition_vert_allowed, - int *do_rectangular_split, int *do_square_split); + int mi_row, int mi_col, BLOCK_SIZE bsize, + struct PartitionSearchState *partition_search_state, bool *do_square_split); // Performs a simple_motion_search with two reference frames and extract // the variance of residues. Then use the features to determine whether we want // to prune some partitions. void av2_simple_motion_search_prune_rect( AV2_COMP *const cpi, MACROBLOCK *x, SIMPLE_MOTION_DATA_TREE *sms_tree, - int mi_row, int mi_col, BLOCK_SIZE bsize, int partition_horz_allowed, - int partition_vert_allowed, bool *prune_horz, bool *prune_vert); + int mi_row, int mi_col, BLOCK_SIZE bsize, + struct PartitionSearchState *partition_search_state); // Early terminates PARTITION_NONE using simple_motion_search features and the // rate, distortion, and rdcost of PARTITION_NONE. This is only called when: @@ -80,7 +77,7 @@ void av2_simple_motion_search_prune_rect( void av2_simple_motion_search_early_term_none( AV2_COMP *const cpi, MACROBLOCK *x, SIMPLE_MOTION_DATA_TREE *sms_tree, int mi_row, int mi_col, BLOCK_SIZE bsize, const RD_STATS *none_rdc, - int *early_terminate); + bool *early_terminate); // Get the features for selecting the max and min partition size. Currently this // performs simple_motion_search on 16X16 subblocks of the current superblock, @@ -106,20 +103,16 @@ int av2_ml_predict_breakout(const AV2_COMP *const cpi, BLOCK_SIZE bsize, void av2_prune_partitions_before_search( AV2_COMP *const cpi, MACROBLOCK *const x, int mi_row, int mi_col, BLOCK_SIZE bsize, SIMPLE_MOTION_DATA_TREE *const sms_tree, - int *partition_none_allowed, int *partition_horz_allowed, - int *partition_vert_allowed, int *do_rectangular_split, - int *do_square_split, bool *prune_horz, bool *prune_vert, + struct PartitionSearchState *partition_search_state, bool *do_square_split, const PC_TREE *pc_tree); // Prune out partitions that lead to coding block sizes outside the min and max // bsizes set by the encoder. Max and min square partition levels are defined as // the partition nodes that the recursive function rd_pick_partition() can // reach. -struct PartitionSearchState; - void av2_prune_partitions_by_max_min_bsize( SuperBlockEnc *sb_enc, BLOCK_SIZE bsize, int is_not_edge_block, - struct PartitionSearchState *partition_search_state, int *do_square_split); + struct PartitionSearchState *partition_search_state, bool *do_square_split); SimpleMotionData *av2_get_sms_data_entry(SimpleMotionDataBufs *sms_bufs, int mi_row, int mi_col, From 276561d9450054dee18ef2feee44e0b1c29b83f4 Mon Sep 17 00:00:00 2001 From: Satheesh Kumar Date: Mon, 27 Jul 2026 12:38:30 +0530 Subject: [PATCH 39/51] Use MFMV_STACK_SIZE as `process_ref` array size This patch avoids extra stack buffer size for `process_ref` structure and uses the correct size `MFMV_STACK_SIZE` in `av2_setup_motion_field()`. This aligns with the maximum allowed size check in `check_and_add_process_ref()`. --- av2/common/mvref_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/av2/common/mvref_common.c b/av2/common/mvref_common.c index 204816ce8b..2a3056195a 100644 --- a/av2/common/mvref_common.c +++ b/av2/common/mvref_common.c @@ -4093,7 +4093,7 @@ void av2_setup_motion_field(AV2_COMMON *cm) { } } - struct ProcessRefTMVP process_ref[20]; + struct ProcessRefTMVP process_ref[MFMV_STACK_SIZE]; int process_count = 0; int checked_ref[INTER_REFS_PER_FRAME][2] = { 0 }; int checked_count = 0; From 61ebb8905509f5e10dda92d767efd3f017d0a031 Mon Sep 17 00:00:00 2001 From: Satheesh Kumar Date: Mon, 27 Jul 2026 12:40:11 +0530 Subject: [PATCH 40/51] Refactor check_and_add_process_ref() This patch refactors `check_and_add_process_ref()` by removing `checked_count` and its associated code as `process_count` serves the same purpose. --- av2/common/mvref_common.c | 70 +++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/av2/common/mvref_common.c b/av2/common/mvref_common.c index 2a3056195a..3451363eda 100644 --- a/av2/common/mvref_common.c +++ b/av2/common/mvref_common.c @@ -3077,7 +3077,6 @@ static void check_and_add_process_ref(const AV2_COMMON *cm, int max_check, int type, int start_frame, int target_frame, int side, int checked_ref[INTER_REFS_PER_FRAME][2], - int *checked_count, struct ProcessRefTMVP *process_ref, int *process_count) { const RefCntBuffer *const start_frame_buf = @@ -3090,27 +3089,21 @@ static void check_and_add_process_ref(const AV2_COMMON *cm, int max_check, &cm->seq_params.order_hint_info, start_frame_order_hint, cur_order_hint); if (abs(start_to_current_frame_offset) > MAX_FRAME_DISTANCE) return; - if (cm->bru.enabled && cm->bru.update_ref_idx != -1) { - if (start_frame == cm->bru.update_ref_idx) return; - if (target_frame == cm->bru.update_ref_idx) return; + const int update_ref_idx = cm->bru.update_ref_idx; + if (cm->bru.enabled && update_ref_idx != -1) { + if (start_frame == update_ref_idx || target_frame == update_ref_idx) return; } if (type == 1 && start_frame == target_frame) return; - if (*process_count >= MFMV_STACK_SIZE) return; - if (checked_ref[start_frame][side]) return; + if (*process_count >= max_check || checked_ref[start_frame][side]) return; - if (!checked_ref[start_frame][side] && *checked_count < max_check) { - checked_ref[start_frame][side] = 1; - (*checked_count)++; - } - if (checked_ref[start_frame][side]) { - process_ref[*process_count].type = type; - process_ref[*process_count].start_frame = start_frame; - process_ref[*process_count].side = side; - process_ref[*process_count].target_frame = target_frame; - (*process_count)++; - } + checked_ref[start_frame][side] = 1; + process_ref[*process_count].type = type; + process_ref[*process_count].start_frame = start_frame; + process_ref[*process_count].side = side; + process_ref[*process_count].target_frame = target_frame; + (*process_count)++; } static INLINE int get_blk_id_k(int this_col, int tmvp_proc_sizel2) { @@ -4096,7 +4089,6 @@ void av2_setup_motion_field(AV2_COMMON *cm) { struct ProcessRefTMVP process_ref[MFMV_STACK_SIZE]; int process_count = 0; int checked_ref[INTER_REFS_PER_FRAME][2] = { 0 }; - int checked_count = 0; if (cm->seq_params.enable_tip && cur_frame_sort_idx != -1) { if (cm->has_both_sides_refs || cm->ref_frames_info.num_past_refs >= 2) { @@ -4127,8 +4119,8 @@ void av2_setup_motion_field(AV2_COMMON *cm) { side = dist_diff < 0 ? 1 : 0; check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, start_frame, - target_frame, side, checked_ref, &checked_count, - process_ref, &process_count); + target_frame, side, checked_ref, process_ref, + &process_count); } else { cm->tip_ref.ref_frame[0] = NONE_FRAME; cm->tip_ref.ref_frame[1] = NONE_FRAME; @@ -4164,25 +4156,25 @@ void av2_setup_motion_field(AV2_COMMON *cm) { if (future_ref_to_its_ref_dist < past_ref_to_its_ref_dist) { if (future_ref_sort_idx != -1) { - check_and_add_process_ref( - cm, TIP_MFMV_STACK_SIZE, 0, sort_ref[future_ref_sort_idx], -1, 0, - checked_ref, &checked_count, process_ref, &process_count); + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + sort_ref[future_ref_sort_idx], -1, 0, + checked_ref, process_ref, &process_count); } if (past_ref_sort_idx != -1) { - check_and_add_process_ref( - cm, TIP_MFMV_STACK_SIZE, 0, sort_ref[past_ref_sort_idx], -1, 1, - checked_ref, &checked_count, process_ref, &process_count); + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + sort_ref[past_ref_sort_idx], -1, 1, + checked_ref, process_ref, &process_count); } } else { if (past_ref_sort_idx != -1) { - check_and_add_process_ref( - cm, TIP_MFMV_STACK_SIZE, 0, sort_ref[past_ref_sort_idx], -1, 1, - checked_ref, &checked_count, process_ref, &process_count); + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + sort_ref[past_ref_sort_idx], -1, 1, + checked_ref, process_ref, &process_count); } if (future_ref_sort_idx != -1) { - check_and_add_process_ref( - cm, TIP_MFMV_STACK_SIZE, 0, sort_ref[future_ref_sort_idx], -1, 0, - checked_ref, &checked_count, process_ref, &process_count); + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + sort_ref[future_ref_sort_idx], -1, 0, + checked_ref, process_ref, &process_count); } } } @@ -4190,12 +4182,12 @@ void av2_setup_motion_field(AV2_COMMON *cm) { if (cur_frame_sort_idx >= 0) { check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, sort_ref[cur_frame_sort_idx], -1, 0, checked_ref, - &checked_count, process_ref, &process_count); + process_ref, &process_count); } if (cur_frame_sort_idx >= 1) { - check_and_add_process_ref( - cm, TIP_MFMV_STACK_SIZE, 0, sort_ref[cur_frame_sort_idx - 1], -1, 0, - checked_ref, &checked_count, process_ref, &process_count); + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + sort_ref[cur_frame_sort_idx - 1], -1, 0, + checked_ref, process_ref, &process_count); } for (int ri = stack_count - 1; ri > 0; ri--) { @@ -4210,15 +4202,13 @@ void av2_setup_motion_field(AV2_COMMON *cm) { if (!checked_ref[rf_stack[ri]][side]) { check_and_add_process_ref(cm, MFMV_STACK_SIZE, 0, rf_stack[ri], -1, side, - checked_ref, &checked_count, process_ref, - &process_count); + checked_ref, process_ref, &process_count); } side = !side; if (!checked_ref[rf_stack[ri]][side]) { check_and_add_process_ref(cm, MFMV_STACK_SIZE, 0, rf_stack[ri], -1, side, - checked_ref, &checked_count, process_ref, - &process_count); + checked_ref, process_ref, &process_count); } } From 3b273fe67e6442e30fd3d9490df39741a2769841 Mon Sep 17 00:00:00 2001 From: Satheesh Kumar Date: Mon, 27 Jul 2026 12:40:40 +0530 Subject: [PATCH 41/51] Remove unused `ProcessRefTMVP->type` and associated code Initially, `ProcessRefTMVP->type` was introduced to indicate whether to use side projection (type 0) or target frame projection (type 1). Later, the logic was simplified and type 0 is only used for every case. As a result, `motion_field_projection_start_target()` is entirely unused. This patch cleans up these unused code. --- av2/common/mvref_common.c | 205 +++----------------------------------- 1 file changed, 14 insertions(+), 191 deletions(-) diff --git a/av2/common/mvref_common.c b/av2/common/mvref_common.c index 3451363eda..661ea4a9ff 100644 --- a/av2/common/mvref_common.c +++ b/av2/common/mvref_common.c @@ -3065,7 +3065,6 @@ static int has_past_ref(const AV2_COMMON *cm, int rf) { // Struct to store the reference frame motion field candidates. struct ProcessRefTMVP { - int type; // 0 means with side, 1 means with target frame. int side; // 0 means right to left, 1 means left to right. int start_frame; int target_frame; @@ -3074,8 +3073,8 @@ struct ProcessRefTMVP { // Add a reference frame motion field candidate, if we have not reached the // maximum allowed. static void check_and_add_process_ref(const AV2_COMMON *cm, int max_check, - int type, int start_frame, - int target_frame, int side, + int start_frame, int target_frame, + int side, int checked_ref[INTER_REFS_PER_FRAME][2], struct ProcessRefTMVP *process_ref, int *process_count) { @@ -3094,12 +3093,9 @@ static void check_and_add_process_ref(const AV2_COMMON *cm, int max_check, if (start_frame == update_ref_idx || target_frame == update_ref_idx) return; } - if (type == 1 && start_frame == target_frame) return; - if (*process_count >= max_check || checked_ref[start_frame][side]) return; checked_ref[start_frame][side] = 1; - process_ref[*process_count].type = type; process_ref[*process_count].start_frame = start_frame; process_ref[*process_count].side = side; process_ref[*process_count].target_frame = target_frame; @@ -3250,174 +3246,6 @@ static INLINE void check_traj_intersect(AV2_COMMON *cm, } } -// Calculate the projected motion field from the TMVP mvs that points from -// start_frame to target_frame. -static int motion_field_projection_start_target( - AV2_COMMON *cm, MV_REFERENCE_FRAME start_frame, - MV_REFERENCE_FRAME target_frame) { - const int cur_order_hint = cm->cur_frame->display_order_hint; - - if (get_ref_frame_buf(cm, start_frame)->is_restricted) return 0; - - int start_order_hint = get_ref_frame_buf(cm, start_frame)->display_order_hint; - int target_order_hint = - get_ref_frame_buf(cm, target_frame)->display_order_hint; - - OrderHintInfo *order_hint_info = &cm->seq_params.order_hint_info; - - int ref_frame_offset = - get_relative_dist(order_hint_info, start_order_hint, target_order_hint); - - if (abs(ref_frame_offset) > MAX_FRAME_DISTANCE) { - return 0; - } - - const RefCntBuffer *const start_frame_buf = - get_ref_frame_buf(cm, start_frame); - if (!is_ref_motion_field_eligible(cm, start_frame_buf)) return 0; - - assert(start_frame_buf->width == cm->width && - start_frame_buf->height == cm->height); - - const int *const ref_order_hints = start_frame_buf->ref_display_order_hint; - - int start_to_current_frame_offset = - get_relative_dist(order_hint_info, start_order_hint, cur_order_hint); - - if (abs(start_to_current_frame_offset) > MAX_FRAME_DISTANCE) { - return 0; - } - - const int is_backward = ref_frame_offset < 0; - int mv_idx = is_backward ? 1 : 0; - if (is_backward) { - ref_frame_offset = -ref_frame_offset; - start_to_current_frame_offset = -start_to_current_frame_offset; - } - - const int temporal_scale_factor = - tip_derive_scale_factor(start_to_current_frame_offset, ref_frame_offset); - const int ref_temporal_scale_factor = tip_derive_scale_factor( - -ref_frame_offset + start_to_current_frame_offset, -ref_frame_offset); - - const MV_REF *mv_ref_base = start_frame_buf->mvs; - const int mvs_rows = - ROUND_POWER_OF_TWO(cm->mi_params.mi_rows, TMVP_SHIFT_BITS); - const int mvs_cols = - ROUND_POWER_OF_TWO(cm->mi_params.mi_cols, TMVP_SHIFT_BITS); - const int start_mvs_rows = - ROUND_POWER_OF_TWO(start_frame_buf->mi_rows, TMVP_SHIFT_BITS); - const int start_mvs_cols = - ROUND_POWER_OF_TWO(start_frame_buf->mi_cols, TMVP_SHIFT_BITS); - (void)mvs_rows; - - assert(cm->tmvp_sample_step > 0); - for (int blk_row = 0; blk_row < start_mvs_rows; - blk_row += cm->tmvp_sample_step) { - for (int blk_col = 0; blk_col < start_mvs_cols; - blk_col += cm->tmvp_sample_step) { - const MV_REF *mv_ref = &mv_ref_base[blk_row * start_mvs_cols + blk_col]; - if (is_inter_ref_frame(mv_ref->ref_frame[mv_idx])) { - const int ref_frame_order_hint = - ref_order_hints[mv_ref->ref_frame[mv_idx]]; - if (get_relative_dist(order_hint_info, ref_frame_order_hint, - target_order_hint) == 0) { - MV ref_mv = mv_ref->mv[mv_idx].as_mv; - fetch_mv_from_tmvp(&ref_mv); - int scaled_blk_col = blk_col; - int scaled_blk_row = blk_row; - - if (cm->seq_params.enable_mv_traj) { - check_traj_intersect(cm, start_frame, target_frame, &ref_mv, - scaled_blk_row, scaled_blk_col, mvs_cols); - } - - int_mv this_mv; - int mi_r = 0; - int mi_c = 0; - tip_get_mv_projection(&this_mv.as_mv, ref_mv, temporal_scale_factor); - int pos_valid; - if (this_mv.as_int == 0) { - pos_valid = 1; - mi_r = scaled_blk_row; - mi_c = scaled_blk_col; - } else { - pos_valid = get_block_position_no_constraint( - cm, &mi_r, &mi_c, scaled_blk_row, scaled_blk_col, this_mv.as_mv, - 0); - } - mi_r = (mi_r >> cm->tmvp_sample_stepl2) << cm->tmvp_sample_stepl2; - mi_c = (mi_c >> cm->tmvp_sample_stepl2) << cm->tmvp_sample_stepl2; - - if (pos_valid) - pos_valid = check_block_position(cm, scaled_blk_row, scaled_blk_col, - mi_r, mi_c); - - if (pos_valid) { - if (cm->tpl_mvs_rows[mi_r][mi_c].mfmv0.as_int == INVALID_MV) { - if (cm->seq_params.enable_mv_traj) { - int blk_id_k = get_blk_id_k(mi_c, cm->tmvp_proc_sizel2); - int_mv ***blk_id_map_rows = cm->blk_id_map_rows[blk_id_k]; - cm->id_offset_map_rows[start_frame][mi_r][mi_c].as_mv.row = - clamp(-this_mv.as_mv.row, -REFMVS_LIMIT, REFMVS_LIMIT); - cm->id_offset_map_rows[start_frame][mi_r][mi_c].as_mv.col = - clamp(-this_mv.as_mv.col, -REFMVS_LIMIT, REFMVS_LIMIT); - blk_id_map_rows[start_frame][scaled_blk_row][scaled_blk_col] - .as_mv.row = mi_r; - blk_id_map_rows[start_frame][scaled_blk_row][scaled_blk_col] - .as_mv.col = mi_c; - - MV target_frame_mv; - tip_get_mv_projection(&target_frame_mv, ref_mv, - ref_temporal_scale_factor); - cm->id_offset_map_rows[target_frame][mi_r][mi_c].as_mv.row = - clamp(target_frame_mv.row, -REFMVS_LIMIT, REFMVS_LIMIT); - cm->id_offset_map_rows[target_frame][mi_r][mi_c].as_mv.col = - clamp(target_frame_mv.col, -REFMVS_LIMIT, REFMVS_LIMIT); - int target_row = 0, target_col = 0; - int target_pos_valid; - if (ref_mv.row == 0 && ref_mv.col == 0) { - target_pos_valid = 1; - target_row = scaled_blk_row; - target_col = scaled_blk_col; - } else { - target_pos_valid = get_block_position_no_constraint( - cm, &target_row, &target_col, scaled_blk_row, - scaled_blk_col, ref_mv, 0); - } - target_row = (target_row >> cm->tmvp_sample_stepl2) - << cm->tmvp_sample_stepl2; - target_col = (target_col >> cm->tmvp_sample_stepl2) - << cm->tmvp_sample_stepl2; - - if (target_pos_valid) - target_pos_valid = check_block_position( - cm, target_row, target_col, mi_r, mi_c); - - if (target_pos_valid) { - blk_id_map_rows[target_frame][target_row][target_col] - .as_mv.row = mi_r; - blk_id_map_rows[target_frame][target_row][target_col] - .as_mv.col = mi_c; - } - } - - if (is_backward) { - ref_mv.row = -ref_mv.row; - ref_mv.col = -ref_mv.col; - } - cm->tpl_mvs_rows[mi_r][mi_c].mfmv0.as_mv.row = ref_mv.row; - cm->tpl_mvs_rows[mi_r][mi_c].mfmv0.as_mv.col = ref_mv.col; - cm->tpl_mvs_rows[mi_r][mi_c].ref_frame_offset = ref_frame_offset; - } - } - } - } - } - } - return 1; -} - // Calculate the projected motion field from the TMVP mvs that points from // start_frame to one side. static int motion_field_projection_side(AV2_COMMON *cm, @@ -4118,7 +3946,7 @@ void av2_setup_motion_field(AV2_COMMON *cm) { get_ref_frame_buf(cm, target_frame)->display_order_hint); side = dist_diff < 0 ? 1 : 0; - check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, start_frame, + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, start_frame, target_frame, side, checked_ref, process_ref, &process_count); } else { @@ -4156,23 +3984,23 @@ void av2_setup_motion_field(AV2_COMMON *cm) { if (future_ref_to_its_ref_dist < past_ref_to_its_ref_dist) { if (future_ref_sort_idx != -1) { - check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, sort_ref[future_ref_sort_idx], -1, 0, checked_ref, process_ref, &process_count); } if (past_ref_sort_idx != -1) { - check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, sort_ref[past_ref_sort_idx], -1, 1, checked_ref, process_ref, &process_count); } } else { if (past_ref_sort_idx != -1) { - check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, sort_ref[past_ref_sort_idx], -1, 1, checked_ref, process_ref, &process_count); } if (future_ref_sort_idx != -1) { - check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, sort_ref[future_ref_sort_idx], -1, 0, checked_ref, process_ref, &process_count); } @@ -4180,12 +4008,12 @@ void av2_setup_motion_field(AV2_COMMON *cm) { } if (cur_frame_sort_idx >= 0) { - check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, sort_ref[cur_frame_sort_idx], -1, 0, checked_ref, process_ref, &process_count); } if (cur_frame_sort_idx >= 1) { - check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, 0, + check_and_add_process_ref(cm, TIP_MFMV_STACK_SIZE, sort_ref[cur_frame_sort_idx - 1], -1, 0, checked_ref, process_ref, &process_count); } @@ -4201,13 +4029,13 @@ void av2_setup_motion_field(AV2_COMMON *cm) { } if (!checked_ref[rf_stack[ri]][side]) { - check_and_add_process_ref(cm, MFMV_STACK_SIZE, 0, rf_stack[ri], -1, side, + check_and_add_process_ref(cm, MFMV_STACK_SIZE, rf_stack[ri], -1, side, checked_ref, process_ref, &process_count); } side = !side; if (!checked_ref[rf_stack[ri]][side]) { - check_and_add_process_ref(cm, MFMV_STACK_SIZE, 0, rf_stack[ri], -1, side, + check_and_add_process_ref(cm, MFMV_STACK_SIZE, rf_stack[ri], -1, side, checked_ref, process_ref, &process_count); } } @@ -4227,14 +4055,9 @@ void av2_setup_motion_field(AV2_COMMON *cm) { process_count = AVMMIN(1, process_count); } for (int pi = 0; pi < process_count; pi++) { - if (process_ref[pi].type == 0) { - motion_field_projection_side(cm, process_ref[pi].start_frame, - process_ref[pi].target_frame, - process_ref[pi].side); - } else { - motion_field_projection_start_target(cm, process_ref[pi].start_frame, - process_ref[pi].target_frame); - } + motion_field_projection_side(cm, process_ref[pi].start_frame, + process_ref[pi].target_frame, + process_ref[pi].side); } if (cm->seq_params.enable_mv_traj) { From 0487cdcc8ca21986f7545beca2c3840caafa97a7 Mon Sep 17 00:00:00 2001 From: Satheesh Kumar Date: Mon, 27 Jul 2026 18:54:50 +0530 Subject: [PATCH 42/51] Prevent auto inlining of motion_field_projection_side() The recent removal of `motion_field_projection_start_target()` causes GCC compiler to inline `motion_field_projection_side()` into `av2_setup_motion_field()`, increasing the decoder instruction count by ~0.5%. Marking the function noinline prevents this issue. Clang compiler shows neutral impact for this change. --- av2/common/mvref_common.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/av2/common/mvref_common.c b/av2/common/mvref_common.c index 661ea4a9ff..cda7a577c3 100644 --- a/av2/common/mvref_common.c +++ b/av2/common/mvref_common.c @@ -3248,10 +3248,14 @@ static INLINE void check_traj_intersect(AV2_COMMON *cm, // Calculate the projected motion field from the TMVP mvs that points from // start_frame to one side. -static int motion_field_projection_side(AV2_COMMON *cm, - MV_REFERENCE_FRAME start_frame, - MV_REFERENCE_FRAME target_frame, - int side_idx) { +#ifdef __GNUC__ +// This prevents inlining this function into av2_setup_motion_field(), which +// avoids an instruction count increase on GCC. Impact on Clang is neutral. +__attribute__((noinline)) +#endif +static int +motion_field_projection_side(AV2_COMMON *cm, MV_REFERENCE_FRAME start_frame, + MV_REFERENCE_FRAME target_frame, int side_idx) { int ref_offset[INTER_REFS_PER_FRAME] = { 0 }; const RefCntBuffer *const start_frame_buf = From 99815e009518e3d9b06592d2f073a61eb20e71bc Mon Sep 17 00:00:00 2001 From: motongxu Date: Tue, 28 Jul 2026 18:28:42 -0700 Subject: [PATCH 43/51] Adaptive tx search level (#5170) Introduce 3 EOB levels adaptive tx search pruning. eob_level = 0: eob >= max_eob / 4 eob_level = 1: max_eob / 12 <= eob < max_eob / 4 eob_level = 2: eob < max_eob / 12 Anchor: https://github.com/AOMediaCodec/avm/commit/0d25d5803a23907057f2ef018462425bc823a9c2 Tests: cpu-used =1, RA A1 - 17 frames A2 - 33 frames ``` +---------+--------+--------+--------+--------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+--------+--------+--------+--------+----------+----------+ | A1 | 0.09% | -0.06% | -0.99% | 0.03% | 96.4% | 99.5% | | A2 | 0.09% | -0.35% | -0.20% | 0.06% | 97.7% | 99.6% | +---------+--------+--------+--------+--------+----------+----------+ ``` --- av2/encoder/speed_features.c | 3 +++ av2/encoder/speed_features.h | 3 ++- av2/encoder/tx_search.c | 28 ++++++++++++++++++++++------ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 3ddab1f7c7..3e48360c35 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -356,6 +356,8 @@ static void set_good_speed_features_framesize_independent( sf->tx_sf.adaptive_tx_type_search_idx = 4; sf->tx_sf.adaptive_tx_partition_type_search_idx = 4; + sf->tx_sf.enable_adaptive_tx_search_level = true; + sf->tx_sf.prune_intra_ist_stx_by_zero_eob = true; sf->inter_sf.prune_comp_search_by_single_result = boosted ? 2 : 1; @@ -852,6 +854,7 @@ static AVM_INLINE void init_tx_sf(TX_SPEED_FEATURES *tx_sf) { tx_sf->restrict_tx_partition_type_search = 0; tx_sf->prune_inter_tx_part_rd_eval = false; tx_sf->enable_tx_partition = true; + tx_sf->enable_adaptive_tx_search_level = false; tx_sf->prune_intra_ist_stx_by_zero_eob = false; } diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 2c76d444fd..92e4540637 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -877,7 +877,8 @@ typedef struct TX_SPEED_FEATURES { // Enable txfm partition search bool enable_tx_partition; - + // Enable adaptive tx search level + bool enable_adaptive_tx_search_level; // Enable adaptive TCQ threshold: bool enable_adaptive_tcq_threshold; diff --git a/av2/encoder/tx_search.c b/av2/encoder/tx_search.c index 0fd431cb61..00ede94006 100644 --- a/av2/encoder/tx_search.c +++ b/av2/encoder/tx_search.c @@ -112,9 +112,15 @@ static const int tx_partition_prune_level[2][6] = { { 0, 1, 3, 3, 2, 3 }, // look-up table of transform type pruning level used to prune the evaluation of // transform type based on best rd and eob. -static const int tx_type_prune_level[2][6] = { { 0, 1, 2, 1, 2, 3 }, - { 0, 1, 3, 3, 2, 3 } }; - +static const int tx_type_prune_level[2][6] = { + { 0, 1, 2, 1, 2, 3 }, // eob >= max_eob / 8 + { 0, 1, 3, 3, 2, 3 } // eob < max_eob / 8 +}; +static const int tx_type_prune_level_3regions[3][6] = { + { 0, 1, 2, 1, 1, 3 }, // eob >= max_eob / 4 + { 0, 1, 2, 1, 2, 3 }, // max_eob / 12 <= eob < max_eob / 4 + { 0, 1, 3, 3, 3, 3 }, // eob < max_eob / 12 +}; static INLINE uint32_t get_block_residue_hash(MACROBLOCK *x, BLOCK_SIZE bsize) { const int rows = block_size_high[bsize]; const int cols = block_size_wide[bsize]; @@ -2694,9 +2700,19 @@ static void search_tx_type(const AV2_COMP *cpi, MACROBLOCK *x, int plane, // Terminate the search early, If the best rd is higher than the // reference best rd and number of coded coefficients are smaller // than a threshold. - const int search_level = - tx_type_prune_level[mb_plane->eobs[block] < max_eob / 8] - [tx_sf->adaptive_tx_type_search_idx]; + int search_level = 0; + if (tx_sf->enable_adaptive_tx_search_level) { + const int eob_level = (mb_plane->eobs[block] >= (max_eob / 4)) ? 0 + : (mb_plane->eobs[block] >= (max_eob / 12)) ? 1 + : 2; + search_level = + tx_type_prune_level_3regions[eob_level] + [tx_sf->adaptive_tx_type_search_idx]; + } else { + search_level = + tx_type_prune_level[mb_plane->eobs[block] < max_eob / 8] + [tx_sf->adaptive_tx_type_search_idx]; + } if (search_level && (best_rd - (best_rd >> search_level)) > ref_best_rd) { skip_idx = true; From 1a98eb12456f120626bfb7017b7bc93f21afbab4 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Wed, 29 Jul 2026 09:49:34 -0700 Subject: [PATCH 44/51] Rework av2_update_nbr_diagonal_c (#5172) Make the C and AVX2 code have the same behavior. Add unit test to check the two match. --- av2/encoder/trellis_quant.c | 121 ++++++++++++++++++------------------ test/trellis_test.cc | 81 ++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 59 deletions(-) diff --git a/av2/encoder/trellis_quant.c b/av2/encoder/trellis_quant.c index 3cd101aa80..292bb3e8dc 100644 --- a/av2/encoder/trellis_quant.c +++ b/av2/encoder/trellis_quant.c @@ -456,73 +456,76 @@ static int get_coeff_cost(int ci, tran_low_t abs_qc, int sign, int coeff_ctx, // Update neighbor coeff magnitudes state for current diagonal. void av2_update_nbr_diagonal_c(struct tcq_ctx_t *tcq_ctx, int row, int col, int bwl) { - // Temp storage for next diagonal ctx, with padding. - uint8_t next_base_mag[32 + 8][TCQ_MAX_STATES]; - uint8_t next_mid_mag[32 + 8][TCQ_MAX_STATES]; - uint8_t(*next_base)[TCQ_MAX_STATES] = &next_base_mag[4]; - uint8_t(*next_mid)[TCQ_MAX_STATES] = &next_mid_mag[4]; - uint8_t(*mag_base)[TCQ_MAX_STATES] = &tcq_ctx->mag_base[4]; - uint8_t(*mag_mid)[TCQ_MAX_STATES] = &tcq_ctx->mag_mid[4]; - - int idx_start = col; - int idx_end = 1 << bwl; - for (int st = 0; st < TCQ_MAX_STATES; st++) { - // Copy original coeff context from previous diagonal. - int orig_st = tcq_ctx->orig_st[st]; - if (orig_st < 0) { - for (int i = 0; i < 32; i++) { - next_base[i][st] = 0; - next_mid[i][st] = 0; - } - } else { - for (int i = 0; i < 32; i++) { - next_base[i][st] = mag_base[i][orig_st]; - next_mid[i][st] = mag_mid[i][orig_st]; - } - } - } - memset(next_base_mag, 0, sizeof(next_base_mag[0]) * 4); - memset(next_mid_mag, 0, sizeof(next_mid_mag[0]) * 4); - memset(tcq_ctx->mag_base, 0, sizeof(tcq_ctx->mag_base)); - memset(tcq_ctx->mag_mid, 0, sizeof(tcq_ctx->mag_mid)); int diag = row + col; + int idx_start = col; + int idx_end = AVMMIN(diag + 1, 1 << bwl); + int idx0 = AVMMAX(idx_start - 2, 0); + int max1 = diag < 5 ? 5 : 3; int max2 = diag < 6 ? 5 : 3; + static const int8_t max_tbl[4] = { 0, 8, 6, 4 }; + int base_max = max_tbl[AVMMIN(diag, 3)]; + + int state_arr[MAX_DIAG + 8][TCQ_MAX_STATES]; + for (int st = 0; st < TCQ_MAX_STATES; st++) { - // Update neighbor magnitudes - int st1 = st; - for (int i = idx_start; st1 >= 0 && i < idx_end; i++) { - int lev = tcq_ctx->lev_new[i][st1]; - st1 = tcq_ctx->prev_st[i][st1]; - // Update base positions {1, 0}, {0, 1} - int base1 = AVMMIN(lev, max1); - next_base[i][st] += base1; - next_base[i - 1][st] += base1; - // Update mid positions {1, 0}, {0, 1} - next_mid[i][st] += lev; - next_mid[i - 1][st] += lev; - // Update base positions {2, 0}, {1. 1}, {0, 2} - int base2 = AVMMIN(lev, max2); - mag_base[i][st] += base2; - mag_base[i - 1][st] += base2; - mag_base[i - 2][st] += base2; - // Update mid position {1, 1} - mag_mid[i - 1][st] = lev; + state_arr[idx0][st] = st; + } + + for (int i = idx0; i < idx_end + 1; i++) { + for (int st = 0; st < TCQ_MAX_STATES; st++) { + int cur = state_arr[i][st]; + state_arr[i + 1][st] = (cur < 0) ? -1 : tcq_ctx->prev_st[i][cur]; } } - // Calc next context info - memset(tcq_ctx->ctx, 0, sizeof(tcq_ctx->ctx)); - static const int8_t max_tbl[6] = { 0, 8, 6, 4, 4, 4 }; - int base_max = max_tbl[AVMMIN(diag, 5)]; + + uint8_t new_mag_base[MAX_DIAG + 8][TCQ_MAX_STATES]; + uint8_t new_mag_mid[MAX_DIAG + 8][TCQ_MAX_STATES]; + for (int st = 0; st < TCQ_MAX_STATES; st++) { - for (int i = 0; i < 32; i++) { - int base_ctx = next_base[i][st]; - int mid_ctx = next_mid[i][st]; - base_ctx = AVMMIN((base_ctx + 1) >> 1, base_max); - mid_ctx = AVMMIN((mid_ctx + 1) >> 1, 6); - tcq_ctx->ctx[i][st] = (mid_ctx << 4) + base_ctx; + int orig_st = tcq_ctx->orig_st[st]; + for (int i = idx0; i < idx_end; i++) { + int base = (orig_st < 0) ? 0 : tcq_ctx->mag_base[i][orig_st]; + int mid = (orig_st < 0) ? 0 : tcq_ctx->mag_mid[i][orig_st]; + + int st0 = state_arr[i][st]; + int st1 = state_arr[i + 1][st]; + int st2 = state_arr[i + 2][st]; + + int lev0 = (st0 < 0) ? 0 : tcq_ctx->lev_new[i][st0]; + int lev1 = (st1 < 0) ? 0 : tcq_ctx->lev_new[i + 1][st1]; + int lev2 = (st2 < 0) ? 0 : tcq_ctx->lev_new[i + 2][st2]; + + int lev0_max1 = AVMMIN(lev0, max1); + int lev1_max1 = AVMMIN(lev1, max1); + int base_sum2 = lev0_max1 + lev1_max1; + + base = (base + base_sum2 + 1) >> 1; + base = AVMMIN(base, base_max); + + int mid_sum2 = lev0 + lev1; + mid = (mid + mid_sum2 + 1) >> 1; + mid = AVMMIN(mid, 6); + + tcq_ctx->ctx[i][st] = (mid << 4) | base; + + int lev0_max2 = AVMMIN(lev0, max2); + int lev1_max2 = AVMMIN(lev1, max2); + int lev2_max2 = AVMMIN(lev2, max2); + int base_sum3 = lev0_max2 + lev1_max2 + lev2_max2; + new_mag_base[i][st] = base_sum3; + new_mag_mid[i][st] = lev1; + } + } + + for (int i = idx0; i < idx_end; i++) { + for (int st = 0; st < TCQ_MAX_STATES; st++) { + tcq_ctx->mag_base[i][st] = new_mag_base[i][st]; + tcq_ctx->mag_mid[i][st] = new_mag_mid[i][st]; } - // Reset original state to prepare for next diagonal. + } + + for (int st = 0; st < TCQ_MAX_STATES; st++) { tcq_ctx->orig_st[st] = st; } } diff --git a/test/trellis_test.cc b/test/trellis_test.cc index 3c4587e1bd..c63d18a560 100644 --- a/test/trellis_test.cc +++ b/test/trellis_test.cc @@ -396,6 +396,80 @@ TEST_P(TcqRateLfLumaTest, RandomValues) { } } +typedef void (*TcqUpdateNbrDiagonalFunc)(struct tcq_ctx_t *tcq_ctx, int row, + int col, int bwl); +typedef libavm_test::FuncParam + TcqUpdateNbrDiagonalTestFuncs; + +class TcqUpdateNbrDiagonalTest + : public FunctionEquivalenceTest { + protected: + static const int kIterations = 10000; + + void RunTest() { + for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) { + int bwl = 2 + (rng_.Rand8() & 3); + int max_diag = (1 << bwl) + (1 << bwl) - 2; + int diag = rng_.Rand8() % (max_diag + 1); + int row = rng_.Rand8() % (diag + 1); + int col = diag - row; + if (col >= (1 << bwl)) col = (1 << bwl) - 1; + row = diag - col; + if (row >= (1 << bwl)) row = (1 << bwl) - 1; + + tcq_ctx_t ctx_ref; + tcq_ctx_t ctx_tst; + memset(&ctx_ref, 0, sizeof(ctx_ref)); + + for (int i = 0; i < TCQ_MAX_STATES; i++) { + ctx_ref.orig_st[i] = + (rng_.Rand8() % 3 == 0) ? -1 : (rng_.Rand8() % TCQ_MAX_STATES); + } + for (int i = 0; i < MAX_DIAG + 8; i++) { + for (int st = 0; st < TCQ_MAX_STATES; st++) { + ctx_ref.lev_new[i][st] = rng_.Rand8() % (MAX_VAL_BR_CTX + 1); + ctx_ref.mag_base[i][st] = rng_.Rand8(); + ctx_ref.mag_mid[i][st] = rng_.Rand8(); + ctx_ref.ctx[i][st] = rng_.Rand8(); + ctx_ref.prev_st[i][st] = + (rng_.Rand8() % 3 == 0) ? -1 : (rng_.Rand8() % TCQ_MAX_STATES); + } + } + + ctx_tst = ctx_ref; + + params_.ref_func(&ctx_ref, row, col, bwl); + ASM_REGISTER_STATE_CHECK(params_.tst_func(&ctx_tst, row, col, bwl)); + int idx_start = col; + int idx_end = AVMMIN(diag + 1, 1 << bwl); + int idx0 = AVMMAX(idx_start - 2, 0); + + for (int i = idx0; i < idx_end; i++) { + for (int st = 0; st < TCQ_MAX_STATES; st++) { + ASSERT_EQ((int)ctx_ref.ctx[i][st], (int)ctx_tst.ctx[i][st]) + << "Mismatch in ctx at i=" << i << ", st=" << st + << ", row=" << row << ", col=" << col << ", diag=" << diag + << ", bwl=" << bwl; + ASSERT_EQ((int)ctx_ref.mag_base[i][st], (int)ctx_tst.mag_base[i][st]) + << "Mismatch in mag_base at i=" << i << ", st=" << st + << ", row=" << row << ", col=" << col << ", diag=" << diag + << ", bwl=" << bwl; + ASSERT_EQ((int)ctx_ref.mag_mid[i][st], (int)ctx_tst.mag_mid[i][st]) + << "Mismatch in mag_mid at i=" << i << ", st=" << st + << ", row=" << row << ", col=" << col << ", diag=" << diag + << ", bwl=" << bwl; + } + } + for (int st = 0; st < TCQ_MAX_STATES; st++) { + ASSERT_EQ((int)ctx_ref.orig_st[st], (int)ctx_tst.orig_st[st]) + << "Mismatch in orig_st at st=" << st; + } + } + } +}; + +TEST_P(TcqUpdateNbrDiagonalTest, RandomValues) { RunTest(); } + #if HAVE_AVX2 INSTANTIATE_TEST_SUITE_P( AVX2, TcqRateLumaTest, @@ -406,10 +480,17 @@ INSTANTIATE_TEST_SUITE_P( AVX2, TcqRateLfLumaTest, ::testing::Values(TcqRateLfLumaTestFuncs(av2_get_rate_dist_lf_luma_c, av2_get_rate_dist_lf_luma_avx2))); + +INSTANTIATE_TEST_SUITE_P(AVX2, TcqUpdateNbrDiagonalTest, + ::testing::Values(TcqUpdateNbrDiagonalTestFuncs( + av2_update_nbr_diagonal_c, + av2_update_nbr_diagonal_avx2))); #endif // HAVE_AVX2 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TcqRateLumaTest); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TcqRateLfLumaTest); +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TcqUpdateNbrDiagonalTest); + } // namespace From b2cfb545df2bcda6aa66567e4bdd8c257cb64eb1 Mon Sep 17 00:00:00 2001 From: Yixin Du Date: Wed, 29 Jul 2026 10:28:51 -0700 Subject: [PATCH 45/51] MLP-based partition pre-screener (#5168) MLP-based partition pre-screener Add an MLP-based partition mode pre-screener for the encoder's partition search. A small 3-layer network (38 inputs, hidden dims 64/32, 4 outputs) predicts NONE/HORZ/VERT/SPLIT per block from a 32-bin HOG histogram over the source luma plane plus 6 scalar features (source variance, block size, QP, RD cost of the NONE partition, and the winning partition type of the above/left neighbors). Separate models are trained for intra-only and inter frames. When the model confidently predicts NONE, the weaker of the HORZ/VERT rectangular directions is pruned from the RD search. Enabled at speed >= 1 via sf.part_sf.partition_pruning_with_mlp. Anchor: commit 1d2febc43d Performance of this change in isolation, Speed 1 (cpu-used=1), FG16 CTC (33 frames): AI: ``` +------------+------+-------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | +------------+------+-------+-------+------+------+ | A1 | 0.14 | 0.05 | -0.01 | 0.13 | 90 | | A2 | 0.17 | 0.05 | -0.02 | 0.16 | 90 | +------------+------+-------+-------+------+------+ | Avg w/o B2 | 0.17 | -0.02 | 0.08 | 0.16 | 90 | +------------+------+-------+-------+------+------+ ``` RA: ``` +------------+------+------+-------+------+------+ | Class | Y | Cb | Cr | wAvg | Enc% | +------------+------+------+-------+------+------+ | A1 | 0.12 | 0.23 | -0.40 | 0.10 | 96 | | A2 | 0.07 | 0.24 | 0.36 | 0.08 | 95 | +------------+------+------+-------+------+------+ | Avg w/o B2 | 0.13 | 0.42 | -0.09 | 0.12 | 95 | +------------+------+------+-------+------+------+ ``` STATS_CHANGED --- av2/av2.cmake | 2 + av2/encoder/partition_mlp.c | 138 +++ av2/encoder/partition_mlp.h | 58 ++ av2/encoder/partition_mlp_inter_weights.h | 989 ++++++++++++++++++++++ av2/encoder/partition_mlp_kf_weights.h | 989 ++++++++++++++++++++++ av2/encoder/partition_search.c | 54 ++ av2/encoder/speed_features.c | 6 + av2/encoder/speed_features.h | 8 + test/partition_mlp_test.cc | 107 +++ test/test.cmake | 1 + 10 files changed, 2352 insertions(+) create mode 100644 av2/encoder/partition_mlp.c create mode 100644 av2/encoder/partition_mlp.h create mode 100644 av2/encoder/partition_mlp_inter_weights.h create mode 100644 av2/encoder/partition_mlp_kf_weights.h create mode 100644 test/partition_mlp_test.cc diff --git a/av2/av2.cmake b/av2/av2.cmake index 5ed3a4a650..ce384a59ba 100644 --- a/av2/av2.cmake +++ b/av2/av2.cmake @@ -252,6 +252,8 @@ list( "${AVM_ROOT}/av2/encoder/palette.h" "${AVM_ROOT}/av2/encoder/partition_search.h" "${AVM_ROOT}/av2/encoder/partition_search.c" + "${AVM_ROOT}/av2/encoder/partition_mlp.h" + "${AVM_ROOT}/av2/encoder/partition_mlp.c" "${AVM_ROOT}/av2/encoder/partition_strategy.h" "${AVM_ROOT}/av2/encoder/partition_strategy.c" "${AVM_ROOT}/av2/encoder/pass2_strategy.h" diff --git a/av2/encoder/partition_mlp.c b/av2/encoder/partition_mlp.c new file mode 100644 index 0000000000..413f927304 --- /dev/null +++ b/av2/encoder/partition_mlp.c @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include +#include + +#include "av2/encoder/partition_mlp.h" +#include "av2/encoder/partition_mlp_inter_weights.h" +#include "av2/encoder/partition_mlp_kf_weights.h" + +#define PART_MLP_PI 3.14159265f + +/* ------------------------------------------------------------------ */ +/* Feature dimensions */ +/* ------------------------------------------------------------------ */ +#define PART_MLP_IN_DIM 38 +#define PART_MLP_H1_DIM 64 +#define PART_MLP_H2_DIM 32 +#define PART_MLP_OUT_DIM 4 +#define PART_MLP_HOG_BINS 32 + +/* ------------------------------------------------------------------ */ +/* HOG computation (same as partition feature logging) */ +/* ------------------------------------------------------------------ */ +static void compute_hog(const uint16_t *src, int stride, int bw, int bh, + float *hog) { + float hog_total = 0.1f; + for (int i = 0; i < PART_MLP_HOG_BINS; i++) hog[i] = 0.0f; + + for (int r = 1; r < bh - 1; r++) { + for (int c = 1; c < bw - 1; c++) { + const int idx = r * stride + c; + const int dx = (int)src[idx + 1 - stride] + 2 * (int)src[idx + 1] + + (int)src[idx + 1 + stride] - (int)src[idx - 1 - stride] - + 2 * (int)src[idx - 1] - (int)src[idx - 1 + stride]; + const int dy = (int)src[idx + stride - 1] + 2 * (int)src[idx + stride] + + (int)src[idx + stride + 1] - (int)src[idx - stride - 1] - + 2 * (int)src[idx - stride] - (int)src[idx - stride + 1]; + if (dx == 0 && dy == 0) continue; + const int mag = abs(dx) + abs(dy); + hog_total += mag; + if (dx == 0) { + hog[0] += mag / 2.0f; + hog[31] += mag / 2.0f; + } else { + float angle = atan2f((float)dy, (float)dx); + if (angle < 0) angle += PART_MLP_PI; + int bin = (int)(angle * 32.0f / PART_MLP_PI); + if (bin >= 32) bin = 31; + if (bin < 0) bin = 0; + hog[bin] += mag; + } + } + } + for (int i = 0; i < PART_MLP_HOG_BINS; i++) hog[i] /= hog_total; +} + +/* ------------------------------------------------------------------ */ +/* FC layer: out = ReLU(W @ in + b) */ +/* W is stored row-major: W[out_dim][in_dim] */ +/* ------------------------------------------------------------------ */ +static void fc_relu(const float *w, const float *b, const float *in, float *out, + int in_dim, int out_dim) { + for (int i = 0; i < out_dim; i++) { + float acc = b[i]; + const float *row = w + i * in_dim; + for (int j = 0; j < in_dim; j++) acc += row[j] * in[j]; + out[i] = acc > 0.0f ? acc : 0.0f; + } +} + +static void fc(const float *w, const float *b, const float *in, float *out, + int in_dim, int out_dim) { + for (int i = 0; i < out_dim; i++) { + float acc = b[i]; + const float *row = w + i * in_dim; + for (int j = 0; j < in_dim; j++) acc += row[j] * in[j]; + out[i] = acc; + } +} + +/* ------------------------------------------------------------------ */ +/* Forward pass */ +/* ------------------------------------------------------------------ */ +static int forward(const float *w0, const float *b0, const float *w2, + const float *b2, const float *w4, const float *b4, + const float *input, float *logits_out) { + float h1[PART_MLP_H1_DIM]; + float h2[PART_MLP_H2_DIM]; + + fc_relu(w0, b0, input, h1, PART_MLP_IN_DIM, PART_MLP_H1_DIM); + fc_relu(w2, b2, h1, h2, PART_MLP_H1_DIM, PART_MLP_H2_DIM); + fc(w4, b4, h2, logits_out, PART_MLP_H2_DIM, PART_MLP_OUT_DIM); + + int best = 0; + for (int i = 1; i < PART_MLP_OUT_DIM; i++) + if (logits_out[i] > logits_out[best]) best = i; + return best; +} + +/* ------------------------------------------------------------------ */ +/* Public API */ +/* ------------------------------------------------------------------ */ +int av2_partition_mlp_predict(const uint16_t *src, int stride, int bw, int bh, + int bsize, int qindex, unsigned int source_var, + int64_t none_rd, int above_part, int left_part, + int is_intra, float *logits_out) { + float input[PART_MLP_IN_DIM]; + + /* HOG (32 bins) */ + compute_hog(src, stride, bw, bh, input); + + /* Scalar features — normalisation must match training */ + input[32] = logf(1.0f + (float)source_var) / 12.0f; + input[33] = (float)bsize / 18.0f; + input[34] = (float)qindex / 255.0f; + input[35] = + logf(1.0f + (float)(none_rd > 0 && none_rd < INT64_MAX ? none_rd : 0)) / + 30.0f; + input[36] = ((float)above_part + 1.0f) / 10.0f; + input[37] = ((float)left_part + 1.0f) / 10.0f; + + if (is_intra) { + return forward(kf_w0, kf_b0, kf_w1, kf_b1, kf_w2, kf_b2, input, logits_out); + } else { + return forward(inter_w0, inter_b0, inter_w1, inter_b1, inter_w2, inter_b2, + input, logits_out); + } +} diff --git a/av2/encoder/partition_mlp.h b/av2/encoder/partition_mlp.h new file mode 100644 index 0000000000..2c2d30d314 --- /dev/null +++ b/av2/encoder/partition_mlp.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#ifndef AV2_ENCODER_PARTITION_MLP_H_ +#define AV2_ENCODER_PARTITION_MLP_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Predicted partition class indices — map back to PARTITION_TYPE as follows: + * 0 -> PARTITION_NONE + * 1 -> PARTITION_HORZ + * 2 -> PARTITION_VERT + * 3 -> PARTITION_SPLIT + */ +#define PART_MLP_NONE 0 +#define PART_MLP_HORZ 1 +#define PART_MLP_VERT 2 +#define PART_MLP_SPLIT 3 + +/*!\brief Run the partition MLP for one block. + * + * \param src Source luma plane buffer (uint16_t). + * \param stride Source stride. + * \param bw Block width in pixels. + * \param bh Block height in pixels. + * \param bsize Block size enum. + * \param qindex Base quantization index. + * \param source_var Per-pixel source variance. + * \param none_rd RD cost of NONE partition (-1 if not computed). + * \param above_part Winning partition of above neighbour (-1 if unavailable). + * \param left_part Winning partition of left neighbour (-1 if unavailable). + * \param is_intra 1 if current frame is intra-only, 0 otherwise. + * \param logits_out Output array of 4 raw logits [NONE, HORZ, VERT, SPLIT]. + * \return Predicted class index (PART_MLP_*). + */ +int av2_partition_mlp_predict(const uint16_t *src, int stride, int bw, int bh, + int bsize, int qindex, unsigned int source_var, + int64_t none_rd, int above_part, int left_part, + int is_intra, float *logits_out); + +#ifdef __cplusplus +} +#endif + +#endif // AV2_ENCODER_PARTITION_MLP_H_ diff --git a/av2/encoder/partition_mlp_inter_weights.h b/av2/encoder/partition_mlp_inter_weights.h new file mode 100644 index 0000000000..6ad3de143c --- /dev/null +++ b/av2/encoder/partition_mlp_inter_weights.h @@ -0,0 +1,989 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +/* Auto-generated — do not edit. */ +#ifndef AV2_ENCODER_PARTITION_MLP_INTER_WEIGHTS_H_ +#define AV2_ENCODER_PARTITION_MLP_INTER_WEIGHTS_H_ + +/* net.0.weight shape=[64, 38] */ +static const float inter_w0[2432] = { + -0.05482842f, 0.48881564f, 0.41786405f, 0.28514260f, 0.22640187f, + 0.18304172f, 0.13046324f, -0.02492755f, -0.03274690f, -0.00120879f, + 0.02419740f, -0.04486749f, -0.10335577f, -0.13516724f, -0.17675574f, + -0.31077689f, -0.30466247f, -0.22682805f, -0.16396558f, -0.14896758f, + -0.06698847f, -0.01731753f, 0.03453380f, 0.05276635f, 0.01302241f, + 0.09403791f, 0.18372625f, 0.22571172f, 0.27349302f, 0.42417133f, + 0.48285857f, -0.06793291f, 0.04379862f, -0.13456649f, -0.00480572f, + 0.05887942f, -0.03826881f, 0.06978663f, 0.09126247f, 0.17149650f, + -0.00368223f, 0.16074824f, 0.07224720f, -0.09579363f, -0.00521184f, + -0.10782334f, -0.00278515f, -0.02989475f, -0.18976986f, -0.15108120f, + -0.14966869f, -0.04500050f, -0.18907516f, -0.17407623f, -0.16623294f, + -0.10400530f, -0.15901846f, -0.13038233f, -0.20525818f, -0.13587181f, + -0.14106339f, -0.19540836f, -0.02000783f, 0.02630450f, 0.12187761f, + -0.07189479f, -0.00032994f, 0.13440691f, 0.05620807f, 0.17152660f, + -0.20105179f, 0.40531370f, 0.38591513f, 0.28410646f, -0.02414555f, + -0.04167712f, -0.18386084f, -0.02800972f, -0.12780090f, -0.19273692f, + 0.06761452f, -0.18953143f, -0.08220008f, -0.02366228f, -0.05643308f, + 0.00678950f, -0.04000486f, 0.14922768f, 0.17662911f, 0.11635106f, + 0.00882995f, 0.07596116f, 0.12220684f, 0.00591345f, 0.02955575f, + -0.04991437f, 0.11537319f, -0.12347285f, 0.01110212f, 0.11163108f, + 0.13636045f, -0.03057615f, -0.09376384f, -0.04273909f, -0.05690049f, + -0.03548855f, -0.07578478f, -0.17954737f, 0.18203580f, 0.32265207f, + 0.13967678f, -0.18587081f, 0.07986522f, -0.01266863f, 0.11945479f, + 0.07552264f, 0.16164403f, 0.11122821f, 0.11518100f, 0.17954232f, + 0.11006124f, 0.14715673f, 0.06296799f, 0.13815384f, 0.13734151f, + 0.13094161f, 0.15344012f, 0.17121203f, 0.16299427f, 0.07416378f, + 0.12271342f, 0.15796426f, 0.12296543f, 0.15659007f, 0.16855212f, + 0.18385355f, 0.13456091f, 0.16888808f, 0.10658129f, 0.12478576f, + 0.15531704f, 0.12085105f, 0.13171649f, 0.15886392f, 0.06477184f, + 0.16645797f, 0.15882236f, -0.30056018f, 0.00574321f, -0.18516326f, + 0.01446451f, 0.04547554f, 0.00966058f, 0.09848739f, 0.03114836f, + 0.09209424f, 0.12449232f, 0.04626015f, -0.08116809f, -0.11440233f, + 0.13004437f, -0.04988603f, -0.13433571f, -0.11593240f, -0.11191793f, + 0.00479286f, 0.02807131f, 0.04836985f, -0.05359512f, -0.11998430f, + -0.13121891f, 0.05645197f, -0.05486016f, 0.00530137f, 0.01484358f, + 0.04867444f, -0.10163438f, 0.01897851f, 0.02686196f, 0.02144524f, + -0.10432622f, 0.10900617f, 0.14373843f, -0.09622755f, 0.14880094f, + 0.41648450f, 0.08943141f, -0.02095311f, -0.05046263f, 0.02153317f, + 0.11822275f, -0.03080628f, -0.08048519f, -0.09874105f, -0.03484288f, + 0.02653000f, 0.06397408f, -0.12206007f, 0.13833630f, -0.03784131f, + -0.01505223f, 0.00765252f, 0.07220699f, -0.06839246f, 0.01794739f, + 0.18283613f, -0.00338975f, 0.16029273f, 0.15391557f, 0.04218429f, + -0.14481094f, 0.06955783f, -0.02894846f, -0.03641672f, 0.23459707f, + -0.04117774f, 0.02740124f, -0.07876994f, 0.02977500f, -0.17425793f, + -0.17917807f, 0.12349953f, -0.24269406f, -0.07656655f, 0.19415627f, + 0.24209291f, -0.06742193f, -0.10588609f, -0.00676961f, -0.20839278f, + -0.12917070f, -0.04267133f, -0.07380402f, -0.06303396f, -0.13342626f, + -0.16838716f, 0.08277801f, -0.10660651f, -0.03020193f, -0.03292479f, + 0.04204319f, 0.08887032f, 0.09815139f, 0.16129024f, 0.09133873f, + 0.09039117f, 0.11045469f, 0.00982528f, -0.04142129f, -0.02878895f, + 0.03352468f, -0.14511375f, 0.16004802f, -0.04088822f, -0.05057201f, + -0.03803770f, -0.04729874f, -0.07109655f, -0.08963262f, -0.02882954f, + -0.27946025f, 0.39541680f, 0.34329036f, 0.22591342f, -0.11434373f, + -0.04530919f, 0.04921136f, 0.23493408f, 0.22930424f, 0.24967958f, + 0.11225846f, 0.07634238f, -0.01826936f, 0.07368824f, 0.09426674f, + -0.08978418f, 0.04185632f, -0.07970025f, 0.00913004f, -0.16570483f, + -0.03007725f, -0.08324549f, -0.19751821f, -0.13819687f, 0.01332700f, + -0.04799931f, -0.09905080f, -0.12855460f, -0.07533504f, -0.00744753f, + 0.00221006f, -0.00636566f, 0.13895994f, 0.16451146f, 0.17479718f, + 0.28765100f, 0.43359658f, -0.10598958f, 0.08940219f, 0.31619650f, + 0.13767211f, 0.15882018f, 0.11005566f, 0.15180109f, 0.13306877f, + 0.07582083f, 0.16227041f, 0.07920230f, 0.08734724f, 0.11434130f, + 0.09104355f, 0.11649834f, 0.05192830f, 0.11027894f, 0.16440710f, + 0.10725643f, 0.09437376f, 0.10949273f, 0.13551438f, 0.08097833f, + 0.08337075f, 0.06349491f, 0.05875717f, 0.10289534f, 0.10674556f, + 0.13515411f, 0.09526659f, 0.14880027f, 0.06466141f, 0.08009496f, + 0.11744862f, 0.07421793f, 0.12420662f, 0.15111962f, 0.03946583f, + 0.09677204f, 0.08842161f, -0.27856705f, -0.01335275f, -0.06432443f, + 0.01092053f, 0.01435968f, 0.12095295f, 0.23840480f, 0.34112608f, + 0.21194854f, 0.29168391f, 0.27496067f, 0.28214362f, 0.31028146f, + 0.10096090f, 0.07393093f, 0.12316565f, 0.25086978f, -0.00059592f, + 0.20788711f, 0.10656890f, 0.00973646f, 0.00572946f, 0.01891222f, + -0.02645296f, 0.11155695f, 0.08448518f, 0.19237591f, 0.06310045f, + 0.32324183f, 0.15519916f, 0.20050226f, 0.14420395f, 0.12464917f, + 0.33168378f, 0.37435129f, 0.17102435f, 0.14061332f, 0.20460196f, + -0.25658190f, 0.03450260f, -0.25797343f, 0.20619708f, 0.00611509f, + 0.05099940f, 0.03531165f, 0.18176341f, 0.23538157f, 0.09243623f, + 0.19051866f, 0.15281808f, -0.00531033f, 0.10557362f, -0.01716259f, + 0.14171009f, 0.17613503f, 0.07096410f, 0.00194197f, -0.03215677f, + -0.04460754f, 0.05169277f, 0.11973979f, 0.09865237f, 0.09505948f, + 0.02536011f, 0.11069360f, 0.16833352f, 0.02133583f, 0.10945693f, + 0.24607150f, 0.21100600f, -0.04341887f, 0.03517184f, 0.14860336f, + 0.18161783f, 0.14150698f, -0.13312770f, -0.35470131f, 0.27611917f, + 0.17999063f, 0.06244171f, 0.09631103f, 0.16830957f, -0.19339471f, + -0.02579734f, -0.06629960f, -0.05568230f, 0.05809707f, 0.05528319f, + 0.10795344f, 0.03332967f, 0.11363193f, 0.13752693f, 0.11504787f, + 0.10716256f, 0.13605501f, 0.18517661f, 0.20259288f, 0.16904491f, + 0.13716985f, 0.11664142f, 0.16117512f, 0.11384580f, 0.14158505f, + 0.09428452f, 0.15908960f, 0.05815833f, 0.05206871f, 0.06043399f, + 0.04376322f, 0.01070786f, -0.03216084f, -0.19833982f, 0.20610934f, + 0.11653700f, -0.24583568f, -0.02343907f, -0.07921865f, 0.05696101f, + 0.00196573f, -0.26789975f, 0.36586815f, 0.20894508f, 0.15478669f, + 0.18327823f, 0.05792914f, 0.03062067f, 0.12381926f, -0.07779242f, + 0.06143355f, -0.01672522f, 0.07447311f, -0.10221211f, 0.01194636f, + -0.15107916f, -0.10813999f, -0.06685776f, -0.14876246f, -0.05469398f, + -0.00354115f, -0.02967967f, -0.07398953f, -0.06630189f, 0.01824016f, + -0.01402311f, 0.08668876f, 0.00727970f, 0.11251768f, 0.17526582f, + 0.09357281f, 0.32600984f, -0.34239390f, 0.03434391f, 0.35018504f, + 0.01936789f, -0.10334424f, 0.05673501f, 0.16257955f, 0.06573431f, + 0.01631126f, -0.01931682f, 0.00125780f, 0.01707609f, 0.08666014f, + -0.05747061f, 0.02610856f, 0.17560540f, -0.05434122f, 0.05628036f, + 0.11381067f, -0.02376812f, 0.04271762f, 0.01866499f, -0.01633823f, + 0.09325027f, 0.06987230f, 0.10487404f, 0.04598373f, -0.00965944f, + 0.07305481f, -0.05048533f, -0.13276814f, 0.23129639f, 0.01803385f, + 0.10525066f, 0.00777239f, 0.09530377f, 0.08650111f, 0.05793197f, + -0.08484690f, -0.05844623f, 0.35764077f, 0.18413325f, 0.14507131f, + 0.09131238f, 0.22007576f, 0.21757649f, 0.15541285f, 0.17737855f, + 0.15650858f, 0.27724540f, 0.24214152f, 0.21438235f, 0.13705604f, + 0.18221137f, 0.22685587f, 0.18992768f, 0.18598540f, 0.19380964f, + 0.22854820f, 0.18301529f, 0.14155129f, 0.10924252f, 0.10928789f, + 0.13685586f, 0.22505839f, 0.16796663f, 0.15142633f, 0.17468558f, + 0.25882065f, 0.15546033f, 0.15413082f, 0.11737137f, 0.18637754f, + 0.29632416f, 0.18820761f, 0.23097374f, 0.26827657f, 0.16431037f, + -0.25793636f, -0.05633465f, -0.21108146f, 0.11542752f, 0.09708304f, + 0.04832644f, 0.05813560f, -0.05220481f, 0.05416400f, 0.07049332f, + -0.03581045f, 0.06446884f, -0.00220671f, 0.02758499f, 0.02958974f, + 0.08849400f, -0.01784214f, 0.19095914f, 0.11125235f, 0.06122711f, + 0.03591084f, 0.10329653f, 0.16782315f, 0.12347981f, 0.01663496f, + 0.04767371f, 0.09583037f, 0.05159023f, -0.02365731f, 0.04613366f, + 0.10060751f, 0.08298171f, -0.00354210f, -0.03014862f, -0.02354396f, + -0.00517216f, 0.01126018f, -0.05310887f, 0.40886396f, 0.20478812f, + 0.17639805f, 0.05106494f, 0.14606391f, 0.08447684f, 0.09096956f, + 0.14414440f, 0.12530671f, 0.09952544f, 0.10873360f, 0.11590721f, + 0.10535504f, 0.08892605f, 0.11071919f, 0.10210096f, 0.13409744f, + 0.07520054f, 0.10042040f, 0.11970531f, 0.11376026f, 0.09921095f, + 0.11824124f, 0.09624698f, 0.11346757f, 0.10087228f, 0.09754187f, + 0.10389213f, 0.13267024f, 0.09927312f, 0.09048110f, 0.12921439f, + 0.07445994f, 0.12597148f, 0.15559678f, 0.09133633f, 0.09048673f, + 0.00098413f, -0.28088850f, -0.00324758f, 0.00096207f, 0.05974589f, + 0.01687820f, -0.08837277f, -0.04560711f, -0.16014756f, 0.01021641f, + -0.02270843f, -0.08729332f, -0.10681924f, -0.02225529f, -0.01246542f, + -0.07995537f, 0.00295853f, 0.02916408f, -0.00754494f, -0.03790686f, + 0.07077593f, -0.06008133f, 0.15497676f, -0.08274415f, 0.06685233f, + 0.11378315f, -0.01999062f, -0.11386602f, -0.03299972f, -0.07984441f, + 0.00419221f, -0.11596888f, -0.01728306f, -0.04854026f, -0.02738362f, + -0.03427646f, 0.00498636f, -0.12289543f, 0.09708086f, 0.25224310f, + 0.01911649f, 0.19536506f, 0.16601977f, 0.01590071f, -0.00000001f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000001f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000003f, 0.00000000f, 0.00000000f, -0.00000000f, + 0.00000001f, 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00010922f, -0.00321691f, -0.00066349f, -0.00002005f, + -0.00000013f, 0.00000000f, 0.15148041f, -0.28510192f, -0.09677386f, + 0.09333610f, -0.15344112f, 0.00539742f, 0.05194751f, 0.04571859f, + 0.16735683f, 0.07835314f, 0.12562150f, 0.17493439f, 0.14461617f, + 0.19351140f, 0.05146404f, 0.21013364f, 0.14934236f, 0.32223266f, + 0.24074493f, 0.09858613f, 0.04541257f, 0.20804238f, -0.00140592f, + -0.08893768f, 0.27610067f, -0.02377832f, 0.09263716f, -0.02956368f, + -0.04138769f, -0.15307255f, -0.21721651f, 0.10155143f, -0.11537414f, + -0.22271563f, 0.30245242f, 0.13506357f, 0.11899291f, -0.16383524f, + 0.25249016f, -0.24643417f, -0.06385360f, 0.09183867f, -0.08313167f, + 0.10699813f, 0.01888241f, 0.08875123f, 0.20310096f, 0.10130217f, + 0.31213403f, 0.15272266f, 0.27822343f, 0.23308264f, 0.20118582f, + 0.16978376f, 0.19089366f, 0.28883177f, 0.21500887f, 0.13427140f, + 0.07563079f, 0.15645413f, 0.29176414f, 0.18573450f, 0.24787663f, + 0.11377265f, 0.18025500f, 0.06615547f, -0.06346942f, 0.02697282f, + -0.13811699f, 0.17809798f, 0.16352837f, -0.38014320f, 0.24173595f, + 0.20378116f, 0.16347139f, 0.14541648f, 0.17327651f, -0.09565868f, + -0.08007156f, 0.10892037f, 0.05197503f, 0.24234237f, 0.23121516f, + 0.34794557f, 0.25460437f, 0.28320777f, 0.32606414f, 0.24857618f, + 0.16556375f, 0.28557673f, 0.36950344f, 0.19888508f, 0.37667778f, + 0.32853964f, 0.29369202f, 0.23946857f, 0.21816522f, 0.22662763f, + 0.14392716f, 0.29257068f, 0.05843413f, 0.18972154f, 0.20963687f, + 0.18628047f, 0.17561416f, -0.05971063f, 0.07623627f, 0.24886979f, + 0.37463945f, -0.19717611f, 0.15242374f, -0.15618433f, 0.16979508f, + 0.20251285f, -0.06746224f, -0.02726927f, -0.07821932f, -0.05233276f, + -0.06890566f, -0.17144622f, -0.15712173f, 0.02261036f, 0.00405389f, + -0.07284179f, 0.01801361f, -0.02660931f, -0.00861113f, 0.03636048f, + 0.07458548f, 0.06761626f, -0.02325558f, 0.03537437f, 0.07232487f, + -0.01436734f, 0.00153586f, -0.01327263f, -0.07989466f, -0.17421491f, + 0.10440534f, -0.16671909f, -0.19044448f, -0.12252164f, -0.13121502f, + -0.28807184f, -0.22870982f, -0.07006811f, -0.19183140f, 0.45792899f, + 0.11469130f, -0.08122110f, 0.11616167f, -0.04027604f, 0.16153295f, + -0.20738360f, 0.03451469f, -0.02835695f, -0.03886069f, 0.17103259f, + 0.10045967f, -0.07808233f, 0.20751520f, 0.00014752f, 0.13495658f, + 0.16978924f, -0.03039152f, 0.17362724f, 0.10612407f, 0.22351833f, + 0.17351887f, 0.08821143f, 0.03155335f, 0.07021255f, 0.09938593f, + 0.25213817f, 0.15891086f, 0.04302455f, 0.23437943f, 0.09045378f, + 0.06507695f, -0.10019964f, 0.01847288f, -0.02019133f, -0.07472546f, + 0.23778155f, 0.02884965f, -0.23095334f, 0.16517255f, 0.28115645f, + 0.05008850f, 0.11291350f, -0.06642433f, 0.08114047f, 0.02359157f, + -0.04534661f, 0.00931872f, -0.08108477f, -0.08428328f, -0.01255866f, + 0.05713472f, -0.03791141f, -0.10520092f, -0.05690064f, -0.07308968f, + -0.08724775f, -0.15223344f, 0.02127914f, -0.11355260f, -0.16940548f, + -0.05466584f, -0.03586110f, -0.08421537f, -0.06700633f, 0.00191636f, + 0.00059835f, -0.02573261f, -0.11374594f, -0.09822026f, -0.01749076f, + -0.02534379f, 0.01907445f, 0.19441390f, -0.14870629f, 0.07972328f, + 0.30358294f, -0.10710609f, 0.14840150f, -0.05849783f, 0.05926919f, + 0.14878486f, 0.09902151f, 0.17457296f, 0.11316682f, 0.12530416f, + 0.08732390f, 0.20230573f, 0.28929687f, 0.20371601f, 0.24305993f, + 0.08721287f, 0.15069959f, 0.10118088f, 0.10809563f, 0.25801069f, + 0.12050988f, 0.13668671f, 0.10347058f, 0.22007442f, 0.18984810f, + 0.09663641f, 0.18868291f, 0.16146997f, 0.15856665f, 0.01000449f, + 0.16424158f, 0.10610750f, 0.16343483f, 0.18486987f, 0.09937512f, + 0.11731748f, 0.17906138f, 0.12141763f, -0.32892704f, 0.01575610f, + -0.28928602f, 0.21073665f, 0.03995175f, -0.00591785f, 0.28290865f, + 0.09978414f, 0.26248983f, 0.30412215f, 0.14233783f, 0.28185764f, + 0.33246940f, 0.18421787f, 0.20033395f, 0.13065794f, 0.25904930f, + 0.09865199f, -0.00922130f, 0.16640358f, 0.09268636f, 0.10138205f, + 0.08793134f, 0.01750643f, 0.18910237f, 0.11885031f, 0.11030449f, + 0.12468380f, 0.26008001f, 0.12133595f, 0.19438244f, 0.17575724f, + 0.35514176f, 0.09990344f, 0.23030403f, 0.41932869f, 0.01103643f, + 0.40527099f, 0.03161497f, -0.11208186f, -0.15915719f, 0.11234245f, + 0.33974758f, -0.02456492f, 0.01524122f, -0.01490442f, 0.03253971f, + -0.00458688f, -0.16275848f, -0.11986592f, -0.21364260f, -0.04361723f, + -0.14294189f, 0.04121209f, -0.08345534f, -0.08676793f, -0.12194562f, + -0.14321041f, -0.10728706f, -0.02544780f, -0.04854975f, -0.06341171f, + -0.04874091f, -0.00704895f, 0.01913451f, -0.19419260f, -0.05833823f, + 0.06320194f, -0.13404649f, 0.05544457f, -0.01468899f, -0.16266039f, + -0.05654586f, 0.04948783f, -0.24004790f, -0.06844334f, 0.45196220f, + 0.05670739f, 0.17710745f, 0.04676689f, -0.13337614f, 0.14607446f, + 0.00740467f, 0.11505614f, 0.14789884f, 0.09036910f, 0.13528755f, + 0.02065084f, -0.08514505f, 0.02166823f, -0.03056596f, 0.12503926f, + 0.07229152f, 0.03654050f, 0.07365958f, 0.15591732f, 0.06902469f, + 0.11216946f, 0.05330639f, 0.13373652f, -0.00585498f, -0.02184439f, + 0.08250281f, 0.08053734f, 0.02100515f, 0.15101725f, 0.09135393f, + 0.13004281f, -0.00967295f, 0.17323799f, 0.08246686f, -0.05338398f, + 0.21004367f, -0.17408723f, -0.18715140f, 0.32942232f, 0.13547662f, + -0.04913297f, -0.02208896f, -0.11653701f, 0.09926941f, 0.06178204f, + 0.06881204f, -0.01584044f, -0.06575777f, 0.04938962f, 0.11924428f, + 0.07182425f, 0.15324640f, -0.10118447f, 0.09681912f, 0.06647813f, + 0.06249025f, 0.06873053f, 0.03573052f, -0.09996838f, 0.04335014f, + 0.10431195f, -0.04202550f, -0.01041458f, -0.07072601f, -0.00291643f, + 0.19622801f, -0.05886140f, -0.02470211f, 0.01864076f, 0.10936087f, + -0.10512274f, 0.09074024f, 0.17695343f, -0.27854246f, 0.26177707f, + 0.33276045f, -0.16627102f, -0.23852900f, 0.21929763f, 0.22803782f, + 0.01123918f, 0.30760756f, 0.25899658f, 0.13378420f, 0.15360618f, + 0.05921144f, 0.05193152f, -0.18911281f, -0.06405079f, 0.04023126f, + -0.01013766f, 0.01685840f, -0.19501851f, -0.19560842f, -0.20506066f, + -0.20327476f, -0.10864746f, -0.08725286f, -0.13824527f, -0.14674479f, + -0.25472438f, 0.02211630f, 0.05872352f, -0.08130371f, 0.00894011f, + 0.13904612f, 0.19610421f, 0.00686992f, 0.14346737f, 0.22047931f, + 0.40523237f, 0.07608834f, -0.04923257f, -0.15522270f, 0.11924036f, + 0.27866662f, -0.17652026f, 0.06818455f, -0.00000000f, 0.00000000f, + -0.00000001f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000001f, -0.00000000f, + -0.00000000f, 0.12168580f, -0.23128797f, -0.21035779f, 0.01562219f, + -0.09662073f, 0.01815143f, -0.06261993f, -0.10885518f, 0.12755074f, + -0.00765190f, -0.00002315f, 0.12945141f, 0.10715920f, 0.21309897f, + 0.10147880f, 0.26616362f, 0.18790914f, 0.26394376f, 0.14171582f, + -0.01866537f, -0.03862330f, 0.03540772f, -0.02248170f, -0.09509447f, + 0.08512983f, -0.03994076f, 0.02372130f, -0.08888114f, -0.02722709f, + -0.13252208f, -0.12612790f, 0.00974015f, -0.11738434f, 0.29908329f, + 0.31345558f, 0.19011927f, -0.07655039f, 0.00958210f, -0.18695229f, + 0.05526466f, -0.01368271f, 0.12624235f, 0.00662924f, -0.04270875f, + 0.00572052f, 0.05797035f, 0.14497125f, -0.03454912f, -0.13129188f, + 0.05366766f, 0.07662046f, -0.04228996f, 0.07396609f, 0.06923549f, + 0.00263459f, 0.02482769f, -0.10135791f, 0.08466805f, 0.12006337f, + 0.07394546f, 0.00305447f, 0.07984757f, 0.01532974f, 0.01051647f, + 0.08322634f, 0.05927661f, 0.14120051f, -0.08541691f, 0.02459368f, + -0.04538818f, 0.26749465f, 0.36694649f, -0.13487165f, -0.18143627f, + 0.11156311f, 0.07600193f, 0.02906868f, -0.18828841f, 0.03580750f, + 0.08849386f, 0.15548185f, 0.14892490f, 0.14239013f, 0.11439412f, + 0.22111209f, 0.03377367f, 0.27232292f, 0.03819161f, 0.10631736f, + 0.21472526f, 0.25086108f, 0.06466119f, 0.21017972f, 0.06174389f, + 0.07035381f, 0.02604216f, 0.08783594f, 0.29070547f, 0.01047350f, + -0.06426179f, 0.23076855f, 0.14676130f, 0.10842154f, 0.02787721f, + 0.16805011f, 0.12381753f, -0.00123211f, 0.19281228f, -0.10670089f, + -0.33377928f, -0.04789203f, 0.16995734f, 0.02230969f, -0.12809367f, + -0.03094070f, 0.06882412f, -0.01772605f, -0.01333166f, 0.00172192f, + -0.07420406f, -0.07567799f, -0.04840212f, -0.02516766f, -0.06320810f, + -0.09288526f, -0.04051683f, -0.00462425f, -0.01652491f, -0.09729557f, + -0.02679479f, -0.02328678f, -0.06570413f, -0.03676035f, -0.04668630f, + -0.03494649f, -0.07959761f, -0.06028292f, -0.06583568f, -0.06497023f, + -0.05535498f, -0.10041015f, 0.01016244f, -0.03524288f, -0.03000397f, + 0.09195224f, -0.07481194f, -0.02193949f, 0.24576375f, 0.00380682f, + 0.07567254f, 0.04928338f, 0.05988218f, 0.30120996f, 0.12985633f, + 0.34203944f, 0.15902674f, 0.21956199f, 0.11685409f, 0.18245851f, + -0.00558957f, 0.00493304f, 0.16037372f, 0.06754259f, 0.02277913f, + 0.00478812f, -0.04240227f, 0.00976890f, -0.12874913f, 0.03661830f, + 0.05351909f, -0.02804618f, 0.02828510f, 0.03027768f, 0.01432617f, + 0.17546114f, 0.01370903f, 0.06828227f, 0.24205428f, 0.32873818f, + 0.23606880f, 0.25180903f, 0.38915059f, 0.28760457f, 0.18511698f, + -0.08367579f, -0.36154941f, 0.19622190f, 0.14647123f, 0.10238170f, + 0.09781631f, 0.20332994f, -0.20854120f, -0.06094152f, -0.00199810f, + -0.11728554f, 0.10637737f, 0.03624855f, -0.02989388f, 0.13188493f, + 0.05346759f, 0.16450149f, 0.15782969f, 0.10210191f, 0.14971101f, + 0.16425055f, 0.26575127f, 0.20081191f, 0.15594983f, 0.17398852f, + 0.16018485f, 0.08723141f, 0.23373419f, 0.06191546f, 0.02139913f, + 0.16621254f, 0.08607126f, 0.10478812f, -0.01536052f, -0.02609335f, + -0.16082418f, -0.29734609f, 0.30959633f, -0.17392659f, -0.21158512f, + 0.12410808f, 0.08327121f, 0.07278636f, -0.10394937f, -0.06889140f, + 0.16441445f, 0.14074156f, 0.12140368f, 0.12333404f, 0.09907807f, + 0.08517322f, 0.20821299f, 0.10448611f, 0.15756643f, -0.02013611f, + 0.11170711f, 0.26457927f, 0.23241617f, 0.14690611f, 0.07310333f, + 0.13275926f, 0.12483086f, 0.18970799f, 0.17272753f, 0.21934569f, + 0.09555144f, 0.04355476f, 0.11191130f, 0.05499689f, 0.00272093f, + 0.10274762f, 0.08371712f, 0.05239111f, 0.08301087f, 0.09775378f, + -0.09287322f, 0.11046726f, 0.16504838f, 0.02207797f, -0.21070145f, + 0.14303729f, 0.03122896f, -0.00000002f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, 0.00000011f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000591f, -0.00000045f, + 0.00000000f, 0.00000536f, -0.00000000f, 0.00000001f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000001f, 0.00238263f, + 0.01217021f, -0.00916603f, 0.03408566f, 0.00000008f, -0.00001143f, + 0.09903307f, -0.19035865f, -0.03022953f, 0.00753319f, -0.02847120f, + 0.05660708f, 0.06582453f, 0.08104043f, 0.09420554f, 0.08130199f, + 0.14803982f, 0.09091785f, 0.11641072f, 0.15768231f, 0.17645022f, + 0.17597926f, 0.19846798f, 0.18734053f, 0.15915205f, 0.17368719f, + 0.10960846f, 0.16718593f, 0.11922340f, 0.05735432f, 0.11553722f, + 0.09186757f, 0.08861170f, -0.02152028f, 0.01880992f, -0.01858200f, + -0.22778019f, 0.09528642f, -0.01169048f, -0.21603684f, 0.04594076f, + -0.00150791f, 0.02827589f, -0.00985491f, -0.00051238f, -0.00000675f, + -0.00000006f, -0.00000000f, -0.00000608f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00002866f, -0.00000017f, -0.00000002f, -0.00000068f, + -0.00000793f, -0.00000862f, -0.00000299f, -0.00000927f, -0.00000317f, + -0.00002350f, -0.00002183f, -0.00000038f, -0.00000001f, -0.00000013f, + -0.00000338f, -0.00000060f, -0.00001115f, 0.00000000f, 0.00000000f, + -0.00000009f, -0.00000036f, -0.00000084f, -0.00000158f, -0.00004241f, + -0.01024306f, -0.00977359f, -0.01162535f, -0.00647690f, -0.00116242f, + -0.00096933f, -0.02633435f, -0.01303950f, 0.10703518f, -0.10368633f, + 0.10006846f, -0.04453723f, 0.00094271f, 0.25388131f, -0.02337177f, + 0.07162926f, -0.05390115f, 0.20793362f, 0.08401295f, 0.20543948f, + 0.02873128f, 0.15023963f, 0.15598001f, 0.00831395f, 0.13431379f, + 0.08056889f, 0.07137691f, 0.17379853f, 0.17868966f, 0.25927046f, + 0.12645201f, -0.01897354f, -0.01372734f, 0.13762271f, -0.01840101f, + -0.08588739f, 0.14422816f, 0.01883866f, 0.33966631f, 0.15945436f, + -0.07107732f, -0.24966413f, 0.29701188f, 0.27639732f, 0.32547945f, + -0.37419602f, -0.16798690f, -0.01712082f, -0.08128763f, -0.02644521f, + 0.01860514f, -0.12427191f, 0.01712878f, 0.05201124f, 0.08641166f, + 0.04706522f, 0.14702798f, 0.06415132f, 0.18428165f, 0.13839693f, + 0.12801027f, 0.24786004f, 0.03695099f, 0.06237014f, 0.00769207f, + 0.23644724f, 0.00102006f, -0.15724069f, 0.17662959f, 0.00403406f, + 0.12310921f, -0.24874654f, -0.22106713f, -0.13442770f, -0.23522626f, + 0.19799872f, -0.27381384f, -0.07889020f, 0.20972309f, 0.25837293f, + 0.10403557f, -0.13616708f, -0.07005587f, 0.41420808f, 0.27089843f, + 0.31119999f, 0.28727022f, 0.01014739f, 0.03157201f, 0.02467094f, + -0.07197053f, -0.08738892f, 0.00008145f, 0.07314620f, -0.04376956f, + -0.16766973f, -0.21632214f, -0.22759630f, -0.20592107f, -0.15508012f, + -0.17484429f, -0.06488173f, 0.08426884f, -0.13459183f, -0.03395753f, + 0.00035030f, -0.10162129f, 0.08898810f, 0.05029500f, 0.31658700f, + 0.12992717f, 0.43502739f, 0.58576876f, -0.18903582f, 0.32396531f, + 0.25523180f, -0.12107609f, -0.09381098f, 0.20431750f, 0.21864828f, + 0.13134822f, 0.03471606f, -0.02405348f, 0.02455596f, -0.15540780f, + -0.11187255f, -0.01484882f, -0.12385941f, -0.01803569f, -0.15897165f, + -0.01148345f, -0.05303499f, -0.10981643f, -0.12993537f, -0.13146833f, + -0.05403459f, -0.08039786f, -0.04346029f, -0.13561304f, -0.13664390f, + -0.14502598f, -0.10735217f, -0.05210837f, -0.19176190f, 0.14959340f, + 0.03264342f, -0.11401825f, -0.03921011f, -0.18440871f, -0.06258751f, + 0.09204262f, -0.09065604f, -0.22552735f, 0.35434207f, 0.25241080f, + 0.21446775f, -0.10894228f, -0.03978400f, -0.23697245f, 0.09636689f, + -0.08361498f, 0.01670188f, -0.03086954f, -0.08109319f, -0.02435693f, + 0.07755530f, 0.00369332f, 0.02215143f, 0.02122569f, 0.09632431f, + -0.08242086f, 0.12780231f, -0.12157198f, 0.05451851f, -0.11537816f, + -0.07259019f, 0.10488337f, 0.08763184f, -0.00778504f, 0.03248318f, + -0.03736171f, 0.10546678f, -0.01022083f, -0.02879192f, -0.10524838f, + 0.06235017f, -0.04956318f, 0.10168124f, 0.25195712f, -0.25882199f, + 0.03166861f, 0.34672084f, 0.01542930f, -0.32395190f, 0.03526355f, + 0.06671897f, -0.00001525f, 0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000009f, -0.00000000f, -0.00000014f, -0.00000143f, + -0.00000002f, -0.00000005f, -0.00000030f, -0.00000000f, -0.00000001f, + -0.00000017f, -0.00000048f, -0.00000005f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000043f, 0.00000000f, -0.00000021f, + -0.00000056f, -0.00000000f, -0.00000001f, -0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, -0.00000246f, -0.00571118f, -0.00819170f, + -0.00944047f, -0.00268706f, -0.00020859f, -0.00019849f, -0.05129195f, + 0.05049564f, -0.06643780f, -0.05112252f, -0.00022862f, -0.11748445f, + -0.17918164f, -0.08426046f, 0.02927434f, 0.00061702f, 0.04910869f, + -0.02516112f, -0.04344134f, -0.12782104f, 0.03250687f, 0.09097581f, + -0.05700576f, -0.02678677f, 0.00735763f, -0.14703757f, -0.08480815f, + 0.04733705f, -0.15490559f, -0.05055451f, 0.08649019f, -0.13090479f, + 0.02494527f, -0.08107016f, -0.03032719f, -0.09830960f, -0.11578631f, + 0.00118340f, -0.12496199f, 0.43849459f, 0.00426532f, 0.16871482f, + 0.02278350f, -0.12431490f, -0.21520358f, -0.01175919f, -0.05591221f, + -0.01999547f, -0.18834867f, -0.06536173f, -0.18485378f, -0.06393436f, + -0.00998599f, -0.04508729f, -0.01941107f, -0.08733132f, 0.01831348f, + 0.02590197f, -0.02379212f, 0.17306407f, 0.11115353f, 0.07754127f, + 0.10583497f, 0.02780600f, 0.01256271f, -0.06114000f, -0.06382833f, + -0.06044970f, 0.07927158f, 0.06563622f, -0.02517849f, -0.19148822f, + -0.08161461f, -0.17269553f, -0.05371584f, -0.24109590f, -0.16703196f, + 0.40943888f, 0.21085648f, 0.27133206f, 0.03868575f, 0.11472595f, + -0.20853308f, -0.06166483f, -0.13006291f, -0.09668305f, -0.08905565f, + -0.03354358f, -0.07717806f, 0.15558749f, -0.12871394f, -0.00300550f, + -0.17490865f, -0.02134862f, 0.00751820f, -0.07531325f, 0.00005170f, + 0.02564193f, 0.00776435f, -0.10464200f, -0.02727920f, 0.00397103f, + -0.07508878f, 0.04309788f, 0.04201049f, 0.06573655f, 0.05276477f, + -0.03056726f, -0.19618092f, 0.11061163f, -0.01337638f, -0.14700785f, + 0.09666774f, -0.15703453f, 0.18043630f, 0.34275910f, -0.11047231f, + -0.11237967f, 0.00807761f, 0.15003796f, 0.26300547f, 0.13725926f, + 0.22667091f, 0.24440172f, 0.05912848f, 0.18187417f, 0.18115996f, + 0.02699777f, 0.04943056f, 0.14265287f, 0.10680685f, -0.06614962f, + -0.15349184f, 0.10256760f, 0.07557403f, -0.11192710f, 0.02770357f, + -0.08708220f, -0.10124778f, -0.06095028f, -0.08966824f, 0.18266740f, + -0.00394484f, -0.08583978f, 0.16027829f, 0.11172356f, 0.28551510f, + 0.16763437f, 0.14867248f, 0.16911866f, 0.27815196f, 0.09795958f, + -0.16395724f, -0.36090821f, 0.18542926f, 0.08160520f, -0.02356548f, + 0.14326122f, 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000001f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.10673852f, + 0.18682376f, 0.03300719f, -0.06021078f, -0.01527381f, 0.07832859f, + -0.09059705f, 0.15343562f, -0.03281020f, 0.06775023f, -0.11038059f, + 0.07351340f, 0.02649735f, -0.03309488f, -0.13484083f, -0.10095658f, + 0.04702143f, -0.13580838f, -0.11728683f, 0.01476161f, -0.00271709f, + 0.00000579f, 0.08527123f, 0.11480625f, -0.14855811f, -0.06709148f, + -0.11202335f, 0.05400131f, 0.00803528f, -0.00920036f, 0.04720216f, + -0.28370532f, 0.06524796f, 0.42061853f, 0.02762927f, -0.30005071f, + -0.02734839f, 0.01780129f, -0.12494428f, 0.18009199f, 0.01755278f, + 0.00585308f, 0.01993434f, -0.01852242f, -0.02292800f, 0.09121730f, + -0.11493537f, 0.02196406f, -0.03274218f, 0.02893777f, -0.04924208f, + -0.10052989f, -0.14768490f, -0.05242852f, -0.18588874f, -0.13060540f, + -0.05829335f, -0.02534351f, -0.12628666f, -0.02994782f, -0.12445638f, + 0.08047384f, -0.20982870f, -0.04948349f, -0.03459521f, 0.14036299f, + 0.05575280f, 0.16543290f, 0.31052688f, -0.05875495f, 0.11767884f, + 0.38230175f, -0.12391800f, -0.09228320f, 0.04735765f, 0.14256039f, + 0.12860951f, 0.08987266f, 0.16739240f, 0.12250354f, 0.12983419f, + 0.16036396f, 0.16935194f, 0.13024373f, 0.10088983f, 0.15394892f, + 0.18700814f, 0.16780406f, 0.13580175f, 0.15749539f, 0.18054409f, + 0.09277005f, 0.11379217f, 0.17429134f, 0.16596828f, 0.15424210f, + 0.14433968f, 0.14992878f, 0.15461412f, 0.15373328f, 0.11283388f, + 0.13173397f, 0.17752831f, 0.13167667f, 0.13822398f, 0.16242127f, + 0.10804681f, 0.16370587f, 0.04638599f, -0.06856112f, 0.20109621f, + -0.95754158f, 0.12793928f, 0.13654386f, -0.19781291f, -0.14501165f, + -0.23389073f, -0.10935427f, -0.14534046f, -0.14764132f, -0.07710063f, + 0.01900304f, 0.12816867f, -0.00241223f, 0.06218265f, 0.18708964f, + 0.05492749f, 0.11639409f, 0.12107268f, 0.12177568f, 0.08877350f, + 0.09302191f, 0.02720490f, 0.18305901f, 0.07852016f, -0.03542018f, + -0.01451516f, -0.04495448f, 0.08833496f, -0.07517526f, -0.02381571f, + 0.01246032f, -0.05370641f, -0.28297910f, -0.08880650f, -0.14126694f, + 0.20996206f, 0.42848572f, 0.04461632f, 0.13911045f, 0.24305263f, + 0.12430464f, -0.05362391f, -0.17504990f, -0.23615837f, -0.20018512f, + 0.02647867f, -0.07070168f, -0.10450997f, 0.06315096f, -0.05786383f, + 0.09707588f, 0.00937579f, 0.01600772f, 0.13813861f, 0.10988098f, + 0.15839514f, 0.10527752f, 0.21932548f, 0.13222167f, 0.10600661f, + 0.13971135f, 0.13792260f, 0.02180737f, -0.12730773f, 0.03837885f, + 0.02091606f, 0.00838150f, -0.07081049f, -0.14128812f, -0.17776504f, + -0.14271109f, -0.11197764f, -0.09264592f, 0.08021031f, 0.44817239f, + -0.07635000f, -0.21235436f, 0.22673364f, -0.08356863f, 0.22855926f, + -0.10896651f, -0.03679253f, 0.01926024f, 0.00691578f, 0.01333105f, + 0.03418031f, -0.02962900f, 0.18086612f, 0.05777477f, 0.27559158f, + 0.14633691f, 0.15631330f, 0.23118791f, 0.15358172f, 0.20241097f, + 0.24472812f, 0.14192861f, 0.14797175f, 0.24747527f, 0.15758565f, + 0.17739713f, 0.11308103f, 0.02834121f, 0.04620857f, 0.16598971f, + 0.14119960f, 0.04481340f, 0.00040646f, 0.00735336f, -0.20461051f, + 0.30350673f, 0.05469428f, -0.30717430f, 0.00783577f, 0.21597601f, + -0.04909993f, 0.13130425f, -0.09275159f, -0.02656643f, -0.00168626f, + 0.12709340f, 0.23389852f, 0.01738197f, 0.11370310f, 0.20749298f, + 0.01982084f, 0.26316223f, 0.07056747f, 0.24337159f, 0.19542864f, + 0.22174494f, 0.30316299f, 0.25253069f, 0.28924549f, 0.19530445f, + 0.27351484f, 0.30702707f, 0.34306747f, 0.17474447f, 0.11663456f, + 0.18580806f, -0.07064921f, 0.15798545f, -0.05801126f, 0.05543114f, + 0.11061210f, 0.08547506f, 0.08460047f, -0.06870859f, 0.19950154f, + 0.12518132f, -0.13443685f, -0.26465130f, 0.31506923f, 0.30350655f, + 0.10031003f, 0.04233919f, 0.14901888f, 0.16697159f, 0.03095357f, + 0.13580382f, 0.09675661f, 0.00920135f, 0.20825973f, 0.07203001f, + 0.09233306f, 0.02712899f, -0.01949068f, 0.19537070f, -0.00312283f, + 0.09777580f, -0.03588558f, 0.25643224f, 0.06582641f, 0.14897880f, + 0.13457243f, 0.24243052f, 0.01518770f, 0.00179231f, 0.26642534f, + 0.19576713f, 0.20405281f, 0.11829410f, -0.00353346f, -0.00675613f, + 0.04342336f, 0.24518438f, -0.21558817f, -0.30284500f, 0.07062645f, + 0.25953582f, -0.06087855f, 0.11729530f, -0.08731963f, 0.20314921f, + 0.12626399f, 0.11629073f, 0.02860251f, -0.01297382f, -0.01945414f, + 0.03201262f, -0.05800187f, 0.02367862f, -0.08358353f, -0.01617831f, + -0.03632334f, -0.02742446f, -0.06244093f, -0.05982799f, -0.09510241f, + -0.08040810f, -0.09544140f, -0.01937192f, -0.05004028f, -0.11048383f, + 0.00654051f, 0.01211000f, -0.10352891f, -0.01125972f, -0.02316538f, + 0.10517299f, 0.03915285f, 0.09388269f, 0.31069335f, -0.19537409f, + -0.00416508f, 0.33762154f, -0.03303408f, -0.10961146f, 0.08399239f, + 0.15951568f, -0.17313361f, -0.03243482f, 0.04723888f, -0.14187850f, + 0.01702190f, -0.07131599f, -0.04587137f, 0.00703907f, -0.06417052f, + -0.07591844f, -0.07461163f, -0.01953474f, 0.02109998f, -0.02492792f, + -0.03499698f, -0.00949905f, -0.06383500f, -0.12241382f, -0.00907484f, + 0.07529720f, -0.08130889f, -0.08972074f, 0.00477833f, -0.10534134f, + 0.01097214f, -0.09161153f, -0.02415257f, -0.07195584f, -0.03270077f, + -0.04980877f, 0.00986041f, -0.20479687f, -0.03132169f, 0.34791777f, + 0.08496218f, -0.31170997f, -0.03930330f, 0.15204197f, -0.25024676f, + 0.10340197f, -0.18157040f, 0.01882548f, -0.06748636f, -0.05995306f, + -0.08618576f, -0.05304153f, 0.00740371f, -0.20245068f, -0.01426097f, + -0.17039752f, 0.07763254f, -0.05379226f, -0.01731674f, -0.08831576f, + -0.03467939f, -0.15503591f, -0.05111784f, -0.10921140f, 0.02698872f, + -0.00331207f, -0.11688910f, -0.16007802f, 0.03806056f, 0.01063673f, + -0.01410268f, -0.12724543f, -0.10199255f, -0.05047677f, 0.06163439f, + -0.08992010f, 0.10677239f, 0.34728578f, -0.04373577f, 0.01353810f, + 0.06129890f, 0.04908909f, +}; + +/* net.0.bias shape=[64] */ +static const float inter_b0[64] = { + 0.10696454f, -0.19485524f, -0.18875349f, 0.17617333f, -0.08208149f, + 0.08306304f, 0.12633006f, 0.03335212f, 0.14185722f, 0.32032439f, + 0.17534837f, 0.11001511f, 0.07136257f, 0.03188873f, 0.27411452f, + 0.14649935f, 0.12836330f, -0.18776993f, -0.00224360f, 0.05416895f, + 0.37767544f, 0.21963269f, -0.00117771f, 0.22271369f, -0.05414512f, + 0.23708276f, 0.09645373f, -0.13087445f, 0.06213810f, 0.02132131f, + 0.10942396f, -0.00000000f, 0.19161952f, -0.04997573f, 0.28545797f, + -0.08215708f, 0.24124502f, 0.15971558f, 0.03508849f, -0.05624916f, + 0.14386810f, -0.01259338f, 0.02412026f, 0.05793973f, 0.01120044f, + -0.10035720f, -0.15053380f, -0.00715035f, -0.10277424f, 0.06173391f, + -0.01519093f, 0.28453922f, -0.00000000f, -0.14427659f, -0.00123617f, + 0.19684140f, 0.06433632f, -0.01961093f, 0.17529523f, 0.20673662f, + 0.30528334f, -0.04213767f, -0.08650070f, -0.15123522f, +}; + +/* net.2.weight shape=[32, 64] */ +static const float inter_w1[2048] = { + -0.51471031f, -0.28107786f, 0.03033031f, 0.19574346f, -0.15039884f, + 0.21997283f, 0.07736995f, -0.21621364f, 0.11273341f, -0.05299252f, + -0.00854410f, 0.52513498f, -0.26278040f, -0.00928858f, 0.10346716f, + 0.03902372f, 0.26568228f, -0.07245041f, -0.00000000f, 0.35835046f, + 0.20018634f, 0.17692189f, 0.13107935f, 0.17225485f, -0.34265175f, + 0.22823842f, -0.09698347f, -0.21060982f, 0.06130907f, -0.09919237f, + -0.33672488f, -0.00000000f, 0.13150783f, -0.05093547f, 0.34350756f, + -0.30133539f, -0.17998831f, 0.46249193f, 0.03171778f, -0.00000000f, + 0.44996348f, -0.00504249f, 0.05834723f, 0.31568527f, -0.46771333f, + -0.18237220f, -0.28768146f, -0.00065937f, -0.07413326f, 0.03898711f, + -0.03923696f, -0.13235290f, -0.00000000f, -0.26907232f, -0.35832992f, + -0.04814691f, 0.09895393f, 0.33489609f, 0.35035160f, 0.16852893f, + 0.11760646f, -0.41441956f, -0.20190629f, -0.33833206f, -0.00000000f, + -0.03180999f, 0.00272114f, 0.00000000f, -0.04744544f, -0.00000000f, + 0.03574345f, -0.07409034f, -0.00000000f, -0.00254259f, 0.00210658f, + 0.00000000f, -0.04445822f, -0.05449592f, 0.00000000f, 0.07730745f, + 0.00000000f, -0.03077267f, 0.00000000f, -0.01260613f, -0.10225780f, + -0.00009630f, 0.05900533f, 0.08941129f, 0.01688794f, 0.00000000f, + 0.00000237f, -0.02015102f, 0.00000000f, -0.01779311f, 0.02329759f, + -0.00000000f, -0.02724187f, -0.00174979f, -0.02903162f, 0.00000000f, + 0.01074319f, 0.00000000f, 0.00000000f, 0.00031887f, 0.00000000f, + 0.00000000f, 0.00295978f, 0.01691362f, -0.04481624f, 0.01729442f, + 0.00001990f, -0.00000000f, -0.00056697f, 0.03109981f, 0.00682092f, + -0.07821845f, 0.00000000f, -0.01066975f, 0.08005419f, -0.00000000f, + 0.00453344f, -0.00327813f, -0.00030998f, 0.02407569f, -0.01553431f, + 0.00000000f, 0.01422280f, 0.00469736f, -0.26587370f, -0.07511124f, + 0.01134299f, 0.04800299f, -0.00694231f, 0.07887245f, 0.05809252f, + -0.06257648f, 0.02912032f, 0.01665534f, -0.07161583f, 0.23101017f, + -0.06758242f, 0.02287623f, 0.05892217f, 0.04271923f, 0.06913584f, + -0.03082887f, -0.00000000f, 0.09948881f, 0.05398853f, 0.07148694f, + 0.14831039f, 0.05256430f, -0.03892819f, 0.07854362f, -0.01577166f, + -0.01590042f, -0.02370618f, 0.02992408f, -0.21621734f, -0.00000000f, + 0.06881648f, 0.08323099f, 0.14812616f, -0.06009800f, -0.08472627f, + 0.21840733f, 0.04259360f, 0.00000000f, 0.16329274f, -0.00005314f, + 0.06972259f, 0.16904992f, -0.15502083f, -0.03698161f, -0.14010476f, + -0.00000000f, 0.11904281f, 0.02699454f, 0.07666283f, -0.07115297f, + -0.00000000f, -0.03217534f, -0.03585267f, -0.13927028f, 0.07160187f, + 0.21390675f, 0.10299554f, 0.08929415f, 0.02333382f, -0.09481803f, + -0.06442649f, 0.04549760f, 0.02563592f, 0.15943678f, -0.23508209f, + 0.27849889f, -0.02017941f, 0.24945024f, 0.18617412f, -0.01858045f, + 0.33076543f, 0.20840168f, 0.17879499f, 0.33847919f, -0.14082700f, + 0.10402467f, 0.21756116f, 0.06228839f, 0.44166160f, -0.10357686f, + -0.00000000f, 0.24836452f, 0.27617890f, 0.22870696f, -0.08994126f, + 0.28273621f, -0.29204071f, 0.24422503f, -0.15096204f, -0.04887102f, + 0.33338284f, -0.29927969f, 0.14239904f, 0.00000000f, 0.22860280f, + -0.19777791f, 0.19468883f, -0.18984035f, 0.22995289f, 0.34634408f, + -0.02738189f, 0.00000041f, 0.26198924f, -0.00740902f, -0.23697022f, + 0.25731787f, -0.12386815f, 0.14050405f, -0.26127741f, -0.00211419f, + -0.28520697f, 0.08930925f, -0.26300177f, 0.17719556f, 0.00000000f, + -0.34569529f, -0.27847636f, -0.35428950f, 0.17362595f, -0.29312757f, + 0.29407486f, -0.08227637f, 0.13294594f, -0.28004983f, -0.34479791f, + -0.34931776f, 0.09928341f, 0.00795252f, 0.20976326f, 0.02036027f, + 0.18334278f, -0.13499001f, -0.11158566f, 0.10802098f, -0.01343746f, + 0.03220111f, -0.28754818f, -0.05485102f, 0.16571668f, 0.04588330f, + 0.06695363f, 0.17756781f, -0.12488658f, 0.22902411f, 0.00000000f, + -0.26293039f, -0.15535088f, 0.22899243f, 0.05946014f, -0.04079446f, + 0.24251588f, 0.04015941f, 0.32033512f, -0.04666385f, -0.18906786f, + 0.21948034f, -0.07275748f, -0.00000000f, -0.01061970f, 0.24081562f, + -0.09524518f, 0.12610373f, -0.05210080f, -0.19922847f, 0.18458995f, + -0.00024118f, -0.11830906f, 0.00360768f, 0.22239731f, -0.20406444f, + 0.26822793f, -0.00614246f, 0.30330151f, 0.00019658f, -0.11512064f, + 0.05046167f, 0.06979544f, -0.25857952f, 0.00000000f, 0.18970959f, + 0.20144944f, 1.07969451f, 0.18156983f, 0.11283243f, -0.07627654f, + 0.23832256f, -0.10732581f, 0.16209747f, 0.27950484f, 0.03145121f, + 0.30310208f, -0.33175918f, -0.25638825f, 0.37255892f, -0.19960202f, + -0.02655951f, -0.12009551f, -0.05860945f, 0.46022314f, 0.29414469f, + 0.37314826f, 0.35575163f, -0.03159150f, -0.11547599f, 0.33921596f, + -0.07740153f, 0.56181115f, -0.35807568f, -0.00000001f, 0.19312374f, + 0.28820828f, 0.20001997f, -0.23834535f, 0.21038976f, -0.35138491f, + 0.38315082f, 0.17111057f, -0.36277595f, 0.17262666f, -0.07176299f, + 0.18644066f, 0.00000000f, -0.05740422f, -0.19128178f, 0.49809185f, + -0.35587963f, 0.36737502f, 0.30093876f, 0.06604246f, -0.00000000f, + 0.38298592f, -0.00466454f, 0.04735475f, -0.02665311f, 0.00737889f, + -0.32615840f, -0.27876312f, -0.00187271f, -0.37636909f, -0.13933697f, + -0.26441050f, 0.40898019f, 0.00000000f, -0.29662868f, -0.21051453f, + 0.26246020f, -0.12254642f, -0.27048925f, 0.36495081f, 0.16657084f, + 0.41679001f, -0.21171302f, -0.31952548f, -0.44202614f, -0.29187065f, + 0.13380896f, 0.27977023f, -0.23570859f, 0.09953689f, -0.03790238f, + 0.13928230f, 0.14864771f, -0.29821154f, -0.05557584f, -0.31493729f, + -0.17906554f, 0.04537603f, 0.23996405f, -0.25598761f, 0.16327450f, + -0.37572291f, 0.31393299f, -0.00000000f, -0.06253812f, -0.05390114f, + 0.03197220f, 0.18660653f, -0.15673584f, 0.26458874f, -0.21141589f, + 0.05417021f, 0.24908194f, -0.24060211f, 0.14013670f, -0.24965839f, + 0.00000000f, 0.08659289f, 0.21421376f, -0.33576572f, 0.19276705f, + -0.33369869f, -0.18131897f, 0.20909938f, -0.00000001f, -0.08438837f, + 0.00434373f, 0.24193378f, 0.05324338f, 0.10657459f, 0.19835657f, + 0.31268385f, 0.00233874f, 0.40158466f, 0.21479432f, 0.19722070f, + -0.28824177f, 0.00000000f, 0.24787068f, 0.11204328f, -0.02968783f, + 0.24695735f, 0.36161020f, -0.24970596f, 0.27084324f, -0.22766817f, + 0.19648330f, 0.24009113f, 0.35590518f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, 0.00000069f, -0.00000913f, -0.00001648f, + 0.00000479f, -0.00001505f, 0.00000708f, -0.00002680f, -0.00002533f, + 0.00000010f, 0.00001357f, -0.00000659f, 0.00000043f, 0.00002037f, + -0.00002724f, -0.00000828f, 0.00004369f, -0.00000049f, -0.00000653f, + -0.00000000f, -0.00001019f, -0.00001837f, -0.00002751f, 0.00000245f, + -0.00001869f, 0.00000014f, -0.00000399f, -0.00000036f, -0.00001204f, + 0.00000332f, -0.00001363f, -0.00000945f, -0.00000000f, -0.00003373f, + 0.00000883f, 0.00000408f, 0.00000406f, -0.00001225f, -0.00000594f, + -0.00001019f, -0.00000000f, -0.00000431f, 0.00000000f, -0.00000479f, + 0.00001073f, 0.00001229f, -0.00001493f, -0.00000001f, -0.00000000f, + 0.00000307f, 0.00002988f, -0.00000075f, -0.00000724f, -0.00000000f, + -0.00000649f, -0.00000860f, 0.00000631f, -0.00001391f, -0.00000269f, + 0.00001610f, -0.00001657f, -0.00000807f, -0.00000658f, -0.00000208f, + -0.00000427f, 0.16242789f, -0.25380704f, -0.23445605f, 0.37552261f, + -0.15440373f, 0.08889861f, -0.00228744f, -0.05409406f, 0.45046222f, + 0.28184855f, 0.23202199f, 0.38585323f, -0.06414817f, -0.05281628f, + 0.31210577f, -0.01726651f, 0.51764679f, -0.35611850f, -0.00000000f, + 0.17227502f, 0.21434386f, 0.17319933f, -0.16816089f, 0.15645519f, + -0.32868293f, 0.38879988f, 0.09865694f, -0.31329966f, 0.14898680f, + -0.10300562f, 0.09530019f, 0.00000000f, 0.02229543f, -0.17707999f, + 0.33103716f, -0.33691493f, 0.26208323f, 0.24663141f, 0.03203253f, + 0.00000000f, 0.30150601f, -0.00744746f, 0.00493506f, 0.08162819f, + -0.13977496f, -0.25259221f, -0.23691808f, -0.00178741f, -0.34989282f, + -0.07782181f, -0.21997757f, 0.29800707f, 0.00000000f, -0.23776269f, + -0.22013956f, 0.23649189f, -0.07824039f, -0.22219603f, 0.25805718f, + 0.10399953f, 0.24702068f, -0.24652122f, -0.23872234f, -0.40166035f, + 0.34181753f, 0.44167981f, 0.18261017f, -0.17807932f, 0.18684794f, + 0.06803646f, 0.25640881f, 0.29520956f, -0.14191139f, -0.17761888f, + 0.15907662f, -0.32183054f, 0.29130912f, 0.32734528f, -0.17133278f, + 0.21221399f, -0.25141236f, 0.08593749f, 0.00001478f, -0.10771751f, + -0.25963831f, -0.18473049f, 0.14811231f, 0.06614643f, 0.18281600f, + -0.20101163f, 0.00159852f, 0.34615305f, 0.16323498f, 0.07423146f, + 0.27252197f, 0.00000000f, 0.22487165f, 0.21658427f, -0.38439241f, + 0.20000611f, 0.13672861f, -0.21509998f, -0.04237382f, -0.00000000f, + -0.21514215f, 0.00313549f, -0.00579789f, 0.03419375f, 0.30483696f, + 0.40618658f, 0.15665577f, 0.00114240f, 0.36131898f, 0.28584573f, + 0.08150704f, 0.02601380f, -0.00000000f, 0.27385300f, 0.24811341f, + -0.29683942f, 0.13517244f, -0.08090936f, -0.33621112f, -0.18212013f, + 0.00055515f, 0.30869979f, 0.20092981f, 0.34893614f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + 0.00000460f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000129f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.22182439f, 0.01662528f, + 0.30749565f, -0.20992632f, 0.26935431f, -0.21586312f, 0.04289626f, + 0.13077249f, -0.29636416f, 0.10633102f, -0.26326808f, -0.14311494f, + 0.28486717f, 0.22477876f, -0.02953603f, 0.22823834f, -0.36112437f, + 0.27558395f, 0.00000000f, -0.09526469f, -0.15710583f, 0.14374708f, + 0.08130934f, -0.04690154f, 0.16155003f, -0.09413130f, 0.16668814f, + 0.23680349f, -0.09358872f, 0.23123881f, -0.25285396f, -0.00000000f, + 0.10392562f, 0.18839893f, -0.27260941f, 0.17740457f, -0.23869441f, + -0.11245084f, 0.25264883f, 0.00000000f, -0.07453183f, 0.00381422f, + 0.26188299f, -0.21743970f, 0.11584442f, -0.09340724f, 0.33987871f, + 0.00133591f, 0.20235875f, 0.05946474f, 0.25949928f, -0.36566582f, + 0.00000000f, 0.11578660f, 0.12411010f, 0.44106829f, 0.28259203f, + 0.20925066f, -0.12852725f, 0.19155914f, -0.26212317f, 0.20345524f, + 0.33655348f, 0.22531758f, 0.41094667f, 0.03148923f, -0.25105113f, + 0.29881057f, -0.02111085f, 0.20635037f, -0.01446334f, 0.08918712f, + 0.34452143f, 0.36463478f, 0.31616911f, 0.22673294f, 0.00399256f, + 0.04633888f, 0.26530915f, 0.01428457f, 0.46159345f, -0.20502807f, + 0.00000000f, 0.21187651f, 0.28707540f, 0.20701501f, -0.14751039f, + 0.25927791f, -0.19336165f, 0.32220450f, 0.11241592f, -0.17875123f, + 0.26130214f, -0.14097983f, 0.41164374f, -0.00000000f, 0.07756766f, + -0.20955448f, 0.28828526f, -0.16359767f, 0.30755895f, 0.20600435f, + -0.05875289f, 0.00000000f, 0.17917970f, -0.00315533f, 0.00391495f, + 0.20381202f, 0.10633303f, -0.03868535f, -0.24230954f, -0.00215782f, + -0.20535688f, -0.03389766f, -0.18665299f, 0.41476178f, 0.00000000f, + -0.19940315f, -0.14738065f, 0.09204819f, -0.07519688f, -0.25111404f, + 0.29370618f, 0.07477685f, 0.28852254f, -0.17416900f, -0.24255586f, + -0.28385231f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000429f, 0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000036f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000001f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.14688323f, + -0.17158580f, 0.03263756f, 0.20875786f, 0.01279663f, -0.22290654f, + -0.03187257f, 0.13613650f, 0.21281894f, 0.11662702f, -0.08591658f, + 0.25781789f, 0.15149266f, -0.10962530f, 0.27364418f, 0.06208687f, + 0.27101311f, 0.05707735f, -0.00000000f, -0.22834080f, 0.23236689f, + 0.21117993f, -0.15765022f, -0.04507737f, -0.01060626f, 0.18117845f, + 0.30463052f, -0.08862127f, -0.19301386f, 0.13372248f, -0.05714092f, + 0.00000000f, -0.05465642f, 0.10662773f, 0.09497783f, -0.06922489f, + 0.11084709f, -0.07847541f, 0.29522997f, -0.00001970f, 0.07548355f, + 0.00209502f, 0.30181953f, -0.07989417f, 0.20681402f, -0.23627630f, + 0.16781312f, 0.00021523f, -0.14075187f, 0.06347315f, 0.20285645f, + 0.07856326f, -0.00000000f, 0.08440532f, 0.18201336f, 0.76136708f, + 0.00641224f, -0.00957110f, 0.01966049f, 0.25778157f, -0.12200666f, + 0.08864727f, 0.07533805f, -0.11679388f, -0.03636863f, 0.02109042f, + 0.05724176f, 0.05089578f, 0.03632282f, -0.00320249f, 0.02570659f, + 0.00606056f, 0.06040477f, 0.03207665f, -0.02473037f, 0.08232158f, + 0.01858678f, 0.01361574f, 0.02200956f, 0.01856104f, 0.11739300f, + -0.03950883f, -0.00000000f, 0.00663388f, 0.00227786f, 0.02168707f, + 0.06830653f, -0.00681054f, -0.01690411f, 0.08465263f, -0.00208218f, + 0.01372742f, 0.00610158f, 0.03359194f, -0.04478121f, 0.00000000f, + 0.02490438f, 0.05244584f, -0.01100167f, -0.00142507f, -0.01889183f, + 0.02370966f, 0.03392369f, 0.00000000f, 0.01003411f, -0.00000000f, + 0.03433053f, 0.00742196f, -0.00283545f, 0.02248946f, -0.16511315f, + -0.00000000f, 0.02206288f, 0.00779577f, 0.04609028f, -0.00823601f, + -0.00000000f, -0.00423698f, 0.03082798f, -0.36948729f, 0.01430983f, + 0.07738260f, -0.03292768f, 0.01941584f, -0.02906864f, 0.02851714f, + -0.07727195f, 0.04965456f, 0.26213884f, 0.04094471f, 0.09361665f, + 0.02819332f, 0.15544863f, -0.06727978f, -0.09684460f, 0.25444639f, + 0.00481456f, 0.19186205f, -0.10103521f, -0.21924153f, 0.17480160f, + 0.06263886f, 0.14231163f, 0.09925339f, -0.12068534f, 0.13593824f, + 0.00000000f, -0.18458079f, -0.01359175f, 0.25071952f, 0.11338500f, + -0.11400433f, 0.25150388f, 0.01911812f, 0.33605394f, 0.19706008f, + -0.14360479f, 0.24222317f, -0.08521114f, -0.00000000f, -0.04078176f, + 0.08386660f, -0.25534812f, 0.14520249f, -0.04408607f, -0.25078771f, + 0.26303974f, 0.00004478f, -0.20536487f, 0.00548632f, 0.11611918f, + -0.22705999f, 0.39925200f, -0.03882574f, 0.28142685f, 0.00039412f, + -0.09334494f, -0.09267160f, 0.28128865f, -0.23382807f, 0.00000000f, + 0.30158177f, 0.11720501f, 0.95654112f, 0.05015039f, 0.21056630f, + -0.18548918f, 0.26404506f, -0.26630634f, 0.25701201f, 0.25210437f, + 0.08826546f, 0.30110812f, -0.28645331f, -0.26695129f, 0.37817404f, + -0.17792720f, 0.04232131f, -0.06462327f, -0.06748664f, 0.51979834f, + 0.29001868f, 0.29752505f, 0.40573293f, -0.06053566f, -0.07258353f, + 0.32620212f, -0.03723476f, 0.68355566f, -0.30277431f, -0.00000000f, + 0.14278576f, 0.19608839f, 0.15172920f, -0.18223543f, 0.14576389f, + -0.30709684f, 0.40654430f, 0.11798970f, -0.32318705f, 0.12239613f, + -0.06998217f, 0.11095938f, -0.00000000f, -0.01253797f, -0.15691322f, + 0.45535311f, -0.36237124f, 0.31253695f, 0.26218286f, 0.04163014f, + -0.00000000f, 0.37466455f, -0.01117654f, 0.00885270f, 0.01392211f, + -0.07176228f, -0.27998096f, -0.27607325f, -0.00179374f, -0.34373593f, + -0.08986136f, -0.19537352f, 0.38406959f, -0.00000000f, -0.27872956f, + -0.19383678f, 0.23360330f, -0.06577222f, -0.20717135f, 0.27814057f, + 0.11886200f, 0.33890364f, -0.21064423f, -0.30424106f, -0.45421645f, + -0.12780775f, 0.17367341f, 0.29330608f, -0.25372693f, 0.22326703f, + -0.02836812f, 0.17696217f, 0.12232648f, -0.27895632f, -0.13178392f, + -0.35025135f, -0.28634465f, 0.12923060f, 0.04694777f, -0.23988929f, + 0.12541664f, -0.42662209f, 0.07438620f, 0.00000051f, -0.20083418f, + -0.22370015f, -0.19555929f, 0.18349320f, -0.11004283f, 0.24577086f, + -0.31212190f, -0.08499921f, 0.27014741f, -0.03504326f, 0.27062899f, + -0.13533086f, 0.00000000f, 0.09265215f, 0.19510289f, -0.38215250f, + 0.19670838f, -0.38515410f, -0.23797861f, 0.01731628f, 0.00110134f, + -0.19077761f, 0.00328384f, 0.11194148f, -0.07346217f, 0.21814565f, + 0.28707716f, 0.30791089f, 0.00296038f, 0.34849367f, 0.19595070f, + 0.26674762f, -0.18177713f, 0.00000000f, 0.26705706f, 0.07008807f, + -0.06727605f, 0.11588232f, 0.15023120f, -0.11221628f, -0.01288637f, + -0.09906943f, 0.19071080f, 0.32785863f, 0.29751152f, 0.22318915f, + 0.29156491f, -0.14278920f, 0.05096028f, -0.03955293f, 0.28926590f, + 0.16119723f, 0.21544483f, 0.15422659f, -0.03601728f, 0.30037460f, + -0.03565720f, -0.11468046f, 0.25449759f, -0.05892861f, 0.27207914f, + 0.22086462f, -0.05833345f, 0.00000000f, 0.21490516f, 0.23210947f, + -0.12927191f, -0.00366974f, 0.14184046f, -0.16117503f, 0.00060980f, + -0.19289295f, 0.07192197f, 0.29331386f, -0.26025966f, 0.27999100f, + 0.00000000f, 0.08766670f, -0.26755533f, 0.10129572f, -0.11691555f, + 0.34782699f, 0.21964003f, -0.08478365f, -0.00011422f, 0.13575527f, + -0.00352167f, -0.23638991f, 0.04541082f, -0.15845013f, 0.14436671f, + -0.17595828f, -0.00026751f, -0.01215071f, 0.14466393f, -0.18502487f, + 0.38988581f, 0.00000000f, -0.13960631f, -0.22097461f, -1.04956901f, + 0.07269362f, -0.23298034f, 0.12944800f, -0.20835537f, 0.12362121f, + -0.06402770f, -0.35053071f, -0.15848188f, -0.22810763f, -0.00808318f, + 0.32074717f, -0.14438199f, 0.21823891f, -0.09991509f, 0.07138175f, + 0.16716982f, -0.29508105f, -0.07717974f, -0.10553345f, -0.12381995f, + 0.18209814f, 0.10623477f, 0.05524470f, 0.05035815f, -0.35856032f, + 0.26371780f, -0.00000000f, -0.23439184f, -0.17502226f, 0.19234499f, + 0.08044906f, -0.11250199f, 0.24220228f, -0.07010520f, 0.16810396f, + 0.28324538f, -0.11828142f, 0.29023498f, -0.26103619f, 0.00000000f, + 0.07041029f, 0.26098990f, -0.24127340f, 0.17367008f, -0.20885387f, + -0.12388994f, 0.07510452f, -0.00000212f, -0.06552021f, 0.00492156f, + 0.25434589f, -0.07157037f, 0.21674976f, 0.06120962f, 0.19771022f, + 0.00187454f, 0.26997331f, 0.15701891f, 0.18886228f, -0.28198352f, + -0.00000000f, 0.30968159f, 0.05799258f, 0.47787178f, 0.26191476f, + 0.11424919f, -0.11183029f, 0.26685905f, -0.12953870f, 0.18969874f, + 0.14409646f, 0.30361715f, 0.01618651f, 0.19623840f, 0.30768165f, + -0.24097613f, 0.24225697f, -0.19304925f, 0.05403400f, 0.30533785f, + -0.27416393f, -0.08326416f, -0.28399074f, -0.32878256f, 0.32050294f, + 0.27904624f, -0.18569192f, 0.11751551f, -0.39709744f, 0.25032094f, + 0.00000001f, -0.23289400f, -0.16247654f, -0.19047843f, 0.10979794f, + -0.25100142f, 0.27613002f, -0.24501303f, 0.02329538f, 0.38979819f, + -0.08993167f, 0.22626077f, -0.04154349f, -0.00000000f, -0.03279890f, + 0.21389894f, -0.31362122f, 0.19740152f, -0.22027971f, -0.27871472f, + 0.21956792f, 0.00000000f, -0.17088015f, 0.00332990f, 0.11257359f, + -0.19124129f, 0.12275785f, 0.07038864f, 0.35287035f, 0.00214045f, + 0.28821430f, 0.16606483f, 0.19303183f, -0.17560259f, 0.00000000f, + 0.20323063f, 0.32039833f, 0.02533709f, 0.16908003f, 0.18287276f, + -0.34389347f, 0.16479044f, -0.19418107f, 0.30904791f, 0.16390376f, + 0.35604089f, 0.01124834f, -0.07057499f, 0.19605568f, -0.06088727f, + 0.24492308f, -0.10183512f, -0.09495569f, 0.25229877f, -0.18302707f, + 0.08119683f, -0.09223580f, -0.13670142f, 0.14455725f, 0.09127554f, + 0.13504551f, 0.14190146f, -0.24335146f, 0.22142430f, 0.00000000f, + -0.11898240f, -0.13470811f, 0.15288080f, 0.21895607f, -0.14255974f, + 0.30172089f, -0.03391648f, 0.29415753f, 0.17358716f, -0.16069007f, + 0.20892990f, -0.18265255f, 0.00000000f, 0.10755435f, 0.17890024f, + -0.21209885f, 0.14825077f, -0.14165744f, -0.24426785f, 0.22033609f, + 0.00000000f, -0.12117441f, 0.00470621f, 0.12814479f, -0.26971149f, + 0.22918180f, -0.13617365f, 0.28123274f, 0.00055138f, 0.16200817f, + -0.07521548f, 0.22117643f, -0.18042634f, 0.00000000f, 0.15796509f, + 0.18132730f, 0.97833431f, 0.15954161f, 0.21049164f, -0.20294972f, + 0.16378649f, -0.12715183f, 0.16795695f, 0.25114664f, 0.15915740f, + -0.00000164f, -0.00001129f, -0.00000299f, 0.00000018f, -0.00000386f, + -0.00000691f, -0.00001412f, -0.00001523f, -0.00000262f, -0.00000039f, + -0.00000521f, 0.00000238f, -0.00000583f, 0.00001200f, -0.00000464f, + -0.00001818f, 0.00000107f, -0.00000303f, 0.00000000f, -0.00000007f, + -0.00001053f, 0.00000222f, -0.00001054f, -0.00000105f, -0.00000036f, + 0.00000273f, -0.00000042f, -0.00000831f, -0.00000081f, -0.00000014f, + -0.00000206f, 0.00000000f, -0.00000298f, 0.00000137f, -0.00000166f, + -0.00000386f, -0.00001162f, 0.00000379f, 0.00000286f, -0.00000000f, + -0.00000002f, 0.00000000f, 0.00000335f, -0.00000204f, 0.00000191f, + -0.00000203f, 0.00000021f, 0.00000000f, 0.00000300f, -0.00000441f, + -0.00000630f, 0.00000375f, -0.00000000f, 0.00000235f, -0.00000115f, + -0.00000509f, 0.00000880f, -0.00000694f, -0.00001006f, 0.00000355f, + -0.00000411f, 0.00000041f, -0.00000283f, 0.00000380f, 0.05411759f, + -0.29260090f, -0.16920297f, 0.27178741f, -0.18734348f, -0.17207606f, + -0.09431025f, -0.10895799f, 0.29880479f, 0.24473210f, 0.24113470f, + 0.36026675f, -0.10132855f, -0.00847226f, 0.37319642f, 0.03124937f, + 0.39844945f, -0.05390118f, -0.00000330f, 0.10433602f, 0.39887843f, + 0.35938728f, -0.16004869f, 0.25941390f, -0.12187580f, 0.30971965f, + 0.34674993f, -0.38033631f, 0.05149962f, 0.11811497f, -0.14230864f, + 0.00000000f, -0.02691641f, 0.02302280f, 0.36124754f, -0.21721223f, + 0.21993411f, 0.16515715f, 0.11205674f, -0.00000001f, 0.28012794f, + -0.00251885f, 0.30427951f, -0.00978420f, -0.03207893f, -0.33459491f, + -0.19674578f, -0.00140001f, -0.40128997f, -0.20164301f, -0.00259512f, + 0.24397942f, 0.00000000f, -0.16462500f, -0.06450668f, 0.43174168f, + 0.03782056f, -0.16144584f, 0.40108135f, 0.24580951f, 0.29562077f, + -0.22404113f, -0.07096445f, -0.35981953f, -0.30415717f, 0.25773346f, + 0.30312088f, -0.17017564f, 0.11654478f, 0.29470652f, 0.13972464f, + 0.06018736f, -0.23848428f, -0.31234553f, -0.15223609f, -0.09130130f, + 0.13553940f, 0.14416693f, -0.17008707f, 0.19853412f, -0.33976281f, + 0.13893344f, 0.00000110f, 0.14547533f, 0.00621508f, -0.06362013f, + 0.33079019f, 0.11761642f, 0.02059862f, -0.19690485f, -0.11674142f, + 0.26937816f, 0.03839799f, 0.16723885f, -0.13094369f, 0.00000000f, + 0.23450953f, 0.12749228f, -0.13666406f, 0.16018391f, -0.27325419f, + 0.14769115f, 0.07816593f, -0.00197787f, 0.01401769f, 0.00088233f, + -0.04609348f, 0.28384662f, -0.11938413f, 0.29021484f, 0.15961555f, + 0.00131166f, 0.35826927f, 0.29869857f, 0.29798040f, -0.31013691f, + 0.00000000f, 0.20384406f, 0.17674333f, -0.28440779f, 0.12627199f, + 0.36919054f, -0.17510763f, -0.07427576f, -0.15679120f, 0.20411515f, + 0.25333631f, 0.30447328f, -0.00059660f, -0.00268442f, -0.00280743f, + -0.00155072f, -0.00320202f, -0.00086646f, -0.00985542f, -0.00688235f, + -0.00000012f, -0.00717643f, -0.00335982f, 0.00000001f, -0.00575905f, + -0.00897745f, -0.00519390f, -0.00951503f, -0.00000000f, -0.00056606f, + 0.00000000f, -0.00133935f, -0.01105972f, -0.01192579f, -0.00455180f, + -0.00653823f, -0.00056199f, -0.00333940f, -0.00711583f, -0.00157211f, + -0.00199114f, -0.00414869f, -0.00144548f, -0.00000000f, -0.00977832f, + -0.00334598f, -0.00014258f, -0.00003857f, -0.00376415f, -0.00034341f, + -0.00689638f, -0.00000000f, -0.00016744f, 0.00000000f, -0.00599491f, + -0.00116986f, -0.00277197f, -0.00208269f, -0.00088176f, 0.00000000f, + -0.00074748f, -0.00790341f, -0.00251445f, -0.00219295f, 0.00000000f, + -0.00132237f, -0.00252183f, -0.00367764f, -0.00695897f, -0.00382043f, + -0.00135863f, -0.01005498f, -0.00292177f, -0.00115199f, -0.00062495f, + -0.00003824f, -0.00000004f, -0.00000003f, -0.00000001f, -0.00000002f, + -0.00000006f, 0.00000002f, -0.00000011f, -0.00000007f, -0.00000001f, + 0.00000001f, 0.00000003f, -0.00000000f, 0.00000002f, 0.00000014f, + 0.00000002f, -0.00000003f, 0.00000000f, -0.00000002f, 0.00000000f, + -0.00000003f, -0.00000012f, 0.00000000f, -0.00000003f, -0.00000007f, + 0.00000003f, -0.00000002f, -0.00000002f, 0.00000002f, 0.00000004f, + -0.00000002f, -0.00000004f, 0.00000000f, 0.00000000f, -0.00000003f, + -0.00000002f, -0.00000002f, 0.00000004f, 0.00000002f, -0.00000001f, + 0.00000000f, 0.00000001f, 0.00000000f, -0.00000000f, -0.00000002f, + -0.00000007f, 0.00000002f, -0.00000000f, 0.00000000f, -0.00000003f, + 0.00000003f, -0.00000003f, -0.00000003f, -0.00000000f, -0.00000000f, + -0.00000003f, -0.00000001f, 0.00000005f, 0.00000002f, -0.00000002f, + -0.00000006f, -0.00000004f, 0.00000001f, 0.00000000f, 0.00000001f, + 0.27496576f, -0.28602237f, -0.27016181f, 0.37375262f, -0.18645525f, + 0.05436725f, -0.12469657f, -0.06272303f, 0.49038628f, 0.29028094f, + 0.30759087f, 0.38394350f, -0.00347690f, -0.06048591f, 0.33096206f, + -0.08483899f, 0.61654681f, -0.32671413f, -0.00000000f, 0.16919149f, + 0.17594521f, 0.19298393f, -0.21763586f, 0.15577374f, -0.31792831f, + 0.38643056f, 0.14182928f, -0.33407199f, 0.14884552f, -0.12786135f, + 0.12475128f, -0.00000000f, -0.08115853f, -0.16342154f, 0.44207823f, + -0.37067872f, 0.32428962f, 0.28883743f, 0.03180743f, -0.00000000f, + 0.39486608f, -0.00897031f, 0.03012010f, 0.03905037f, -0.04789886f, + -0.30316681f, -0.27614343f, -0.00286445f, -0.35956189f, -0.03999763f, + -0.20566376f, 0.35402447f, 0.00000000f, -0.28936854f, -0.19565916f, + 0.21892965f, -0.12413848f, -0.27375731f, 0.30730739f, 0.15926580f, + 0.35805202f, -0.20073223f, -0.29625410f, -0.45381811f, -0.08780247f, + 0.16710605f, -0.03483793f, 0.11725906f, 0.04080317f, 0.14531785f, + 0.24610493f, 0.20167771f, 0.11568749f, -0.07828704f, 0.26808468f, + 0.15058184f, -0.02461604f, 0.25495842f, -0.10124450f, 0.17410839f, + 0.18398847f, -0.20386206f, 0.00000000f, 0.31805506f, 0.19684812f, + 0.02350621f, 0.16742104f, 0.21907309f, -0.18041196f, -0.00127495f, + -0.26527634f, 0.18960671f, 0.25231880f, -0.21569020f, 0.16335228f, + -0.00000000f, 0.18065265f, -0.12105779f, 0.25469860f, -0.09539917f, + 0.24125172f, 0.24785061f, -0.20155655f, -0.00037737f, 0.22007124f, + -0.00609000f, -0.17594209f, 0.29905871f, -0.33547795f, 0.14744543f, + -0.32681251f, -0.00073147f, 0.04207432f, 0.15650213f, -0.26342916f, + 0.10557806f, -0.00000000f, -0.23486377f, -0.11183576f, -1.08669198f, + 0.00797380f, -0.02768527f, 0.24409275f, -0.11601246f, 0.28305626f, + -0.17009899f, -0.27411518f, -0.14384203f, +}; + +/* net.2.bias shape=[32] */ +static const float inter_b1[32] = { + 0.09491965f, -0.04876206f, 0.06943213f, 0.19077669f, 0.18077260f, + 0.19907942f, -0.07003409f, -0.00000000f, -0.00004115f, 0.14847223f, + -0.15827583f, -0.00006418f, 0.00807978f, 0.25760302f, -0.00035976f, + -0.00000000f, 0.24101701f, 0.03256707f, 0.13185780f, 0.17010656f, + -0.09428041f, 0.12533760f, -0.03845026f, 0.01724240f, 0.11915039f, + -0.00000553f, 0.22251163f, -0.09568536f, -0.01251376f, -0.00000007f, + 0.26888397f, 0.08980300f, +}; + +/* net.4.weight shape=[4, 32] */ +static const float inter_w2[128] = { + 0.23938580f, -0.00093278f, 0.11526418f, 0.26879677f, -0.38997936f, + 0.36994836f, -0.22353627f, -0.00000000f, -0.00002553f, 0.25281754f, + 0.17862730f, 0.00000000f, -0.35066149f, 0.28127295f, -0.00000006f, + 0.00000000f, -0.33013049f, 0.14348422f, -0.24078624f, 0.35267150f, + -0.11468270f, 0.33496091f, -0.32887384f, -0.24673535f, -0.23227884f, + -0.00056736f, -0.17906734f, 0.17589216f, -0.00503108f, -0.00000001f, + 0.37701553f, 0.41103476f, 0.55053824f, 0.01322618f, 0.17813893f, + 0.07997975f, 0.07894102f, 0.34657940f, -0.06059076f, -0.00000000f, + -0.00001672f, 0.28927827f, -0.49966905f, -0.00000000f, -0.01795359f, + 0.18236126f, 0.00000000f, -0.00000003f, 0.24198236f, 0.00234688f, + 0.15857588f, 0.33402053f, -0.30711016f, -0.45271748f, 0.05987721f, + -0.36769971f, 0.18208656f, -0.00000644f, 0.49143529f, -0.16912945f, + 0.02054304f, -0.00000000f, 0.31923923f, -0.24598250f, -0.49382657f, + 0.04950920f, -0.21643418f, -0.04000461f, 0.13703544f, 0.52838004f, + -0.32224503f, -0.00000000f, 0.00000456f, 0.22972538f, -0.01023516f, + 0.00000000f, -0.13373835f, 0.42425752f, 0.00000000f, 0.00000001f, + 0.26471618f, -0.04881506f, 0.36567309f, 0.34827888f, -0.41210851f, + -0.26056555f, -0.06438295f, -0.16606376f, 0.21750507f, 0.00000913f, + 0.29646632f, -0.51632494f, -0.00158709f, 0.00000000f, 0.42604178f, + -0.38408804f, -0.27654144f, -0.07222518f, -0.06017482f, -0.46482250f, + 0.10056481f, -0.56227040f, 0.41990706f, 0.00000000f, 0.00000524f, + -0.39663976f, 0.30224407f, -0.00000000f, 0.20237584f, -0.35989523f, + -0.00000000f, 0.00000000f, -0.11170792f, -0.06758905f, 0.27704820f, + -0.64904851f, 0.45812875f, -0.17787962f, 0.29403743f, 0.29556370f, + 0.30618042f, 0.00025338f, -0.51653999f, 0.36938742f, -0.00708441f, + -0.00000001f, -0.61908662f, -0.30422840f, +}; + +/* net.4.bias shape=[4] */ +static const float inter_b2[4] = { + 0.02923816f, + 0.16495848f, + 0.21639383f, + -0.25666264f, +}; + +/* Total parameters: 4708 */ +#endif // AV2_ENCODER_PARTITION_MLP_INTER_WEIGHTS_H_ diff --git a/av2/encoder/partition_mlp_kf_weights.h b/av2/encoder/partition_mlp_kf_weights.h new file mode 100644 index 0000000000..fd4b7ac3b3 --- /dev/null +++ b/av2/encoder/partition_mlp_kf_weights.h @@ -0,0 +1,989 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +/* Auto-generated — do not edit. */ +#ifndef AV2_ENCODER_PARTITION_MLP_KF_WEIGHTS_H_ +#define AV2_ENCODER_PARTITION_MLP_KF_WEIGHTS_H_ + +/* net.0.weight shape=[64, 38] */ +static const float kf_w0[2432] = { + 0.00000000f, 0.00000000f, 0.00000001f, 0.00000000f, 0.00000001f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, -0.00000001f, + 0.00000000f, -0.00000001f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000002f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.16178504f, -0.10159504f, + -0.00460214f, -0.05975557f, 0.02269255f, 0.04224990f, -0.05913756f, + -0.10147546f, -0.06397731f, -0.01898325f, 0.02913875f, -0.09452579f, + -0.04430114f, -0.09262721f, -0.06033240f, -0.02225797f, -0.04056276f, + -0.03234562f, -0.11061008f, 0.00512212f, -0.07338018f, -0.06588969f, + -0.00230973f, -0.19192204f, 0.03780030f, -0.06189324f, 0.06173752f, + -0.04200565f, 0.00347216f, -0.02141707f, -0.05497250f, 0.03887492f, + -0.14419045f, 0.21117033f, 0.22003731f, 0.37462077f, -0.02268153f, + -0.08730467f, 0.19731751f, 0.23030914f, 0.17630637f, 0.14949223f, + 0.15876903f, 0.22253193f, 0.20132479f, 0.21594757f, 0.16471997f, + 0.14313616f, 0.09505855f, 0.19035499f, 0.05076990f, 0.08165625f, + -0.09567095f, -0.14862253f, -0.13805057f, 0.04096879f, -0.04498293f, + -0.01402879f, 0.11391433f, -0.01407055f, 0.03320780f, 0.19580303f, + 0.10371701f, 0.20652689f, 0.13965650f, 0.22428250f, 0.34661880f, + 0.36821508f, 0.27483276f, 0.15790732f, 0.36050004f, 0.34649116f, + 0.13190375f, 0.00510895f, 0.18747775f, 0.31131977f, -0.06735528f, + -0.09426763f, -0.12973613f, -0.12976448f, -0.02420704f, -0.01366331f, + 0.00729752f, 0.00964506f, -0.01904638f, 0.14986867f, -0.05959350f, + 0.14974095f, 0.17986237f, 0.16400465f, 0.23436119f, 0.11328775f, + 0.02296395f, 0.14237565f, 0.22090787f, 0.02314037f, 0.00514251f, + 0.08395680f, -0.01063507f, 0.22410996f, -0.01856018f, 0.01533362f, + -0.05116741f, 0.00298483f, 0.01780129f, -0.08968908f, -0.11228649f, + -0.07006050f, 0.25840360f, 0.35013157f, 0.01971543f, -0.20210965f, + -0.09024960f, 0.07650816f, 0.09549965f, 0.38678473f, 0.23147142f, + 0.21788269f, 0.09258704f, 0.19810294f, 0.11622409f, 0.20107040f, + 0.03566108f, 0.16374092f, 0.13088746f, 0.10874113f, 0.17149694f, + -0.03510826f, 0.07987267f, 0.13659576f, 0.05878301f, 0.07393772f, + 0.02682060f, 0.09354136f, 0.07859456f, 0.16554439f, 0.06386039f, + 0.10350417f, 0.15014552f, 0.05110991f, 0.23488754f, 0.21776032f, + 0.08339494f, 0.26701900f, 0.32501867f, 0.08614620f, 0.31090060f, + -0.43943524f, -0.17275734f, -0.06751043f, 0.18916355f, 0.26948676f, + -0.04115304f, 0.18896045f, 0.08564994f, 0.10924092f, 0.22610962f, + 0.03380679f, 0.16730125f, 0.31520399f, 0.16672924f, 0.16632739f, + 0.18535905f, 0.16951889f, 0.31049064f, 0.23263633f, 0.11778824f, + 0.12224320f, 0.29643518f, 0.29015687f, 0.15188965f, 0.22382802f, + 0.27733871f, 0.22968420f, 0.07525790f, 0.25693253f, 0.10878946f, + 0.16762060f, 0.02350366f, 0.15905122f, 0.07165828f, -0.02110095f, + 0.21614973f, 0.11678075f, 0.34021309f, 0.24386364f, -0.06519088f, + -0.24699895f, 0.15215954f, 0.26826140f, 0.13845423f, 0.09846798f, + 0.13958985f, -0.01913558f, 0.15032090f, 0.11617916f, 0.08485129f, + -0.00537294f, 0.10445988f, 0.03827649f, -0.02478376f, -0.04625921f, + 0.07786433f, -0.05553968f, 0.08858437f, -0.03719674f, -0.05722704f, + -0.03561313f, 0.00707152f, -0.00798311f, -0.03758523f, 0.07136977f, + -0.04653298f, -0.03093291f, 0.14355750f, 0.14534192f, 0.11026654f, + 0.08804589f, 0.05006429f, -0.02723036f, 0.07116472f, 0.11508210f, + -0.12948151f, -0.41232604f, 0.23550361f, -0.09232534f, 0.08911030f, + 0.08324546f, -0.05122663f, -0.02976040f, -0.00096838f, -0.10529419f, + -0.01100389f, 0.06618683f, 0.00431415f, -0.14143063f, 0.05753947f, + -0.03832724f, -0.14727153f, 0.03131982f, 0.04863633f, -0.11772798f, + -0.08548559f, 0.05262752f, 0.03981388f, 0.01041346f, -0.06049665f, + -0.11038134f, -0.07139379f, -0.00627997f, 0.01601771f, -0.06981687f, + 0.06554347f, -0.05051352f, -0.11224747f, -0.09873884f, -0.02829693f, + 0.04377632f, -0.13929288f, -0.03712192f, -0.03136595f, 0.47891232f, + 0.26905695f, 0.29116741f, -0.03001980f, -0.13625546f, 0.03332258f, + -0.00298198f, -0.11413296f, -0.04911675f, 0.01729886f, -0.01753660f, + 0.09443783f, -0.02961144f, 0.08409366f, 0.13574921f, -0.02446755f, + 0.20041415f, 0.10485101f, 0.09458604f, 0.26974466f, 0.24038900f, + 0.27819330f, 0.26977715f, 0.06774440f, 0.05630153f, 0.12885673f, + 0.19644141f, 0.02120580f, 0.15321380f, 0.03001633f, 0.01881997f, + 0.04487557f, -0.00353549f, -0.02442740f, -0.21048574f, -0.09921645f, + -0.07607439f, 0.26614547f, 0.45577320f, 0.12804587f, -0.01246595f, + 0.16469270f, 0.12555124f, 0.09508380f, -0.47712120f, -0.26707441f, + -0.09077235f, -0.02667484f, 0.00194101f, 0.07120837f, 0.01926430f, + 0.02483353f, 0.03669910f, 0.03972910f, -0.01742436f, 0.02914598f, + 0.11666421f, 0.18978602f, 0.22072324f, 0.20023994f, 0.20487949f, + 0.18251592f, 0.12717931f, 0.08775916f, 0.11627981f, 0.10244421f, + 0.08933082f, 0.05171553f, 0.04256966f, -0.07112529f, -0.10209453f, + -0.12347440f, -0.28908059f, -0.49676722f, 0.21136194f, -0.07670074f, + -0.11599449f, -0.01239872f, -0.09627225f, 0.10322899f, 0.06960165f, + 0.05710616f, 0.14959304f, 0.02334415f, 0.22938867f, 0.20098199f, + 0.19941337f, 0.17637055f, 0.14586116f, 0.14726873f, 0.11578674f, + 0.20973054f, 0.24554031f, 0.20886649f, 0.28806508f, 0.18094738f, + 0.35466117f, 0.24013579f, 0.17820701f, 0.19452387f, 0.32392102f, + 0.09189931f, 0.21935840f, 0.12238027f, 0.32551169f, 0.08643460f, + 0.11890991f, 0.09281045f, 0.13016179f, 0.20625614f, 0.04957346f, + 0.15624075f, 0.10504321f, 0.20863537f, -0.22668704f, -0.17909324f, + -0.24021062f, 0.07954855f, 0.33710504f, 0.22974655f, 0.06517120f, + 0.17333254f, 0.00464545f, 0.09799278f, -0.01093326f, 0.16079944f, + 0.01269114f, 0.15501423f, 0.01892917f, 0.08633276f, 0.06908174f, + -0.00769451f, 0.13784353f, 0.10194065f, 0.03722499f, 0.09639923f, + -0.02469809f, -0.06687857f, 0.09804491f, 0.09101987f, 0.15134129f, + 0.13898817f, -0.08108361f, 0.15373388f, 0.10397164f, 0.19655834f, + 0.00451226f, -0.01349648f, 0.10413271f, 0.01048446f, 0.11423520f, + -0.20723811f, -0.25820830f, 0.11097942f, 0.13321653f, 0.03111248f, + 0.15951192f, 0.05917763f, -0.09589906f, 0.03356078f, -0.03743358f, + -0.01410671f, 0.04963597f, 0.11535671f, -0.00684964f, 0.03517478f, + 0.04201841f, -0.03880404f, 0.05533300f, 0.08683983f, 0.12326014f, + 0.13885574f, 0.13076580f, -0.02128823f, 0.09347361f, -0.04979379f, + 0.05476824f, 0.00277717f, 0.10509884f, 0.06737530f, 0.00939830f, + 0.03328944f, 0.10687899f, 0.02387412f, 0.05193642f, 0.00459518f, + 0.04165221f, -0.07245525f, 0.07588669f, -0.16997623f, -0.35486847f, + 0.05295057f, 0.18263398f, 0.14071727f, 0.12840220f, 0.05165483f, + 0.10258459f, 0.07919271f, 0.11027943f, 0.02803971f, 0.03385762f, + 0.04304335f, -0.02146923f, 0.11643172f, 0.07067996f, 0.05931857f, + 0.03954968f, 0.02959426f, 0.01673844f, 0.01170003f, 0.04849963f, + 0.03015316f, 0.03659844f, 0.05799174f, -0.04349063f, 0.08385170f, + 0.04755886f, 0.03509928f, -0.00929157f, 0.08022965f, 0.06939553f, + 0.04546782f, 0.08949386f, 0.05248818f, 0.06485093f, 0.07702585f, + 0.10378558f, -0.03411473f, -0.31568077f, 0.10758426f, -0.02370488f, + 0.10255262f, 0.09906175f, 0.12337113f, 0.05655023f, 0.04669214f, + 0.14679219f, 0.15037647f, 0.21689613f, 0.24363536f, 0.18856142f, + 0.19039722f, 0.16203324f, 0.27476060f, 0.27692044f, 0.18430139f, + 0.09795583f, 0.13899890f, 0.07481743f, 0.15681599f, 0.18866111f, + 0.07893227f, 0.20998590f, 0.08024498f, 0.17777406f, 0.14447400f, + 0.18032341f, 0.20899023f, 0.02810627f, 0.09817559f, 0.05766437f, + 0.15632474f, 0.17162910f, 0.24546805f, 0.23855799f, 0.17211604f, + -0.47904322f, 0.06520924f, -0.12731178f, 0.22478878f, 0.30398768f, + 0.14556012f, -0.17385305f, -0.03050099f, 0.13616882f, -0.03087826f, + 0.10622896f, -0.00085856f, 0.05899723f, -0.02563286f, 0.17857508f, + 0.04750152f, 0.11194866f, 0.04587149f, 0.20147166f, 0.23992063f, + 0.19798346f, 0.28997952f, 0.24759731f, 0.19464125f, 0.10913216f, + 0.07326923f, 0.00995903f, -0.01546953f, 0.08015515f, 0.20010974f, + 0.00478640f, 0.08449487f, -0.01141457f, 0.08590483f, -0.04044011f, + -0.05804530f, 0.07808112f, -0.18257241f, -0.39535475f, 0.06511536f, + -0.07228432f, 0.13745758f, 0.28016096f, 0.04035291f, 0.03222613f, + -0.03616124f, -0.02023034f, 0.03776422f, 0.06454436f, 0.02299519f, + -0.04007043f, -0.04543832f, 0.07299176f, 0.13084944f, 0.04818204f, + -0.01873164f, -0.02377525f, 0.00572132f, 0.15699561f, 0.02569911f, + 0.05092616f, -0.03924929f, 0.09536938f, 0.02361684f, 0.08901020f, + 0.04894742f, -0.01934299f, -0.01033785f, -0.03204197f, 0.04491263f, + 0.04753067f, 0.06377053f, 0.03596552f, -0.10425609f, 0.12493505f, + -0.12210856f, -0.34954360f, 0.18215133f, 0.07386338f, 0.23586480f, + -0.01946442f, 0.11855722f, 0.37258565f, 0.24895029f, 0.18159205f, + 0.16561037f, 0.06677540f, 0.00286858f, 0.12798810f, -0.02136032f, + 0.07654227f, 0.10494685f, 0.02747635f, 0.09203580f, 0.01171791f, + 0.02072016f, 0.13582125f, 0.07295387f, 0.05157385f, -0.06386259f, + 0.07861925f, 0.06586783f, -0.02180568f, -0.03565706f, 0.19822237f, + 0.11142059f, 0.11752541f, 0.06527951f, 0.19787978f, 0.23990534f, + 0.11193559f, 0.31237116f, 0.11156248f, 0.28502905f, 0.29168665f, + -0.18952470f, -0.16348489f, 0.12876220f, 0.21613219f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000002f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000001f, -0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000014f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000001f, -0.00013963f, 0.00000798f, 0.00004561f, + -0.00000000f, -0.00000000f, 0.22030027f, 0.23378213f, 0.23382413f, + 0.06147690f, -0.00152300f, 0.01013810f, 0.04703982f, 0.03303587f, + 0.14975198f, 0.01893173f, 0.13415337f, 0.04907364f, 0.08096451f, + 0.00152502f, -0.04931306f, 0.09159709f, -0.06471904f, -0.11603187f, + -0.04206763f, 0.11669324f, 0.16050394f, 0.13125180f, 0.13484655f, + -0.03416603f, 0.04020992f, 0.00913968f, 0.15525021f, 0.02814256f, + 0.05999913f, 0.25354612f, 0.05897092f, 0.00552283f, 0.04641494f, + -0.35040435f, 0.19210719f, 0.06916896f, 0.06978601f, 0.10791223f, + 0.29782555f, 0.51623613f, 0.32636786f, 0.19242589f, 0.20123838f, + 0.26752311f, 0.08011741f, 0.25101185f, 0.04967228f, 0.04609632f, + 0.01253983f, 0.10660104f, -0.05735527f, -0.20257959f, -0.26106310f, + -0.32334322f, -0.33292413f, -0.18926752f, -0.14608002f, -0.04648188f, + 0.01840525f, 0.04515307f, 0.02341615f, 0.13868004f, 0.03384094f, + 0.13343832f, 0.31058800f, 0.18365537f, 0.36312565f, 0.26674676f, + 0.49798629f, 0.28197336f, 0.30359685f, 0.45813787f, -0.13780299f, + 0.05075156f, 0.01098169f, 0.18608865f, -0.47230989f, -0.37729481f, + -0.38235095f, -0.18169850f, -0.27246112f, -0.04764765f, -0.10249825f, + -0.39967102f, 0.03782999f, -0.02193098f, 0.12857506f, 0.05722043f, + 0.08394659f, 0.19714068f, 0.03051978f, -0.01690080f, -0.04989777f, + 0.11040857f, 0.14486024f, 0.17899762f, 0.11597318f, 0.08485441f, + 0.03399836f, -0.11281949f, 0.24584860f, -0.00298470f, -0.02894927f, + -0.15238839f, -0.05282864f, -0.26435173f, -0.50709766f, -0.47102293f, + -0.43909538f, -0.07772256f, 0.37962300f, 0.09170326f, -0.04549164f, + -0.05341092f, -0.05796542f, 0.10214687f, 0.07461366f, 0.00434488f, + 0.05254087f, -0.00366609f, 0.00200007f, 0.25175250f, 0.09883781f, + 0.17875768f, 0.03520367f, 0.15780306f, 0.10333788f, 0.02101212f, + 0.03793227f, 0.02359032f, 0.19356591f, 0.20002046f, 0.14531194f, + 0.25800046f, 0.10456602f, 0.01894346f, 0.16305128f, 0.12542412f, + 0.03567390f, 0.13405369f, 0.04788356f, 0.14772236f, 0.08553237f, + 0.04627004f, 0.28613371f, 0.14270814f, 0.32967010f, 0.32602054f, + -0.05666561f, -0.21938778f, 0.19379854f, 0.13700563f, 0.07134125f, + 0.23990749f, 0.16322938f, 0.06047156f, 0.12311422f, 0.22582528f, + 0.09485519f, 0.07295045f, -0.00374590f, 0.18688379f, 0.22311689f, + 0.13947594f, 0.00134066f, 0.11893196f, 0.20583516f, 0.22622912f, + 0.14291826f, 0.14545852f, 0.00224182f, 0.08913972f, 0.18243423f, + 0.18376218f, 0.08673947f, 0.11819976f, 0.04353760f, 0.22707908f, + 0.16571350f, 0.18072055f, 0.07755980f, 0.03453780f, 0.22515410f, + 0.17283861f, 0.19511946f, -0.33879301f, -0.16954742f, 0.01527948f, + 0.24289508f, 0.30763501f, 0.03241930f, -0.24437353f, -0.06965581f, + -0.05653236f, 0.07840028f, 0.18758720f, 0.04702339f, -0.11411007f, + 0.08688607f, 0.03143124f, 0.07332045f, -0.00339079f, 0.11597178f, + 0.08816429f, -0.01896745f, 0.09563764f, 0.07878827f, 0.22693762f, + 0.02763051f, -0.01069224f, 0.12353869f, 0.00739849f, 0.18811847f, + -0.02398713f, 0.12576485f, 0.06558885f, -0.04954393f, 0.13306980f, + -0.02240174f, -0.10810261f, -0.18504807f, 0.10947841f, -0.19357571f, + -0.37698138f, 0.21643557f, 0.18184066f, 0.18295604f, 0.01631502f, + 0.23445848f, -0.03811069f, 0.06798691f, -0.00937013f, -0.01362151f, + -0.00437559f, 0.10147543f, 0.02783740f, 0.17410308f, 0.06817114f, + 0.01842904f, 0.13264723f, 0.05481817f, 0.09580150f, -0.10138835f, + 0.00736477f, -0.13730554f, -0.05334068f, 0.03830164f, 0.04467002f, + 0.09008371f, -0.02361796f, -0.02898725f, -0.00643211f, 0.07556158f, + 0.03207311f, 0.01130862f, 0.18858206f, 0.17008874f, 0.14851752f, + 0.10083390f, 0.15156610f, -0.12442070f, -0.33475175f, 0.25750157f, + 0.17504635f, 0.23779362f, 0.25095969f, 0.03750077f, 0.22206993f, + 0.03555536f, 0.14781120f, 0.07751320f, 0.17786103f, 0.07872199f, + 0.10927600f, 0.10474472f, 0.22955376f, 0.05084843f, 0.22897372f, + 0.08936410f, 0.21906440f, 0.01914204f, 0.05501585f, 0.16099651f, + 0.17464778f, 0.18448509f, 0.15974623f, 0.19964530f, 0.18760535f, + 0.20330818f, 0.20916343f, 0.20265101f, 0.05055176f, 0.16655137f, + 0.17006573f, 0.24697837f, 0.18926877f, 0.06037662f, 0.03872779f, + 0.11313383f, -0.26038915f, 0.11079039f, -0.09237254f, 0.30906218f, + 0.15735613f, -0.10299187f, -0.11624490f, -0.11341040f, -0.14102662f, + -0.13081825f, -0.11608326f, -0.08606232f, -0.13950901f, -0.09580086f, + -0.00443573f, -0.09377629f, -0.00347010f, -0.00108525f, -0.04413500f, + -0.01172091f, -0.00716361f, -0.10821871f, -0.10129676f, 0.02576538f, + -0.02793469f, -0.09707712f, 0.01336733f, -0.05613549f, -0.10781973f, + 0.03881883f, -0.03139738f, -0.10546371f, -0.12498886f, 0.01129871f, + -0.01770018f, -0.01887485f, -0.11255207f, -0.03821329f, 0.45791471f, + 0.02386934f, 0.08304445f, -0.09622711f, -0.06401787f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000449f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000007f, 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000001f, 0.00000000f, -0.00000001f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00003748f, -0.00000099f, 0.00000386f, 0.00001480f, + -0.00000001f, 0.00000002f, -0.02039742f, -0.00435675f, 0.02061139f, + 0.03201352f, 0.05152854f, 0.02208778f, 0.14099485f, 0.02691385f, + -0.02072122f, 0.06315790f, 0.00608297f, 0.02486990f, 0.08383795f, + -0.03409819f, -0.10102971f, 0.14712742f, -0.01828553f, -0.00179814f, + 0.03873944f, 0.04493500f, -0.01586184f, 0.07985544f, -0.02025269f, + 0.04906579f, 0.01286928f, 0.05473989f, 0.08410092f, -0.00436670f, + 0.10846808f, 0.00841538f, -0.04023026f, 0.12833342f, -0.06843945f, + -0.38039932f, 0.04750785f, 0.10363753f, 0.06588828f, 0.01426718f, + -0.01327748f, 0.04783347f, 0.03630650f, 0.10881790f, 0.10371371f, + 0.07975727f, 0.13953313f, 0.24426854f, 0.00640695f, 0.20685892f, + 0.18717068f, 0.27682000f, 0.13499899f, 0.35349655f, 0.43664020f, + 0.29662412f, 0.40184858f, 0.26427770f, 0.34965718f, 0.16998631f, + 0.09578295f, 0.26624173f, 0.24972539f, 0.18511362f, -0.00751322f, + 0.07653652f, 0.07180557f, 0.01346195f, 0.10361144f, 0.05206369f, + -0.03208596f, -0.09613884f, 0.22273071f, -0.21297400f, -0.31137100f, + 0.00949151f, 0.18393748f, 0.23072261f, 0.04168129f, 0.17371257f, + 0.14330944f, 0.10650793f, 0.06960361f, 0.09083582f, 0.09344056f, + 0.06682862f, 0.10722419f, 0.08715333f, 0.09642712f, 0.11016632f, + 0.08729022f, 0.04050377f, 0.03991785f, 0.02352964f, -0.03359852f, + -0.03035700f, 0.04261842f, 0.05985305f, 0.07815210f, 0.07268630f, + 0.07130813f, 0.03638053f, 0.16578864f, 0.11428924f, 0.14513572f, + 0.15686145f, 0.14370027f, 0.17021766f, 0.22756542f, 0.08900583f, + 0.07774826f, -0.27602088f, 0.05532561f, -0.09713146f, 0.04205938f, + 0.08162241f, 0.08591545f, 0.36804426f, 0.17914550f, 0.20148849f, + 0.03532758f, 0.05076786f, 0.21610671f, 0.12630679f, 0.10182253f, + 0.13880524f, 0.10572761f, 0.12833679f, 0.07217805f, 0.09487949f, + 0.12337156f, 0.03974379f, 0.03912407f, 0.18898027f, 0.10349853f, + 0.03190245f, 0.10897312f, 0.10757763f, 0.13350996f, 0.24737485f, + 0.11356547f, 0.07798433f, 0.11355744f, 0.27553037f, 0.10906612f, + 0.11438345f, 0.39984831f, 0.09524305f, 0.22936255f, -0.35350433f, + -0.17573889f, -0.05526770f, -0.01046999f, 0.25744355f, -0.01082532f, + -0.07896440f, 0.10686418f, 0.01558845f, 0.06432707f, 0.00037635f, + -0.06691289f, -0.02099643f, 0.16768000f, -0.02844202f, 0.10228269f, + 0.10438659f, 0.05428630f, 0.10395678f, 0.02110575f, 0.01461412f, + 0.00549026f, -0.10682288f, -0.01989518f, 0.07601561f, 0.15043747f, + 0.14437169f, 0.05105010f, -0.01685609f, -0.04856455f, -0.01253846f, + -0.02555816f, -0.04208636f, 0.05819253f, 0.07261812f, -0.21455805f, + 0.16349216f, -0.09639219f, -0.29018539f, 0.23408318f, 0.23293971f, + 0.05371102f, 0.20862123f, 0.05036556f, -0.05027207f, 0.16664968f, + 0.03770040f, 0.06934890f, 0.03381530f, 0.08158458f, 0.25411472f, + 0.14024080f, 0.20820552f, 0.02863752f, 0.11021816f, 0.12058914f, + 0.10449596f, 0.28789699f, 0.14487453f, 0.16174188f, 0.29096451f, + 0.14061892f, 0.00315329f, 0.25107747f, 0.14673927f, 0.10192822f, + 0.13209693f, 0.06923675f, 0.00697655f, 0.03771736f, 0.08019346f, + 0.08515832f, 0.03098688f, 0.08613738f, 0.07295115f, 0.26174131f, + -0.49634904f, -0.16629231f, -0.04462868f, -0.02455211f, 0.21281382f, + -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000003f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000001f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, 0.00000003f, + -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000014f, + 0.00000000f, -0.00000000f, 0.00000000f, 0.07292105f, -0.29920664f, + -0.03516604f, -0.05799973f, 0.06118740f, 0.02888735f, 0.11280099f, + 0.12825179f, 0.22763528f, 0.11630119f, 0.13988511f, 0.08219015f, + 0.21398056f, 0.36597785f, 0.37951010f, 0.41789186f, 0.42348033f, + 0.33586442f, 0.20210300f, 0.34347320f, 0.11154786f, 0.17162001f, + 0.22055744f, 0.17188707f, 0.04199491f, 0.01449995f, 0.04103698f, + -0.04508010f, -0.14432925f, -0.15284367f, -0.40730521f, -0.01466798f, + 0.30445054f, 0.49091291f, 0.34743315f, 0.26120993f, 0.25403729f, + 0.21096438f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000011f, -0.00000000f, 0.00000000f, -0.00000005f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000011f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000013f, -0.00000000f, 0.00000000f, -0.00000000f, 0.03729124f, + 0.13534452f, 0.09900682f, -0.01126612f, -0.00767054f, -0.08788288f, + -0.01561638f, -0.02030802f, 0.03806609f, 0.03932637f, -0.05847020f, + 0.10956375f, 0.06348772f, 0.08019985f, 0.13499714f, 0.14455019f, + 0.21697868f, 0.01696920f, 0.12238419f, -0.02315063f, 0.10319939f, + 0.08154495f, 0.06877991f, 0.07817096f, -0.08285039f, 0.10502072f, + -0.00408941f, 0.04821959f, -0.03627693f, 0.04648050f, 0.00667578f, + -0.06473545f, 0.03990795f, 0.41421264f, 0.08770751f, -0.07131007f, + 0.05498225f, -0.01758264f, 0.07080552f, 0.28127012f, 0.21199422f, + 0.08616118f, 0.11445849f, 0.12671490f, 0.05260473f, -0.03038796f, + 0.05998042f, -0.00316906f, -0.00776538f, -0.05618135f, -0.13462149f, + -0.12038734f, -0.08098259f, -0.30801073f, -0.19483362f, -0.20768842f, + -0.04870426f, -0.17985547f, -0.13245495f, -0.01958062f, -0.05835326f, + -0.11850017f, 0.10248479f, -0.03079788f, 0.16080825f, 0.21359707f, + 0.14922281f, 0.18460676f, 0.33406290f, 0.16059306f, -0.01849245f, + 0.26850894f, 0.36582214f, 0.22126316f, 0.09880178f, 0.14863618f, + 0.08158597f, 0.02656851f, 0.09249105f, 0.07446741f, 0.06239109f, + 0.13715321f, 0.09556728f, 0.07977465f, 0.02888499f, 0.01783160f, + 0.05226575f, 0.06065629f, 0.01560553f, 0.09639655f, 0.03679040f, + 0.06666331f, 0.08959478f, -0.04651219f, 0.05276864f, 0.01589998f, + 0.00824338f, 0.06844295f, 0.09335262f, 0.05295103f, 0.09544243f, + 0.07033400f, 0.10093547f, 0.08661154f, 0.07568621f, 0.05317941f, + 0.04225504f, 0.16026686f, 0.01036149f, -0.32912451f, 0.10718372f, + -0.05441384f, 0.08934011f, 0.03813177f, 0.15394869f, 0.35007888f, + 0.20220511f, 0.17254789f, 0.15997130f, 0.12963469f, -0.03496561f, + 0.12817107f, 0.03433920f, 0.15196362f, -0.03465655f, -0.02177088f, + -0.05088785f, -0.07347211f, 0.07389951f, -0.11772007f, -0.00677874f, + 0.01099515f, -0.02648043f, 0.06221673f, -0.02759349f, 0.06922388f, + -0.04045319f, 0.06662343f, 0.10747992f, 0.06019881f, 0.01520037f, + 0.17557305f, 0.20914012f, 0.13559185f, 0.21152562f, 0.12385577f, + 0.26486120f, 0.37701756f, -0.20796151f, -0.15335776f, 0.07194249f, + -0.05240995f, 0.24564275f, 0.26945627f, 0.11852085f, 0.13475324f, + 0.19176118f, 0.18521360f, 0.19558826f, 0.27341476f, 0.25422361f, + 0.19126198f, 0.15619366f, 0.18154116f, 0.10295527f, 0.18117884f, + 0.11581877f, 0.13933757f, 0.10818406f, 0.13672943f, 0.15717313f, + 0.05787679f, 0.18552530f, 0.21384801f, 0.19912751f, 0.27848914f, + 0.21129303f, 0.20910002f, 0.24923795f, 0.22742315f, 0.17092904f, + 0.15163933f, 0.16036300f, 0.24977037f, 0.18874440f, -0.35495090f, + -0.15067671f, -0.29825717f, 0.05715345f, 0.15730716f, 0.09867585f, + 0.19710803f, 0.20959750f, 0.22299841f, 0.10525135f, 0.14595425f, + 0.02686833f, 0.16488758f, 0.20784572f, -0.01201582f, 0.17366926f, + 0.16304585f, 0.12651694f, 0.03329083f, 0.10561140f, 0.27171925f, + 0.20359446f, 0.08901832f, 0.05677801f, 0.14390807f, 0.02458229f, + 0.01978354f, 0.18924847f, 0.16919589f, 0.11426597f, 0.11271850f, + 0.07413377f, 0.21060620f, 0.18085575f, 0.16458911f, 0.04101218f, + 0.01789726f, 0.17324305f, -0.43135267f, -0.11079872f, 0.10945407f, + 0.04783940f, 0.19289990f, -0.10551001f, -0.16623785f, 0.00578629f, + -0.11677526f, 0.04267840f, 0.02565110f, 0.01984287f, -0.06726519f, + 0.01511163f, 0.00203952f, -0.05403072f, 0.04088921f, 0.00221448f, + 0.17605209f, 0.10346718f, 0.11114971f, 0.03921769f, 0.25313529f, + 0.05388774f, 0.00702168f, 0.05278886f, -0.01941676f, -0.06841832f, + 0.04904079f, -0.12913537f, -0.13735726f, -0.01847948f, -0.18201613f, + -0.13824336f, -0.10603540f, -0.07635546f, -0.02766259f, 0.17150594f, + 0.42246133f, 0.03291509f, -0.15445422f, 0.04187655f, 0.03387661f, + -0.00532095f, 0.38576168f, 0.18493930f, 0.09002703f, 0.18995328f, + 0.13903451f, 0.17971785f, 0.06966186f, -0.03642142f, 0.12054569f, + 0.02926711f, 0.13370612f, -0.05194504f, -0.01829832f, 0.08150604f, + -0.16051166f, -0.11601361f, 0.02502955f, 0.00738923f, 0.04325289f, + 0.00922032f, -0.07397550f, 0.12579334f, 0.16758914f, 0.03900997f, + 0.01319757f, 0.11590260f, 0.08294065f, 0.22722179f, 0.20673522f, + 0.33773279f, 0.15570261f, 0.25898758f, 0.43136609f, -0.18049829f, + 0.05061511f, -0.05604356f, 0.23260929f, 0.08054163f, 0.28167808f, + 0.14851241f, 0.09869057f, 0.12999916f, 0.05176507f, -0.07184078f, + 0.07869716f, 0.00396852f, 0.03742662f, -0.03435152f, -0.05015099f, + -0.02649545f, -0.03950332f, -0.00923281f, -0.08639465f, -0.13961706f, + -0.04915941f, -0.05623734f, -0.02505090f, -0.00534191f, -0.10389192f, + 0.04094283f, 0.03251396f, 0.08748338f, -0.02097667f, 0.12279263f, + 0.21610427f, 0.21680835f, 0.24486290f, 0.43159083f, -0.07107166f, + 0.14476745f, 0.36461791f, 0.05546775f, -0.06393361f, -0.06496281f, + 0.06578773f, -0.06237448f, -0.06459367f, -0.06729693f, 0.00088110f, + 0.12283920f, 0.09583580f, -0.08060375f, 0.10429094f, 0.01040793f, + 0.13515905f, -0.05142953f, -0.00377988f, -0.01213864f, 0.15340438f, + 0.11352274f, 0.22172576f, 0.09740778f, 0.06830381f, 0.11192279f, + 0.17357466f, -0.01347617f, 0.15877907f, 0.07138693f, 0.12627238f, + 0.01535941f, 0.04437579f, -0.01119392f, 0.07821658f, -0.01786216f, + -0.12985992f, -0.09259679f, 0.00041418f, 0.02702874f, 0.38744280f, + 0.03236946f, -0.15757069f, 0.02379384f, 0.14992931f, -0.02814817f, + -0.00127831f, 0.02851175f, 0.01859929f, -0.02160473f, 0.01684038f, + 0.02805711f, -0.02205636f, -0.00013127f, -0.00765744f, 0.02430796f, + 0.01143419f, -0.01794582f, -0.02865052f, -0.03680097f, -0.05188400f, + -0.06803925f, -0.05282139f, -0.02086306f, -0.02719933f, -0.01164637f, + 0.00127882f, -0.00244405f, -0.04584006f, 0.04476320f, 0.01787429f, + 0.03451314f, 0.01724820f, 0.01339502f, 0.01167183f, -0.00165932f, + 0.01118371f, -0.03055054f, -0.18213253f, 0.04791475f, -0.03847659f, + 0.04316457f, 0.09083525f, 0.11488993f, 0.08817074f, 0.00099483f, + 0.18064526f, 0.05881786f, 0.14289704f, 0.09548854f, 0.28226358f, + 0.10451268f, 0.07726218f, 0.18705648f, 0.13143732f, 0.11364496f, + 0.22396256f, 0.10457037f, 0.27313736f, 0.24680433f, 0.35255569f, + 0.26863533f, 0.24218921f, 0.25634992f, 0.04816049f, 0.16217059f, + 0.18924370f, -0.05342557f, 0.11344512f, 0.12758547f, 0.16965967f, + 0.00569313f, -0.00378102f, 0.11148757f, 0.05162210f, 0.31697807f, + 0.38014284f, -0.24446574f, -0.10639893f, 0.14594029f, 0.21969822f, + 0.00184216f, 0.31876490f, 0.04965902f, -0.00464260f, -0.01393004f, + -0.01238649f, -0.05631127f, -0.00404543f, 0.03831888f, 0.02153329f, + 0.03677125f, 0.10497037f, 0.08867206f, -0.00052238f, -0.08010139f, + -0.11951954f, -0.09805705f, -0.11124942f, -0.06040630f, -0.00766178f, + 0.02697816f, -0.02335702f, -0.02428562f, -0.03181229f, 0.03587614f, + -0.01172018f, 0.07771309f, 0.07966670f, 0.07710876f, 0.23594877f, + 0.43511650f, -0.11458984f, 0.12667219f, 0.12275613f, 0.06448729f, + 0.11666261f, -0.04060155f, 0.03548593f, 0.04972089f, 0.44473517f, + 0.34829766f, 0.26316637f, 0.10240000f, 0.10716270f, 0.19353950f, + 0.12724973f, 0.04291461f, 0.03612399f, 0.08856497f, -0.04301944f, + 0.03477896f, -0.10292548f, -0.11232635f, -0.13007884f, -0.13419180f, + -0.10450846f, -0.09968077f, -0.02028902f, -0.03112104f, 0.00097494f, + 0.03469869f, 0.00177897f, 0.02558702f, 0.10409066f, 0.28127524f, + 0.31620243f, 0.34012848f, 0.28763479f, 0.50643915f, 0.03875909f, + -0.05306464f, -0.22462045f, 0.09272271f, -0.00986219f, 0.12408360f, + 0.26050231f, -0.09714688f, -0.36821175f, -0.24099621f, -0.14651041f, + -0.15881191f, -0.08327677f, 0.04444220f, -0.06040879f, -0.07371719f, + -0.11282757f, 0.06080202f, 0.03116651f, 0.05370427f, 0.06812574f, + -0.00183055f, 0.14674276f, 0.18524544f, 0.00898492f, 0.19502640f, + -0.03978654f, -0.07377999f, 0.13429430f, 0.08839175f, -0.09559090f, + -0.03017346f, -0.06168178f, -0.06769754f, -0.17715923f, -0.14708607f, + -0.26687694f, -0.28050438f, -0.14474915f, -0.18499310f, 0.45638740f, + 0.13382615f, 0.36944097f, 0.03912659f, -0.17782484f, -0.08370219f, + 0.16217442f, 0.10140761f, -0.06055585f, 0.01726181f, -0.03900286f, + -0.00252813f, 0.04990116f, -0.02813585f, 0.12769613f, 0.05085868f, + 0.03552350f, 0.12376506f, -0.02073391f, 0.04402531f, -0.05420182f, + 0.07120077f, -0.02488103f, -0.02385496f, 0.04701945f, 0.07420162f, + -0.05562404f, 0.04851263f, 0.01214939f, 0.05341264f, -0.02635884f, + 0.04063562f, 0.02921694f, 0.04186969f, 0.07470297f, 0.11085324f, + -0.06726279f, 0.25586087f, 0.30005553f, -0.01570751f, -0.11943523f, + -0.07821858f, 0.08958773f, -0.00000001f, 0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000001f, -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.12285990f, -0.22009717f, -0.09972387f, 0.00854901f, 0.14494930f, + 0.09042131f, 0.17255922f, 0.01675910f, 0.05234100f, 0.15523310f, + 0.02435513f, 0.15844963f, 0.05645317f, 0.00822606f, 0.01443868f, + 0.02333788f, 0.02638163f, 0.15933867f, 0.12348953f, 0.06239538f, + 0.02800896f, 0.09035616f, -0.03990246f, 0.04789368f, 0.10439033f, + 0.05063120f, 0.19125195f, -0.06004372f, 0.13511823f, 0.04085656f, + -0.12162694f, 0.12419672f, -0.25763938f, -0.29056978f, 0.25760019f, + 0.13300143f, 0.19449073f, 0.17466894f, 0.06325176f, 0.10276539f, + -0.01415697f, 0.08044221f, -0.03891684f, 0.09906215f, 0.08568569f, + 0.05608797f, 0.16316877f, -0.01943977f, 0.04290168f, -0.02044553f, + 0.17157264f, -0.02687888f, 0.22671950f, 0.21135564f, 0.16722418f, + 0.05973451f, 0.17714429f, 0.16640945f, 0.09061869f, 0.12914243f, + 0.01917977f, 0.00282491f, 0.09161878f, 0.08010814f, 0.05103549f, + 0.02800088f, -0.02022327f, 0.10204117f, -0.07319620f, 0.13430245f, + 0.04929972f, -0.42117146f, 0.11179680f, 0.16868427f, 0.18643513f, + 0.09205383f, 0.18535604f, 0.26622081f, 0.14199059f, 0.06523980f, + 0.06811853f, 0.06593148f, 0.04828220f, -0.09189129f, 0.00369083f, + -0.07313780f, 0.07219560f, 0.04185641f, -0.06458613f, -0.18022986f, + -0.32954621f, -0.30211779f, -0.31527784f, -0.16992451f, -0.10772368f, + -0.07431035f, -0.10413789f, 0.02999921f, -0.02375084f, -0.10895297f, + 0.13971163f, 0.12508050f, 0.25479558f, 0.10775348f, 0.16272484f, + 0.39416707f, 0.36862013f, 0.08843353f, -0.13569094f, -0.11392492f, + 0.13599375f, 0.17937605f, 0.01098856f, 0.17658682f, 0.14023530f, + 0.03134336f, 0.15634260f, 0.14709711f, 0.04955657f, 0.18826230f, + 0.04396458f, -0.13388920f, -0.04095333f, -0.04584898f, 0.11478055f, + -0.10818905f, -0.04940663f, 0.06521075f, -0.19943365f, -0.08580035f, + 0.03188322f, -0.14437313f, 0.04721176f, -0.07968222f, 0.03053353f, + 0.09640579f, -0.09683833f, -0.17181578f, 0.15500507f, 0.01901903f, + 0.06707340f, 0.18390615f, -0.01275552f, 0.02289293f, 0.04618342f, + 0.00574967f, -0.19071244f, -0.24086346f, 0.19281568f, 0.16591285f, + 0.19452371f, -0.00293814f, 0.13732600f, 0.02547808f, -0.05421362f, + 0.11274457f, 0.13646249f, 0.06412256f, -0.03550944f, 0.18309550f, + 0.14620328f, 0.01857533f, -0.01959252f, 0.02420219f, 0.02344814f, + 0.15684651f, 0.15554360f, 0.12654613f, 0.00198923f, 0.15356570f, + 0.01656366f, 0.02341083f, 0.06497800f, 0.17288214f, 0.15458788f, + 0.18018450f, -0.03579237f, 0.12544678f, -0.09480532f, -0.02979370f, + 0.06923641f, 0.00432568f, 0.08559573f, -0.09880783f, 0.27883571f, + 0.34182408f, -0.15440784f, -0.24708825f, -0.04964410f, 0.16486585f, + -0.00352023f, -0.54356360f, -0.25582910f, -0.13470942f, -0.11046255f, + -0.02821924f, 0.11438766f, 0.01781459f, -0.02551349f, 0.15787095f, + -0.00107545f, 0.02935761f, 0.02128513f, 0.29450676f, 0.29668924f, + 0.36357504f, 0.33178309f, 0.24468927f, 0.26701546f, 0.03502656f, + 0.07753369f, 0.10326003f, 0.12088781f, -0.00446581f, 0.19491650f, + 0.01857212f, -0.01853575f, -0.17928401f, -0.09249332f, -0.12664790f, + -0.33494073f, -0.01544421f, -0.05858348f, -0.21222071f, 0.01776678f, + 0.22535436f, 0.11461438f, 0.05186094f, 0.05660141f, 0.41602889f, + 0.20881924f, 0.12375440f, 0.05659853f, 0.07917662f, -0.00226431f, + 0.01193668f, 0.00074448f, -0.00741649f, 0.00110360f, 0.02409645f, + -0.07076456f, -0.23519601f, -0.39741093f, -0.49632466f, -0.48523566f, + -0.39944157f, -0.33380130f, -0.24701515f, -0.16562334f, -0.14004414f, + -0.10810591f, -0.11411111f, 0.03360280f, 0.05457140f, 0.21443260f, + 0.21774739f, 0.19806366f, 0.36339635f, 0.52337307f, -0.07572272f, + 0.10588884f, 0.01671950f, 0.09451282f, 0.18709646f, -0.07340284f, + 0.00965454f, 0.02043909f, -0.03788760f, 0.01481101f, -0.05137040f, + -0.04468934f, 0.12305452f, 0.04578602f, -0.03823980f, 0.04288670f, + 0.06102098f, 0.09961871f, -0.03904821f, 0.17249319f, 0.05536125f, + 0.06896042f, 0.26918304f, 0.11921217f, -0.02824669f, 0.08819998f, + 0.01720438f, 0.11520983f, 0.17265613f, -0.04529172f, -0.01988199f, + 0.05910135f, -0.02026656f, 0.06701005f, 0.12144116f, -0.01365885f, + 0.06501372f, -0.17922753f, 0.07322741f, 0.04311268f, -0.24069135f, + -0.01063694f, 0.16485468f, 0.02460477f, 0.01642094f, 0.08593651f, + 0.18081874f, 0.11830051f, 0.23795155f, 0.19579612f, 0.18657911f, + 0.20155796f, 0.22580092f, 0.15145004f, 0.22277567f, 0.24315751f, + 0.20261569f, 0.22960421f, 0.21472362f, 0.09619554f, 0.12475802f, + 0.19307639f, 0.18504860f, 0.25585312f, 0.25022671f, 0.25812504f, + 0.15858947f, 0.09667514f, 0.16394596f, 0.22419304f, 0.18818349f, + 0.18942788f, 0.21189198f, 0.12001354f, 0.16857979f, 0.26503968f, + 0.19638434f, 0.29618388f, -0.39358875f, -0.03207052f, -0.24035551f, + 0.06930305f, 0.28775874f, +}; + +/* net.0.bias shape=[64] */ +static const float kf_b0[64] = { + -0.00000001f, -0.09566416f, 0.03043937f, -0.10006177f, 0.24324568f, + 0.02950912f, 0.30322209f, -0.26176441f, 0.01845243f, 0.18176080f, + 0.24456680f, 0.21076432f, 0.32971081f, 0.16065593f, 0.15916522f, + 0.36175188f, 0.23296110f, -0.00249740f, -0.00092762f, 0.08877232f, + 0.09856017f, 0.02551742f, -0.08624450f, 0.15803850f, 0.28756905f, + 0.15705563f, 0.30136520f, -0.10978314f, -0.00075595f, 0.31008643f, + 0.20046681f, 0.14248659f, 0.24731986f, 0.12568814f, 0.34655777f, + 0.00000000f, 0.17309788f, -0.00000000f, -0.11742547f, 0.24954271f, + 0.15062985f, 0.04878780f, 0.38271549f, 0.29402784f, -0.14799774f, + -0.06171897f, -0.16954595f, -0.11207166f, 0.17845874f, 0.07988082f, + -0.09104405f, 0.29931483f, 0.05038638f, -0.04680354f, -0.00000001f, + 0.15171303f, 0.18498610f, 0.33305630f, 0.20689309f, 0.01501669f, + 0.23508833f, -0.07022359f, 0.18100643f, 0.19830258f, +}; + +/* net.2.weight shape=[32, 64] */ +static const float kf_w1[2048] = { + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.16411097f, 0.03006341f, -0.10842603f, 0.41501692f, -0.05514786f, + 0.32863936f, -0.36215049f, -0.11561687f, 0.22363171f, 0.39662674f, + 0.34314239f, 0.27036706f, 0.42170775f, 0.28289324f, 0.37477788f, + 0.35600987f, -0.06429541f, 0.00000000f, 0.39161208f, -0.13364455f, + 0.11234505f, -0.23830107f, 0.31799439f, 0.32327515f, 0.29079285f, + 0.27700868f, -0.33099538f, -0.00000000f, 0.35031408f, 0.37799442f, + 0.38504162f, 0.43710962f, 0.24233629f, 0.23501657f, 0.00000000f, + 0.03069549f, -0.00000000f, -0.26558694f, -0.06453606f, 0.40618128f, + -0.20023952f, 0.37640145f, 0.41574699f, -0.34436795f, -0.10822638f, + -0.29630381f, -0.24853203f, 0.39512736f, -0.06092934f, -0.11466059f, + 0.34939793f, -0.18302713f, -0.21601763f, -0.00000000f, 0.34576362f, + 0.26895601f, 0.19028799f, 0.38092369f, -0.17205724f, 0.17945848f, + -0.07952806f, 0.35063124f, 0.37658507f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.02428642f, 0.03779604f, + -0.15959281f, 0.43610331f, -0.04489139f, 0.39772952f, -0.12495531f, + -0.05227269f, -0.00121845f, 0.17459655f, 0.24411282f, 0.30193141f, + 0.39028820f, 0.44133821f, 0.32237059f, 0.31587446f, -0.05897368f, + 0.00000000f, 0.32404974f, 0.03304639f, 0.30085799f, -0.10608304f, + 0.37691289f, 0.24923016f, 0.26035246f, 0.17136195f, -0.18704230f, + -0.00000000f, 0.39743668f, 0.11303262f, 0.37225318f, 0.39630625f, + 0.21230032f, 0.42043564f, -0.00000000f, -0.01318060f, 0.00000000f, + -0.13406707f, 0.10148484f, 0.40678120f, -0.06050286f, 0.26276934f, + 0.27226207f, -0.22521259f, -0.06551913f, -0.06054851f, -0.21122725f, + 0.36353123f, -0.08817501f, 0.04909118f, 0.27930126f, -0.06493340f, + -0.05335999f, -0.00000000f, 0.20693029f, 0.26589751f, 0.21909189f, + 0.27402464f, -0.12224197f, 0.06634481f, 0.18008366f, 0.19087090f, + 0.34611478f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.33724290f, 0.17917280f, 0.26403782f, 0.16931380f, + 0.33026662f, 0.19400671f, -0.29288185f, 0.02142064f, 0.21062675f, + 0.24769826f, 0.03147685f, 0.11760709f, 0.06475239f, 0.39651752f, + 0.31142113f, -0.06190352f, 0.27480012f, -0.00000000f, -0.06768706f, + 0.01405350f, -0.27754796f, 0.26855540f, 0.35912377f, -0.15847965f, + -0.25381473f, 0.31659684f, -0.22538505f, -0.00000000f, 0.22495720f, + 0.38126811f, 0.20756511f, 0.22574173f, -0.20131923f, 0.34808004f, + -0.00000000f, 0.04633600f, -0.00000000f, -0.03388725f, -0.07852449f, + 0.10161045f, 0.12342227f, 0.34875944f, 0.32209206f, -0.03032017f, + 0.03736033f, -0.12708460f, 0.04099160f, 0.13092107f, 0.24321443f, + -0.11383172f, 0.01404678f, -0.24278225f, 0.04163255f, -0.00000000f, + -0.08584987f, 0.16857363f, -0.00466540f, -0.26462397f, 0.29871586f, + 0.18191136f, -0.22283113f, 0.23185433f, 0.29232043f, 0.00000000f, + -0.19258761f, 0.11264820f, 0.20498016f, -0.25118411f, 0.30700347f, + -0.20835221f, 0.23563565f, 0.32885551f, 0.31249049f, 0.35326713f, + -0.14666882f, -0.11562691f, -0.28928092f, -0.27773494f, 0.00137303f, + -0.14873852f, 0.23494232f, -0.00000000f, -0.43436420f, 0.02467253f, + -0.30128944f, 0.32237938f, -0.12204118f, -0.07711070f, -0.19190203f, + 0.12630360f, 0.31854418f, 0.00000000f, -0.31889951f, 0.39980945f, + -0.27711308f, -0.26207155f, -0.30743197f, -0.05294575f, 0.00000000f, + 0.32247630f, -0.00000000f, 0.34703195f, -0.09090772f, -0.27405322f, + 0.09204038f, 0.00023931f, -0.14841539f, 0.36054596f, 0.32823789f, + 0.04308511f, 0.35351622f, -0.12910736f, 0.35779697f, -0.14171703f, + -0.23420265f, 0.21017072f, 0.16553530f, -0.00000000f, -0.14376362f, + -0.11007029f, -0.26512909f, -0.15537997f, 0.14459264f, 0.23193868f, + -0.33573720f, -0.00893580f, 0.01167462f, -0.00000000f, 0.21242066f, + 0.15906155f, 0.18343815f, -0.33242950f, 0.13339308f, -0.27807033f, + 0.28424773f, 0.15092510f, -0.20413595f, -0.18280955f, -0.07586832f, + -0.17734566f, -0.22223534f, -0.34829277f, -0.31394732f, -0.16699384f, + 0.17257784f, -0.00000000f, -0.02730042f, 0.16407742f, -0.47734028f, + 0.18622851f, -0.26289883f, -0.12923788f, -0.01218586f, -0.01679861f, + 0.24541989f, -0.00000000f, -0.26862550f, -0.18903863f, -0.22312468f, + -0.29081032f, 0.00456320f, -0.40729204f, 0.00000000f, 0.13196681f, + -0.00000000f, 0.21115622f, 0.10681602f, -0.30348134f, 0.14488058f, + -0.25472260f, -0.08940674f, 0.21973740f, 0.22560373f, 0.29306945f, + 0.18129934f, -0.27290490f, 0.14382726f, 0.24323992f, -0.04124852f, + 0.15001738f, 0.18757772f, 0.00000000f, -0.06627958f, -0.07006283f, + 0.01107151f, -0.06157176f, 0.13072795f, -0.03867357f, 0.20099187f, + -0.04672687f, -0.27571774f, -0.00000000f, -0.08904406f, -0.00463693f, + -0.24597459f, 0.31138906f, 0.02908996f, 0.43521091f, -0.34163281f, + -0.13169816f, 0.19368283f, 0.28094319f, 0.36411926f, 0.24974325f, + 0.39069754f, 0.36940941f, 0.29111794f, 0.36833477f, -0.10119212f, + -0.00000000f, 0.30825713f, -0.02892670f, 0.02139978f, -0.06679162f, + 0.29047844f, 0.30286273f, 0.27490154f, 0.25309107f, -0.37665623f, + -0.00000000f, 0.34711525f, 0.34748250f, 0.40816221f, 0.29980871f, + 0.23774059f, 0.28584719f, -0.00000000f, -0.09997464f, 0.00000000f, + -0.17037058f, 0.03537432f, 0.41606435f, -0.09365807f, 0.29218724f, + 0.36034128f, -0.20899616f, -0.15323599f, -0.26791182f, -0.27926028f, + 0.41002706f, -0.02763459f, -0.08456639f, 0.25634816f, -0.16739233f, + -0.12804469f, -0.00000000f, 0.28198770f, 0.36315435f, 0.14708559f, + 0.27866119f, -0.11576169f, 0.27461407f, -0.01359201f, 0.20873266f, + 0.30114710f, 0.00000000f, 0.20710085f, -0.01220956f, -0.15378073f, + -0.04346196f, -0.16036308f, 0.32248008f, 0.17056115f, -0.07647935f, + 0.12685551f, -0.24537927f, 0.25361210f, 0.23519339f, 0.19275606f, + 0.21006991f, 0.15067030f, 0.26796770f, -0.22923294f, -0.00000000f, + 0.26195905f, -0.17579453f, 0.47907874f, -0.20790312f, 0.09814245f, + 0.28936547f, 0.22429268f, 0.11851745f, -0.05968940f, -0.00000000f, + 0.26432082f, -0.17695525f, 0.07208408f, -0.14866284f, 0.23157033f, + 0.00868196f, 0.00000000f, 0.19032617f, 0.00000000f, -0.04557545f, + 0.16048199f, 0.28029424f, -0.21217856f, -0.14218816f, 0.10607687f, + -0.17015687f, -0.17848000f, -0.22106594f, -0.31871516f, 0.11251987f, + -0.21056893f, -0.01078551f, 0.17152087f, 0.19707890f, -0.18206190f, + 0.00000000f, 0.22009347f, 0.25618964f, 0.13012587f, 0.23439160f, + -0.23774339f, 0.27339706f, 0.08488537f, 0.23062859f, -0.06093979f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.05569947f, + 0.06907591f, -0.27896500f, 0.42780888f, -0.09518413f, 0.34889883f, + -0.07495646f, 0.01176149f, -0.09518316f, 0.04845729f, 0.15282904f, + 0.27578905f, 0.32825503f, 0.34666622f, 0.34186339f, 0.21314222f, + -0.24137187f, -0.00000000f, 0.36340517f, -0.00145868f, 0.30205798f, + -0.24647102f, 0.21948737f, 0.31400689f, 0.36826536f, 0.30622044f, + -0.27997312f, -0.00000000f, 0.32137173f, -0.23177922f, 0.37320665f, + 0.42523396f, 0.24398878f, 0.26055664f, -0.00000000f, 0.04238036f, + 0.00000000f, -0.25485480f, 0.28887337f, 0.37973094f, -0.17287837f, + 0.30149969f, 0.18158403f, -0.28251585f, -0.09324098f, -0.10148137f, + -0.26994133f, 0.29208526f, -0.12016132f, 0.13670294f, 0.33937576f, + -0.01807382f, -0.11840399f, 0.00000000f, 0.22757140f, 0.15606458f, + 0.35635790f, 0.36790398f, -0.24827451f, 0.14861245f, 0.29941985f, + 0.26286396f, 0.26387343f, -0.00000000f, -0.05878951f, 0.22127795f, + 0.27171075f, 0.08227993f, 0.34218127f, -0.29908791f, 0.03085584f, + 0.30748802f, -0.30044425f, 0.08890658f, -0.11833450f, -0.34383532f, + -0.18144789f, -0.25031561f, -0.35223338f, -0.35517809f, 0.22522910f, + -0.00000000f, -0.17064114f, 0.39045563f, -0.41225633f, 0.14917889f, + -0.12921241f, -0.15412150f, -0.12774542f, -0.02176888f, 0.12467778f, + 0.00000000f, -0.19532463f, -0.00407638f, -0.00380522f, 0.17785616f, + -0.25407454f, -0.19800967f, 0.00000000f, 0.18710685f, -0.00000000f, + 0.16075020f, 0.11833325f, -0.27719808f, 0.14650719f, 0.07182379f, + -0.05366596f, 0.18595229f, 0.30965197f, 0.29914355f, 0.32847738f, + -0.10680369f, 0.12558983f, 0.18911994f, 0.16338190f, -0.05372420f, + 0.22890729f, 0.00000000f, -0.27748275f, -0.21373950f, 0.01925720f, + -0.17254481f, 0.15890168f, -0.36104938f, 0.21342900f, -0.24207939f, + 0.09008306f, -0.00000000f, 0.23550718f, 0.21950352f, 0.30664194f, + -0.43540928f, 0.09327510f, -0.34191728f, 0.34860089f, 0.28607902f, + -0.20826104f, -0.36973956f, -0.37014699f, -0.25818667f, -0.39138553f, + -0.35685602f, -0.43188858f, -0.32495135f, 0.13134208f, 0.00000000f, + -0.31888548f, 0.19333702f, 0.02409006f, 0.13346194f, -0.23311749f, + -0.29465193f, -0.28950009f, -0.20321468f, 0.19735318f, -0.00000000f, + -0.38954711f, -0.37045032f, -0.37817153f, -0.46626839f, -0.34275806f, + -0.42176893f, -0.00000000f, 0.17399667f, -0.00000000f, 0.20671019f, + 0.28258145f, -0.41657916f, 0.10590364f, -0.25185528f, -0.25371686f, + 0.16661496f, 0.36954275f, 0.27643538f, 0.36886689f, -0.37699988f, + 0.10076499f, 0.12020172f, -0.04946400f, 0.21755500f, 0.29279250f, + -0.00000000f, -0.24924700f, -0.41022563f, 0.11093657f, -0.30358490f, + 0.25061101f, -0.09681442f, 0.06364737f, -0.35496244f, -0.45676079f, + 0.00000000f, -0.17664973f, 0.13684939f, 0.16770627f, 0.06583792f, + 0.29579744f, -0.22803797f, -0.07781243f, 0.21892729f, 0.19324617f, + 0.24781290f, -0.26178414f, -0.20913938f, -0.19111991f, 0.00009437f, + 0.07360306f, -0.23496865f, 0.14322239f, 0.00000000f, -0.24603149f, + 0.20474184f, -0.42358628f, 0.16970679f, -0.03791375f, -0.10963988f, + -0.13925005f, 0.16687638f, 0.19595701f, 0.00000000f, -0.24716993f, + 0.24261610f, -0.16374896f, 0.06111481f, -0.11147401f, 0.19753183f, + 0.00000000f, 0.28984475f, -0.00000000f, 0.21993329f, -0.04273589f, + -0.23788370f, 0.12327813f, 0.27720210f, -0.06552029f, 0.23284473f, + 0.15505412f, 0.08601213f, 0.28648618f, -0.07123960f, 0.24260338f, + -0.08601615f, -0.01827366f, 0.05545068f, 0.22726020f, -0.00000000f, + -0.17114788f, -0.26432920f, -0.10552754f, -0.23397034f, 0.32505965f, + -0.00264310f, -0.24861892f, -0.13497403f, 0.16192129f, 0.00000000f, + 0.20437808f, 0.29010400f, 0.10171671f, -0.39552933f, 0.00800619f, + -0.35053715f, 0.46411553f, 0.07872590f, -0.25373554f, -0.34842137f, + -0.16944158f, -0.29934883f, -0.37081963f, -0.45767376f, -0.42685136f, + -0.31498703f, 0.30061558f, -0.00000000f, -0.26682854f, 0.26608905f, + 0.00986124f, 0.16646899f, -0.30354804f, -0.36250564f, -0.23712766f, + -0.08046419f, 0.42928681f, 0.00000000f, -0.40501967f, -0.35994536f, + -0.33719671f, -0.40238690f, -0.22933462f, -0.25365788f, 0.00000000f, + 0.25826642f, 0.00000000f, 0.25398898f, 0.20715702f, -0.40681186f, + 0.28785828f, -0.39292991f, -0.25549501f, 0.33327377f, 0.34809110f, + 0.33408490f, 0.30801970f, -0.33711329f, 0.21778686f, 0.20447984f, + -0.14770623f, 0.29118595f, 0.12609763f, 0.00000000f, -0.31568047f, + -0.34930527f, 0.15383181f, -0.03949777f, 0.14880499f, -0.26342317f, + 0.21166025f, -0.26840779f, -0.40956807f, 0.00000000f, -0.00204527f, + 0.02735887f, -0.30006149f, 0.32290372f, -0.16705897f, 0.34655207f, + -0.10301089f, -0.07754418f, 0.18783134f, 0.19437505f, 0.32395050f, + 0.24700812f, 0.33365726f, 0.29055712f, 0.29207730f, 0.36227098f, + -0.18677557f, -0.00000000f, 0.28996137f, 0.04649902f, 0.27285215f, + -0.21543109f, 0.25294793f, 0.36992490f, 0.18544559f, 0.38035193f, + -0.16055748f, -0.00000000f, 0.22554907f, 0.16096617f, 0.36809224f, + 0.29568008f, 0.20004115f, 0.33168995f, -0.00000000f, 0.13129337f, + 0.00000000f, -0.11761655f, 0.20445409f, 0.39878458f, -0.11119441f, + 0.30695763f, 0.25857431f, -0.34149739f, -0.30576420f, -0.25491744f, + -0.22647747f, 0.33111930f, -0.28260636f, -0.02112951f, 0.20345563f, + 0.09200975f, -0.21090922f, 0.00000000f, 0.36004162f, 0.15144879f, + 0.33713689f, 0.18079522f, -0.22025944f, 0.24174914f, 0.09591800f, + 0.16491073f, 0.36423230f, -0.00000000f, 0.10661111f, 0.16903128f, + 0.13139343f, -0.46492830f, 0.19054085f, -0.37930626f, 0.33219948f, + 0.23591928f, -0.23410593f, -0.22365217f, -0.31048504f, -0.36255336f, + -0.31747428f, -0.39152670f, -0.26662147f, -0.30413687f, 0.18713741f, + 0.00000000f, -0.30633876f, 0.32250062f, -0.23394385f, 0.35119221f, + -0.18653491f, -0.36635265f, -0.16248502f, -0.07916050f, 0.20202848f, + -0.00000000f, -0.41633093f, -0.21909748f, -0.29012617f, -0.27820775f, + -0.12631547f, -0.47342074f, 0.00000000f, 0.21649295f, -0.00000000f, + 0.34760311f, 0.26350325f, -0.36375305f, 0.27047879f, -0.18158264f, + -0.27374983f, 0.31895113f, 0.41053665f, 0.31095767f, 0.30198845f, + -0.29076493f, 0.26480886f, 0.24022180f, -0.03409769f, 0.32897681f, + 0.34639847f, 0.00000000f, -0.29371312f, -0.23444685f, 0.04979870f, + -0.25437295f, 0.24826451f, -0.28205243f, 0.23044102f, -0.22612344f, + -0.29446504f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, 0.08529438f, -0.17595892f, -0.05010222f, -0.09771085f, + -0.00280371f, 0.17909965f, -0.05012424f, 0.15440951f, 0.46256760f, + 0.20411389f, 0.35080811f, 0.23007728f, 0.23234789f, 0.21768329f, + 0.42391470f, 0.25311920f, -0.34626120f, -0.00000000f, 0.19921157f, + -0.32829115f, 0.41098610f, -0.26202494f, 0.14062279f, 0.41974840f, + 0.26559430f, 0.11181462f, -0.27557141f, 0.00000000f, 0.33423704f, + 0.46971685f, -0.03428174f, 0.02883739f, 0.33898428f, 0.35299250f, + 0.00000000f, 0.31935674f, -0.00000000f, -0.14935251f, 0.08497789f, + 0.26414737f, -0.11812499f, 0.09636883f, 0.29249164f, -0.07621907f, + -0.39568302f, -0.39440766f, 0.03087756f, 0.15723707f, 0.01587318f, + -0.26412717f, -0.03863241f, 0.36250877f, -0.17527536f, -0.00000000f, + 0.23142926f, 0.34270167f, 0.06595954f, 0.23582047f, -0.20216195f, + 0.41851735f, -0.35342419f, 0.25808880f, 0.13896437f, -0.00000000f, + -0.12155695f, -0.03841317f, -0.23941335f, 0.33742121f, -0.08798193f, + 0.28086439f, -0.24967465f, -0.09162057f, 0.07595509f, 0.19977686f, + 0.39792213f, 0.33478746f, 0.37311992f, 0.44618455f, 0.31966513f, + 0.25841814f, -0.18187632f, 0.00000000f, 0.41955575f, 0.09323823f, + 0.04947830f, -0.13836706f, 0.30110985f, 0.28356725f, 0.27363563f, + 0.18721613f, -0.19213678f, 0.00000000f, 0.33936572f, 0.30225420f, + 0.38904536f, 0.28481859f, 0.25270742f, 0.37585616f, -0.00000000f, + -0.06374336f, -0.00000000f, -0.30100450f, 0.21550746f, 0.37626794f, + -0.06943347f, 0.40625402f, 0.25173610f, -0.18700016f, -0.24568258f, + -0.17270026f, -0.36349472f, 0.39126655f, -0.09575093f, 0.02679576f, + 0.32257581f, -0.11642990f, -0.02610820f, -0.00000000f, 0.29856315f, + 0.25245890f, 0.25568327f, 0.25807756f, -0.24594375f, 0.15240541f, + 0.15459496f, 0.26401892f, 0.43030772f, -0.00000000f, -0.00000000f, + 0.03451555f, -0.03302632f, 0.00000000f, 0.00000000f, 0.00957633f, + -0.00002194f, -0.01760937f, -0.00000000f, 0.00000008f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, 0.00816843f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.04534845f, 0.01548957f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, 0.03988186f, + -0.01232415f, -0.00000000f, 0.00010873f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000065f, -0.00062192f, 0.00000000f, -0.09053575f, + 0.00000000f, 0.00354282f, -0.07502786f, -0.00000000f, -0.04615397f, + 0.00000000f, -0.00000000f, 0.06959685f, -0.00000000f, 0.00000000f, + -0.00000000f, 0.00000000f, 0.01667577f, 0.00000000f, 0.00097898f, + -0.01610869f, 0.00807391f, 0.00000000f, -0.00000000f, 0.00000000f, + 0.01619381f, 0.00117383f, 0.01254043f, 0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.19522537f, -0.02299415f, + -0.21713254f, 0.37909052f, -0.04719403f, 0.41889289f, -0.31521663f, + -0.12163494f, 0.21521960f, 0.30252245f, 0.34025303f, 0.40600467f, + 0.45399049f, 0.40102518f, 0.40920046f, 0.44750616f, -0.07408064f, + 0.00000000f, 0.35160145f, -0.06914366f, 0.11185906f, -0.07974522f, + 0.37594408f, 0.36570659f, 0.31409350f, 0.22036555f, -0.31358477f, + 0.00000000f, 0.45113409f, 0.26149124f, 0.40712464f, 0.38837880f, + 0.28701621f, 0.41067114f, 0.00000000f, -0.03458394f, -0.00000000f, + -0.24122165f, 0.03968453f, 0.42860493f, -0.10699430f, 0.37858742f, + 0.32414109f, -0.25721782f, -0.17810744f, -0.25217345f, -0.23088929f, + 0.41102070f, -0.04968627f, -0.09815936f, 0.24246699f, -0.18198122f, + -0.13321972f, -0.00000000f, 0.32654035f, 0.34445235f, 0.15303321f, + 0.30420911f, -0.15753138f, 0.21010973f, -0.02224855f, 0.30371770f, + 0.36747998f, -0.00000000f, 0.37120762f, 0.24076121f, 0.29757783f, + -0.32440603f, 0.22207314f, -0.35253158f, 0.38127521f, 0.22210738f, + -0.21540748f, -0.17317447f, -0.30021846f, -0.30278581f, -0.38852364f, + -0.40112433f, -0.40711007f, -0.35233614f, 0.29270366f, -0.00000000f, + -0.41625890f, 0.17731518f, 0.14187166f, 0.23042144f, -0.29459044f, + -0.34160912f, -0.21315895f, -0.08823593f, 0.44306818f, 0.00000000f, + -0.34337282f, -0.44146624f, -0.38114834f, -0.33119491f, -0.34702790f, + -0.34938616f, -0.00000000f, 0.10531045f, -0.00000000f, 0.22860642f, + 0.12719914f, -0.41955036f, 0.26227525f, -0.37322310f, -0.21503469f, + 0.36908233f, 0.26832482f, 0.31324416f, 0.21359870f, -0.37138340f, + 0.14671545f, 0.13597892f, -0.09427991f, 0.27692327f, 0.10863744f, + -0.00000000f, -0.25862765f, -0.39936492f, -0.00735657f, -0.20700768f, + 0.11925972f, -0.23973027f, 0.08878148f, -0.33071980f, -0.43595594f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000000f, 0.00000000f, + 0.20544417f, 0.04127026f, -0.24050681f, -0.16384913f, -0.21449083f, + 0.27248955f, 0.24937125f, -0.03199057f, 0.13086970f, -0.25318435f, + 0.32933304f, 0.28198311f, 0.22586827f, 0.08224676f, 0.22538981f, + 0.23745839f, -0.20746347f, -0.00000000f, 0.32413775f, -0.21262121f, + 0.45425889f, -0.12649871f, 0.05415213f, 0.34152469f, 0.16606748f, + 0.08969608f, -0.08859382f, -0.00000000f, 0.22986028f, -0.21438792f, + 0.06049296f, -0.24604860f, 0.34206387f, -0.04933317f, -0.00000000f, + 0.20686866f, 0.00000000f, -0.08185939f, 0.29214573f, 0.29070055f, + -0.31032151f, -0.10469076f, 0.16815951f, -0.29302225f, -0.33373737f, + -0.31377661f, -0.37630567f, 0.10517856f, -0.23865287f, -0.01526240f, + 0.02613574f, 0.10962481f, -0.20096326f, 0.00000000f, 0.24057062f, + 0.26935604f, 0.22800960f, 0.25461003f, -0.15117922f, 0.23761362f, + 0.07147257f, 0.24557301f, -0.10529563f, -0.00000000f, -0.00407480f, + 0.25932944f, 0.15170403f, -0.25274429f, 0.17532983f, -0.39356512f, + 0.35107824f, 0.31007785f, -0.25303054f, -0.09892780f, -0.23414730f, + -0.30061692f, -0.29597634f, -0.41358048f, -0.34320116f, -0.28926364f, + 0.17298470f, 0.00000000f, -0.31694153f, 0.28323290f, -0.24462080f, + 0.17520711f, -0.34751767f, -0.33944973f, -0.16863929f, -0.14927740f, + 0.39327934f, 0.00000001f, -0.20827074f, -0.20114207f, -0.29600626f, + -0.30617407f, -0.26884538f, -0.42398688f, 0.00000000f, 0.26090416f, + 0.00000000f, 0.34301850f, 0.27230400f, -0.36774510f, 0.28871563f, + -0.16234703f, -0.21699859f, 0.12816744f, 0.36724362f, 0.35328934f, + 0.22666287f, -0.29497468f, 0.32472947f, 0.23375665f, -0.04644899f, + 0.29202363f, 0.23056987f, 0.00000000f, -0.32396433f, -0.32133523f, + -0.04044373f, -0.21997941f, 0.28305024f, -0.25239739f, 0.21189818f, + -0.21905866f, -0.31879547f, -0.00000000f, -0.20875391f, 0.25579193f, + 0.08885533f, 0.25070626f, 0.28531775f, 0.23910286f, -0.20132478f, + -0.03094750f, -0.09903910f, 0.41670415f, 0.02617790f, -0.01894038f, + 0.07446875f, 0.26129487f, 0.32152766f, -0.00381315f, 0.33921224f, + 0.00000000f, 0.16163504f, 0.15488204f, -0.53111553f, 0.23432511f, + 0.31027034f, -0.16129665f, 0.02252920f, 0.27968806f, -0.30660665f, + -0.00000000f, 0.17379606f, 0.28820875f, 0.28317216f, 0.33171281f, + -0.22639734f, 0.16611721f, 0.00000000f, -0.10581992f, -0.00000000f, + -0.05650841f, -0.05632062f, 0.16483332f, 0.27402487f, 0.41852504f, + 0.30239588f, -0.13344260f, 0.23068543f, 0.14295983f, -0.06514889f, + 0.14602506f, 0.23913534f, 0.05065050f, 0.21470791f, -0.27825022f, + 0.09840839f, -0.00000000f, -0.21546313f, 0.16978884f, 0.17019457f, + -0.04448588f, 0.10237440f, -0.17820019f, 0.10145401f, -0.05723128f, + 0.27103072f, -0.00000000f, -0.25616100f, 0.11087517f, -0.28679743f, + 0.38333085f, 0.02846761f, 0.47659227f, -0.34625816f, -0.22185668f, + 0.09659167f, 0.33499712f, 0.37174940f, 0.33994293f, 0.42175066f, + 0.45723584f, 0.30100539f, 0.33555841f, -0.05676946f, 0.00000000f, + 0.33456475f, 0.05740290f, -0.27988750f, -0.16358745f, 0.34159577f, + 0.24731696f, 0.34163257f, 0.32468295f, -0.40202236f, 0.00000000f, + 0.21462469f, 0.27455148f, 0.39669952f, 0.38652912f, 0.32479095f, + 0.43467444f, 0.00000000f, -0.05740976f, 0.00000000f, -0.12069687f, + 0.10211547f, 0.41648698f, -0.14969528f, 0.26589021f, 0.34505075f, + -0.27355105f, -0.10083112f, -0.21730775f, -0.33541003f, 0.37365708f, + -0.10389762f, -0.01552837f, 0.32270244f, -0.35057241f, -0.16219763f, + 0.00000000f, 0.34974799f, 0.24404465f, 0.07819116f, 0.33059308f, + -0.21748666f, 0.13390915f, 0.07922500f, 0.26801270f, 0.35529053f, + -0.00000000f, 0.00000000f, -0.00003041f, -0.00000012f, -0.00000004f, + -0.00005929f, -0.00000000f, 0.00000000f, -0.00006686f, -0.00000000f, + -0.00000166f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000009f, + -0.00000045f, -0.00000000f, -0.00000006f, -0.00000000f, -0.00000000f, + -0.00000254f, 0.00000000f, -0.00000086f, -0.00000000f, -0.00000001f, + -0.00000000f, 0.00000451f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000005f, -0.00000000f, -0.00000000f, -0.00000000f, -0.00000183f, + 0.00000000f, -0.00058576f, 0.00000000f, -0.00000002f, -0.00002377f, + -0.00000000f, -0.00000006f, -0.00000931f, -0.00000173f, -0.00000000f, + -0.00000001f, -0.00000000f, -0.00000000f, 0.00000000f, -0.00002197f, + -0.00000000f, -0.00000020f, -0.00000000f, -0.00000000f, 0.00000000f, + -0.00000000f, -0.00000000f, -0.00000001f, 0.00000000f, -0.00000118f, + -0.00000000f, -0.00000000f, -0.00000000f, -0.00000111f, -0.00000000f, + -0.00280933f, -0.01970681f, -0.03325123f, -0.05753263f, 0.00000000f, + 0.03404333f, 0.03393129f, -0.05733723f, -0.00000000f, 0.00022534f, + 0.00018876f, -0.00000000f, 0.00000000f, 0.01230035f, -0.02996583f, + 0.00000000f, 0.02138031f, -0.00000000f, -0.00004800f, 0.01687740f, + 0.00526351f, -0.00236151f, -0.02526200f, 0.00652498f, -0.00122047f, + -0.06806025f, -0.03424972f, 0.00000000f, -0.02769613f, 0.01901360f, + -0.00000000f, -0.00006220f, -0.01819859f, -0.01526501f, -0.00000000f, + -0.07969155f, 0.00000000f, 0.03332415f, -0.07555190f, -0.00000000f, + -0.00481823f, -0.00000003f, -0.00339012f, -0.04079270f, -0.00000001f, + -0.00000000f, -0.00000000f, 0.00000000f, -0.08764525f, -0.00000000f, + 0.01951350f, 0.01234390f, -0.02331145f, 0.00000000f, -0.00319909f, + 0.02517195f, 0.00399085f, 0.00653576f, -0.05225201f, 0.04373496f, + 0.00000000f, -0.00003963f, 0.00000000f, +}; + +/* net.2.bias shape=[32] */ +static const float kf_b1[32] = { + -0.00000000f, 0.19831654f, -0.00000000f, 0.13575056f, 0.00000000f, + 0.24168548f, 0.17239006f, -0.03495844f, 0.15820183f, 0.04373357f, + 0.00000000f, -0.00000000f, 0.15034659f, 0.21151891f, -0.00139010f, + 0.13107549f, -0.04188872f, 0.18401425f, 0.08022061f, -0.00000000f, + 0.22026978f, 0.22237730f, 0.01070686f, 0.15843473f, 0.01765380f, + -0.00000000f, 0.09775762f, 0.13819563f, 0.17609084f, 0.25333014f, + -0.00187043f, 0.07947995f, +}; + +/* net.4.weight shape=[4, 32] */ +static const float kf_w2[128] = { + 0.00000003f, 0.28052181f, -0.00000000f, 0.15051171f, -0.00000043f, + -0.36880949f, -0.33373839f, -0.37120891f, 0.34672841f, 0.35945946f, + -0.00000072f, -0.00000000f, 0.35918972f, -0.40998372f, -0.17214386f, + -0.38508174f, -0.22501409f, 0.30296177f, -0.29385334f, 0.00000000f, + 0.33458918f, 0.36632687f, 0.00713974f, 0.37028390f, -0.28515628f, + -0.00000000f, 0.40578640f, -0.37444100f, -0.38164923f, 0.24415448f, + -0.00000000f, 0.02557430f, 0.00000057f, 0.38616702f, 0.00000003f, + 0.02033803f, -0.00000000f, 0.46998218f, 0.35550645f, -0.27789479f, + 0.35600835f, -0.29440251f, -0.00000000f, -0.00000002f, -0.11558559f, + -0.07866519f, -0.43894646f, 0.32195869f, -0.52386713f, -0.03157207f, + -0.36979708f, 0.00000000f, 0.32477206f, 0.25358054f, -0.00338123f, + 0.34066647f, -0.49772608f, -0.00000000f, -0.32423097f, -0.36482462f, + 0.29437792f, 0.33178380f, -0.00000000f, -0.07299196f, 0.00000000f, + 0.35917881f, 0.00000000f, 0.16631033f, -0.00000000f, 0.21235703f, + -0.31104434f, -0.08806990f, 0.39660275f, -0.33806035f, -0.00000000f, + -0.00000000f, 0.23905882f, 0.19473125f, -0.51309478f, 0.01356219f, + -0.24631551f, 0.03046135f, -0.19502313f, -0.00000000f, -0.44310683f, + 0.46135616f, 0.00001273f, 0.35062221f, -0.57078069f, 0.00000000f, + -0.37886310f, -0.18659690f, 0.51070136f, 0.51827151f, 0.00000598f, + -0.08181453f, 0.00000000f, -0.45865950f, -0.00000000f, -0.60478181f, + 0.00000000f, -0.25012982f, 0.31877875f, 0.40828240f, -0.49322826f, + -0.22537722f, -0.00000000f, -0.00000000f, -0.43637875f, 0.24172077f, + 0.51489693f, 0.19513592f, 0.46384546f, -0.56435233f, 0.41478279f, + 0.00000000f, -0.39774299f, -0.40908477f, -0.00000879f, -0.47654191f, + 0.39290428f, -0.00000003f, -0.17826343f, 0.47650301f, -0.24373116f, + -0.44740298f, 0.00000172f, 0.02739984f, +}; + +/* net.4.bias shape=[4] */ +static const float kf_b2[4] = { + 0.06628525f, + -0.06710004f, + -0.09710687f, + -0.11290303f, +}; + +/* Total parameters: 4708 */ +#endif // AV2_ENCODER_PARTITION_MLP_KF_WEIGHTS_H_ diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index 748cca2afa..84efd0ad76 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -15,6 +15,8 @@ #include "av2/common/bru.h" #include "avm_ports/avm_timer.h" +#include "av2/encoder/partition_mlp.h" + #include "av2/common/av2_common_int.h" #include "av2/common/blockd.h" #include "av2/common/common_data.h" @@ -5832,6 +5834,58 @@ bool av2_rd_pick_partition( none_rd, &part_none_rd, &level_banks, ptree_luma); } + // Rectangular partitions search stage. + // Run the partition MLP on all eligible blocks (both dims >= 32px) and + // prune the less-likely rect direction when it confidently predicts NONE. + // Skip during retry pass to avoid infinite loop if pruning is enabled. + if (cpi->sf.part_sf.partition_pruning_with_mlp && + part_search_state.partition_allowed[PARTITION_NONE] && + part_search_state.forced_partition == PARTITION_INVALID && + block_size_wide[bsize] >= 32 && block_size_high[bsize] >= 32 && + bsize <= BLOCK_256X256 && !x->must_find_valid_partition) { + if (pb_source_variance == UINT_MAX) { + av2_setup_src_planes(x, cpi->source, mi_row, mi_col, num_planes, NULL); + pb_source_variance = av2_high_get_sby_perpixel_variance( + cpi, &x->plane[0].src, bsize, xd->bd); + } + const int above_part = xd->above_mbmi ? (int)xd->above_mbmi->partition : -1; + const int left_part = xd->left_mbmi ? (int)xd->left_mbmi->partition : -1; + const int is_intra = frame_is_intra_only(cm) ? 1 : 0; + const int bw = + (xd->mb_to_right_edge >= 0) + ? block_size_wide[bsize] + : block_size_wide[bsize] + (xd->mb_to_right_edge - 7) / 8; + const int bh = + (xd->mb_to_bottom_edge >= 0) + ? block_size_high[bsize] + : block_size_high[bsize] + (xd->mb_to_bottom_edge - 7) / 8; + // logits[i] is the raw (pre-softmax) score for partition class i: + // 0=NONE, 1=HORZ, 2=VERT, 3=SPLIT (matching PART_MLP_* constants). + float logits[4]; + const int pred = av2_partition_mlp_predict( + x->plane[0].src.buf, x->plane[0].src.stride, bw, bh, (int)bsize, + cm->quant_params.base_qindex - MAXQ_OFFSET * (xd->bd - 8), + pb_source_variance, part_search_state.none_rd, above_part, left_part, + is_intra, logits); + + if (pred == PART_MLP_NONE) { + const float none_thresh = + cpi->sf.part_sf.partition_pruning_with_mlp_none_thresh; + // Prune if the NONE logit exceeds the best non-NONE logit by more than + // none_thresh. This margin measures how decisively the model prefers NONE + // over any other partition type. + float best_non_none_logit = -1e9f; + for (int ci = 0; ci < 4; ci++) + if (ci != PART_MLP_NONE && logits[ci] > best_non_none_logit) + best_non_none_logit = logits[ci]; + if (logits[PART_MLP_NONE] - best_non_none_logit > none_thresh) { + if (logits[PART_MLP_HORZ] < logits[PART_MLP_VERT]) + part_search_state.prune_partition[PARTITION_HORZ] = true; + else + part_search_state.prune_partition[PARTITION_VERT] = true; + } + } + } // Search partition horz and vert. rectangular_partition_search( cpi, td, tile_data, tp, x, pc_tree, &x_ctx, &part_search_state, &best_rdc, diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 3e48360c35..6fe7e4db69 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -403,9 +403,13 @@ static void set_good_speed_features_framesize_independent( // block, prunes when inter-mode ratio exceeds 50%, and early skips when // the current best partitioning is PARTITION_NONE). sf->part_sf.inter_sdp_fast_method_level = 1; + + sf->part_sf.partition_pruning_with_mlp = 1; + sf->part_sf.partition_pruning_with_mlp_none_thresh = 3.5f; } if (speed >= 2) { + sf->part_sf.partition_pruning_with_mlp_none_thresh = 2.5f; sf->part_sf.intra_cnn_split = 0; sf->part_sf.simple_motion_search_early_term_none = 1; // TODO(Venkat): Clean-up frame type dependency for @@ -700,6 +704,8 @@ static AVM_INLINE void init_part_sf(PARTITION_SPEED_FEATURES *part_sf) { part_sf->prune_part_4b_with_part_4a = 0; part_sf->two_pass_partition_search = 0; part_sf->prune_rect_with_ml = 0; + part_sf->partition_pruning_with_mlp = 0; + part_sf->partition_pruning_with_mlp_none_thresh = 0.0f; part_sf->end_part_search_after_consec_failures = 0; part_sf->ext_recur_depth_level = 0; part_sf->uneven_4way_recur_depth_level = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 92e4540637..4b63c19507 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -446,6 +446,14 @@ typedef struct PARTITION_SPEED_FEATURES { int remove_qp_restriction_with_ml; #endif // CONFIG_ML_PART_SPLIT + // Prune rectangular partition search using an MLP that predicts the + // winning partition type (NONE/HORZ/VERT/SPLIT) from block features. + int partition_pruning_with_mlp; + + // Logit margin (winner logit - best non-NONE logit) required to prune rect + // partitions when the MLP predicts NONE. + float partition_pruning_with_mlp_none_thresh; + bool disable_ext_partitions; bool disable_uneven_4way_partitions; } PARTITION_SPEED_FEATURES; diff --git a/test/partition_mlp_test.cc b/test/partition_mlp_test.cc new file mode 100644 index 0000000000..51ca4fc750 --- /dev/null +++ b/test/partition_mlp_test.cc @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2026, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 3-Clause Clear License + * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear + * License was not distributed with this source code in the LICENSE file, you + * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the + * Alliance for Open Media Patent License 1.0 was not distributed with this + * source code in the PATENTS file, you can obtain it at + * aomedia.org/license/patent-license/. + */ + +#include +#include + +#include "third_party/googletest/src/googletest/include/gtest/gtest.h" + +#include "av2/encoder/partition_mlp.h" +#include "av2/common/enums.h" + +namespace { + +class PartitionMlpPredictTest : public ::testing::Test { + protected: + static constexpr int kBw = 32; + static constexpr int kBh = 32; + static constexpr int kStride = kBw; + + std::vector src_buf_ = std::vector(kStride * kBh); +}; + +TEST_F(PartitionMlpPredictTest, ReturnsValidClassIndexForFlatBlock) { + for (int i = 0; i < kStride * kBh; i++) src_buf_[i] = 512; + float logits[4]; + const int pred = av2_partition_mlp_predict( + src_buf_.data(), kStride, kBw, kBh, (int)BLOCK_32X32, 128, /*var=*/0, + /*none_rd=*/-1, /*above_part=*/-1, /*left_part=*/-1, /*is_intra=*/1, + logits); + EXPECT_GE(pred, PART_MLP_NONE); + EXPECT_LE(pred, PART_MLP_SPLIT); + for (int i = 0; i < 4; i++) EXPECT_TRUE(std::isfinite(logits[i])) << i; +} + +TEST_F(PartitionMlpPredictTest, PredictedClassIsArgmaxOfLogits) { + for (int r = 0; r < kBh; r++) + for (int c = 0; c < kBw; c++) + src_buf_[r * kStride + c] = (uint16_t)(r * 4 + c); + float logits[4]; + const int pred = av2_partition_mlp_predict( + src_buf_.data(), kStride, kBw, kBh, (int)BLOCK_32X32, 180, 900, 12345, + PART_MLP_HORZ, PART_MLP_VERT, /*is_intra=*/0, logits); + int expected_argmax = 0; + for (int i = 1; i < 4; i++) + if (logits[i] > logits[expected_argmax]) expected_argmax = i; + EXPECT_EQ(pred, expected_argmax); +} + +TEST_F(PartitionMlpPredictTest, IsDeterministic) { + for (int r = 0; r < kBh; r++) + for (int c = 0; c < kBw; c++) + src_buf_[r * kStride + c] = (uint16_t)((r * 37 + c * 91) % 1024); + float logits_a[4]; + float logits_b[4]; + const int pred_a = av2_partition_mlp_predict(src_buf_.data(), kStride, kBw, + kBh, (int)BLOCK_32X32, 210, 500, + -1, -1, -1, 1, logits_a); + const int pred_b = av2_partition_mlp_predict(src_buf_.data(), kStride, kBw, + kBh, (int)BLOCK_32X32, 210, 500, + -1, -1, -1, 1, logits_b); + EXPECT_EQ(pred_a, pred_b); + for (int i = 0; i < 4; i++) EXPECT_FLOAT_EQ(logits_a[i], logits_b[i]) << i; +} + +TEST_F(PartitionMlpPredictTest, IntraAndInterUseDifferentModels) { + for (int r = 0; r < kBh; r++) + for (int c = 0; c < kBw; c++) + src_buf_[r * kStride + c] = (uint16_t)((r * 53 + c * 17) % 1024); + float logits_kf[4]; + float logits_inter[4]; + av2_partition_mlp_predict(src_buf_.data(), kStride, kBw, kBh, + (int)BLOCK_32X32, 210, 500, -1, -1, -1, + /*is_intra=*/1, logits_kf); + av2_partition_mlp_predict(src_buf_.data(), kStride, kBw, kBh, + (int)BLOCK_32X32, 210, 500, -1, -1, -1, + /*is_intra=*/0, logits_inter); + // KF and inter models have independently trained weights; expect at least + // one logit to differ (a spurious exact match across all 4 would indicate + // the is_intra branch isn't actually selecting different weight tables). + bool any_diff = false; + for (int i = 0; i < 4; i++) + if (logits_kf[i] != logits_inter[i]) any_diff = true; + EXPECT_TRUE(any_diff); +} + +TEST_F(PartitionMlpPredictTest, HandlesNonSquareBlocks) { + const int bw = 64, bh = 32; + std::vector src(bw * bh, 300); + float logits[4]; + const int pred = + av2_partition_mlp_predict(src.data(), bw, bw, bh, (int)BLOCK_64X32, 150, + 100, -1, -1, -1, 1, logits); + EXPECT_GE(pred, PART_MLP_NONE); + EXPECT_LE(pred, PART_MLP_SPLIT); + for (int i = 0; i < 4; i++) EXPECT_TRUE(std::isfinite(logits[i])) << i; +} + +} // namespace diff --git a/test/test.cmake b/test/test.cmake index c87dc301af..20015004b7 100644 --- a/test/test.cmake +++ b/test/test.cmake @@ -208,6 +208,7 @@ if(NOT BUILD_SHARED_LIBS) "${AVM_ROOT}/test/av2_nn_predict_test.cc" "${AVM_ROOT}/test/av2_intra_mlp_layer_test.cc" "${AVM_ROOT}/test/intra_mode_mlp_test.cc" + "${AVM_ROOT}/test/partition_mlp_test.cc" "${AVM_ROOT}/test/av2_wedge_utils_test.cc" "${AVM_ROOT}/test/av2_ccso_simd_cmp.cc" "${AVM_ROOT}/test/blend_a64_mask_1d_test.cc" From 946d6f9cc4c79048f18113cbe46d871533ed3b91 Mon Sep 17 00:00:00 2001 From: Jerome Date: Wed, 29 Jul 2026 13:30:39 -0400 Subject: [PATCH 46/51] Add default speed features for RTC (#5155) --- av2/encoder/rdopt.c | 2 ++ av2/encoder/speed_features.c | 23 ++++++++++++++++++++++- av2/encoder/speed_features.h | 18 +++++++++++++++++- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/av2/encoder/rdopt.c b/av2/encoder/rdopt.c index 5640841233..d26810a387 100644 --- a/av2/encoder/rdopt.c +++ b/av2/encoder/rdopt.c @@ -8620,6 +8620,8 @@ static void av2_evaluate_intra_modes_in_inter_frame( if (!is_intra_mode_allowed) break; for (int mode_idx = INTRA_MODE_START; mode_idx < LUMA_MODE_COUNT; ++mode_idx) { + if (sf->rt_sf.use_only_dc_intra_interframe && mode_idx != DC_PRED) + continue; if (sf->intra_sf.skip_intra_in_interframe && search_state->intra_search_state.skip_intra_modes) break; diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 6fe7e4db69..c90fbdf33e 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -639,6 +639,24 @@ static void set_good_speed_features_framesize_independent( } } +static void set_rt_speed_features_framesize_independent( + const AV2_COMP *const cpi, SPEED_FEATURES *const sf, int speed) { + // Set this good features as default for now. + set_good_speed_features_framesize_independent(cpi, sf, speed); + if (speed >= 6) { + sf->part_sf.partition_search_type = VAR_BASED_PARTITION; + sf->hl_sf.frame_parameter_update = 0; + sf->hl_sf.recode_loop = DISALLOW_RECODE; + sf->lpf_sf.lpf_pick = LPF_PICK_FROM_Q; + sf->lpf_sf.cdef_pick_method = CDEF_PICK_FROM_Q; + sf->rt_sf.use_only_dc_intra_interframe = true; + sf->inter_sf.prune_ref_frames = 0; + sf->mv_sf.search_method = DIAMOND; + sf->winner_mode_sf.tx_size_search_level = USE_LARGESTALL; + sf->rd_sf.tx_domain_dist_thres_level = 2; + } +} + static AVM_INLINE void init_hl_sf(HIGH_LEVEL_SPEED_FEATURES *hl_sf) { // best quality defaults hl_sf->frame_parameter_update = 1; @@ -1131,8 +1149,11 @@ void av2_set_speed_features_framesize_independent(AV2_COMP *cpi, int speed) { init_lpf_sf(&sf->lpf_sf); init_flexmv_sf(&sf->flexmv_sf); - if (oxcf->mode == GOOD) + if (oxcf->mode == GOOD) { set_good_speed_features_framesize_independent(cpi, sf, speed); + } else if (oxcf->mode == REALTIME) { + set_rt_speed_features_framesize_independent(cpi, sf, speed); + } if (!cpi->seq_params_locked) { cpi->common.seq_params.enable_restoration &= !sf->lpf_sf.disable_lr_filter; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index 4b63c19507..ddbca29319 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -180,7 +180,10 @@ enum { SEARCH_PARTITION, // Always use a fixed size partition - FIXED_PARTITION + FIXED_PARTITION, + + // Partition using source variance for realtime mode. + VAR_BASED_PARTITION } UENUM1BYTE(PARTITION_SEARCH_TYPE); enum { @@ -990,6 +993,14 @@ typedef struct LOOP_FILTER_SPEED_FEATURES { int wienerns_refine_iters; } LOOP_FILTER_SPEED_FEATURES; +typedef struct REALTIME_SPEED_FEATURES { + // Use non-rd partition instead of rd partition. + int use_nonrd_partition; + + // Flag to disable all but DC intra mode for inter frame prediction. + bool use_only_dc_intra_interframe; +} REALTIME_SPEED_FEATURES; + typedef struct FLEXMV_PRECISION_SPEED_FEATURES { // Do not search 8-pel precision int do_not_search_8_pel_precision; @@ -1090,6 +1101,11 @@ typedef struct SPEED_FEATURES { */ FLEXMV_PRECISION_SPEED_FEATURES flexmv_sf; + /*! + * Realtime mode speed features: + */ + REALTIME_SPEED_FEATURES rt_sf; + } SPEED_FEATURES; /*!\cond */ From e341b345fc163b5bf381a0f916f4308f18feb5f0 Mon Sep 17 00:00:00 2001 From: Ram Mohan M Date: Tue, 21 Jul 2026 12:35:47 +0530 Subject: [PATCH 47/51] Simplify pc tree recurse functions This change reduces duplicate code in functions that recurse through pc trees. No stats changed --- av2/encoder/context_tree.c | 523 +++++++----------------------- av2/encoder/context_tree.h | 2 + av2/encoder/partition_search.c | 530 ++++--------------------------- av2/encoder/partition_strategy.c | 68 +--- 4 files changed, 188 insertions(+), 935 deletions(-) diff --git a/av2/encoder/context_tree.c b/av2/encoder/context_tree.c index 33fc4420ff..c50cae4f00 100644 --- a/av2/encoder/context_tree.c +++ b/av2/encoder/context_tree.c @@ -20,8 +20,18 @@ static const BLOCK_SIZE square[MAX_SB_SIZE_LOG2 - 1] = { BLOCK_64X64, BLOCK_128X128, BLOCK_256X256, }; -static const int subblock_count[ALL_PARTITION_TYPES] = { 0, 2, 2, 4, 4, - 4, 4, 4, 4, 4 }; +static const int subblock_count[ALL_PARTITION_TYPES] = { + 1, // PARTITION_NONE + 2, // PARTITION_HORZ + 2, // PARTITION_VERT + 4, // PARTITION_HORZ_3 + 4, // PARTITION_VERT_3 + 4, // PARTITION_HORZ_4A + 4, // PARTITION_HORZ_4B + 4, // PARTITION_VERT_4A + 4, // PARTITION_VERT_4B + 4, // PARTITION_SPLIT +}; static const int step_multiplier[ALL_PARTITION_TYPES][4][2] = { { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, // PARTITION_NONE @@ -41,8 +51,12 @@ static const int step_multiplier[ALL_PARTITION_TYPES][4][2] = { PC_TREE *const *get_child_pc_trees(const PC_TREE *pc_tree, PARTITION_TYPE partition, REGION_TYPE region, int *num_sub_parts) { - PC_TREE *const *child_nodes = NULL; + if (partition >= ALL_PARTITION_TYPES) { + assert(0 && "Unexpected partition type"); + return NULL; + } + PC_TREE *const *child_nodes = NULL; switch (partition) { case PARTITION_NONE: break; case PARTITION_HORZ: child_nodes = pc_tree->horizontal[region]; break; @@ -54,25 +68,37 @@ PC_TREE *const *get_child_pc_trees(const PC_TREE *pc_tree, case PARTITION_VERT_4A: child_nodes = pc_tree->vertical4a[region]; break; case PARTITION_VERT_4B: child_nodes = pc_tree->vertical4b[region]; break; case PARTITION_SPLIT: child_nodes = pc_tree->split[region]; break; - default: assert(0 && "Unexpected partition type"); break; } - *num_sub_parts = subblock_count[partition]; + // No child blocks for partition none. + *num_sub_parts = partition == PARTITION_NONE ? 0 : subblock_count[partition]; return child_nodes; } +/*!\brief Returns number of sub blocks for partition_type. */ +int get_subblock_count(PARTITION_TYPE partition_type) { + if (partition_type >= ALL_PARTITION_TYPES) { + assert(0 && "Unexpected partition type"); + return 0; + } + return subblock_count[partition_type]; +} + /*!\brief Computes the layout (coordinates and sizes) of subblocks resulting * from a partition. */ void get_partition_subblock_layout(PARTITION_TYPE partition_type, BLOCK_SIZE bsize, int mi_row, int mi_col, BLOCK_SIZE sub_sizes[4], int mi_rows[4], int mi_cols[4]) { - assert(partition_type <= PARTITION_SPLIT); + if (partition_type >= ALL_PARTITION_TYPES) { + assert(0 && "Unexpected partition type"); + return; + } const int eighth_step_h = block_size_high[bsize] / 8; const int eighth_step_w = block_size_wide[bsize] / 8; const BLOCK_SIZE part_subsize = get_partition_subsize(bsize, partition_type); - for (int sub_idx = 0; sub_idx < subblock_count[partition_type]; ++sub_idx) { + for (int sub_idx = 0; sub_idx < 4; ++sub_idx) { mi_rows[sub_idx] = mi_row + step_multiplier[partition_type][sub_idx][0] * eighth_step_h / 4; mi_cols[sub_idx] = mi_col + step_multiplier[partition_type][sub_idx][1] * @@ -335,30 +361,20 @@ PC_TREE *av2_alloc_pc_tree_node(TREE_TYPE tree_type, int mi_row, int mi_col, parent ? &parent->chroma_ref_info : NULL, parent ? parent->block_size : BLOCK_INVALID, parent_partition, subsampling_x, subsampling_y); - pc_tree->none[INTRA_REGION] = NULL; - pc_tree->none[MIXED_INTER_INTRA_REGION] = NULL; - pc_tree->none_chroma = NULL; - for (REGION_TYPE cur_region_type = INTRA_REGION; cur_region_type < REGION_TYPES; ++cur_region_type) { - for (int i = 0; i < 2; ++i) { - pc_tree->horizontal[cur_region_type][i] = NULL; - pc_tree->vertical[cur_region_type][i] = NULL; - } - for (int i = 0; i < 4; ++i) { - pc_tree->horizontal4a[cur_region_type][i] = NULL; - pc_tree->horizontal4b[cur_region_type][i] = NULL; - pc_tree->vertical4a[cur_region_type][i] = NULL; - pc_tree->vertical4b[cur_region_type][i] = NULL; - } - for (int i = 0; i < 4; ++i) { - pc_tree->horizontal3[cur_region_type][i] = NULL; - pc_tree->vertical3[cur_region_type][i] = NULL; - } - for (int i = 0; i < 4; ++i) { - pc_tree->split[cur_region_type][i] = NULL; + pc_tree->none[cur_region_type] = NULL; + for (PARTITION_TYPE partition_type = PARTITION_HORZ; + partition_type < ALL_PARTITION_TYPES; ++partition_type) { + int num_sub_parts = 0; + PC_TREE **child_nodes = (PC_TREE **)get_child_pc_trees( + pc_tree, partition_type, cur_region_type, &num_sub_parts); + for (int sub_idx = 0; sub_idx < num_sub_parts; ++sub_idx) { + child_nodes[sub_idx] = NULL; + } } } + pc_tree->none_chroma = NULL; return pc_tree; } @@ -385,90 +401,18 @@ void av2_free_pc_tree_recursive(PC_TREE *pc_tree, int num_planes, int keep_best, if (!keep_none && (!keep_best || (partition != PARTITION_NONE))) FREE_PMC_NODE(pc_tree->none[cur_region_type]); - for (int i = 0; i < 2; ++i) { - if ((!keep_best || (partition != PARTITION_HORZ) || - (cur_region_type != pc_tree->region_type)) && - pc_tree->horizontal[cur_region_type][i] != NULL) { - av2_free_pc_tree_recursive(pc_tree->horizontal[cur_region_type][i], - num_planes, 0, 0); - pc_tree->horizontal[cur_region_type][i] = NULL; - } - if ((!keep_best || (partition != PARTITION_VERT) || - (cur_region_type != pc_tree->region_type)) && - pc_tree->vertical[cur_region_type][i] != NULL) { - av2_free_pc_tree_recursive(pc_tree->vertical[cur_region_type][i], - num_planes, 0, 0); - pc_tree->vertical[cur_region_type][i] = NULL; - } - } - - if (!keep_best || (partition != PARTITION_HORZ_4A) || - (cur_region_type != pc_tree->region_type)) { - for (int i = 0; i < 4; ++i) { - if (pc_tree->horizontal4a[cur_region_type][i] != NULL) { - av2_free_pc_tree_recursive(pc_tree->horizontal4a[cur_region_type][i], - num_planes, 0, 0); - pc_tree->horizontal4a[cur_region_type][i] = NULL; - } - } - } - - if (!keep_best || (partition != PARTITION_HORZ_4B) || - (cur_region_type != pc_tree->region_type)) { - for (int i = 0; i < 4; ++i) { - if (pc_tree->horizontal4b[cur_region_type][i] != NULL) { - av2_free_pc_tree_recursive(pc_tree->horizontal4b[cur_region_type][i], - num_planes, 0, 0); - pc_tree->horizontal4b[cur_region_type][i] = NULL; - } - } - } - - if (!keep_best || (partition != PARTITION_VERT_4A) || - (cur_region_type != pc_tree->region_type)) { - for (int i = 0; i < 4; ++i) { - if (pc_tree->vertical4a[cur_region_type][i] != NULL) { - av2_free_pc_tree_recursive(pc_tree->vertical4a[cur_region_type][i], - num_planes, 0, 0); - pc_tree->vertical4a[cur_region_type][i] = NULL; - } - } - } - - if (!keep_best || (partition != PARTITION_VERT_4B) || - (cur_region_type != pc_tree->region_type)) { - for (int i = 0; i < 4; ++i) { - if (pc_tree->vertical4b[cur_region_type][i] != NULL) { - av2_free_pc_tree_recursive(pc_tree->vertical4b[cur_region_type][i], - num_planes, 0, 0); - pc_tree->vertical4b[cur_region_type][i] = NULL; - } - } - } - for (int i = 0; i < 4; ++i) { - if ((!keep_best || (partition != PARTITION_HORZ_3) || - (cur_region_type != pc_tree->region_type)) && - pc_tree->horizontal3[cur_region_type][i] != NULL) { - av2_free_pc_tree_recursive(pc_tree->horizontal3[cur_region_type][i], - num_planes, 0, 0); - pc_tree->horizontal3[cur_region_type][i] = NULL; - } - if ((!keep_best || (partition != PARTITION_VERT_3) || - (cur_region_type != pc_tree->region_type)) && - pc_tree->vertical3[cur_region_type][i] != NULL) { - av2_free_pc_tree_recursive(pc_tree->vertical3[cur_region_type][i], - num_planes, 0, 0); - pc_tree->vertical3[cur_region_type][i] = NULL; - } - } - - if (!keep_best || (partition != PARTITION_SPLIT) || - (cur_region_type != pc_tree->region_type)) { - for (int i = 0; i < 4; ++i) { - if (pc_tree->split[cur_region_type][i] != NULL) { - av2_free_pc_tree_recursive(pc_tree->split[cur_region_type][i], - num_planes, 0, 0); - pc_tree->split[cur_region_type][i] = NULL; + for (PARTITION_TYPE partition_type = PARTITION_HORZ; + partition_type < ALL_PARTITION_TYPES; ++partition_type) { + if (!keep_best || (partition != partition_type) || + (cur_region_type != pc_tree->region_type)) { + int num_sub_parts = 0; + PC_TREE **child_nodes = (PC_TREE **)get_child_pc_trees( + pc_tree, partition_type, cur_region_type, &num_sub_parts); + for (int sub_idx = 0; sub_idx < num_sub_parts; ++sub_idx) { + if (child_nodes[sub_idx] != NULL) { + av2_free_pc_tree_recursive(child_nodes[sub_idx], num_planes, 0, 0); + child_nodes[sub_idx] = NULL; + } } } } @@ -493,7 +437,6 @@ void av2_copy_pc_tree_recursive(MACROBLOCKD *xd, const AV2_COMMON *cm, dst->skippable = src->skippable; const BLOCK_SIZE bsize = dst->block_size; - const BLOCK_SIZE subsize = get_partition_subsize(bsize, src->partitioning); const int mi_row = src->mi_row; const int mi_col = src->mi_col; @@ -510,281 +453,61 @@ void av2_copy_pc_tree_recursive(MACROBLOCKD *xd, const AV2_COMMON *cm, } } - switch (src->partitioning) { - // PARTITION_NONE - case PARTITION_NONE: - if (dst->none[cur_region_type]) - av2_free_pmc(dst->none[cur_region_type], num_planes); - dst->none[cur_region_type] = NULL; - if (src->none[cur_region_type]) { - dst->none[cur_region_type] = av2_alloc_pmc( - cm, - !frame_is_intra_only(cm) && cur_region_type == INTRA_REGION - ? LUMA_PART - : tree_type, - mi_row, mi_col, bsize, dst, PARTITION_NONE, 0, ss_x, ss_y, - shared_bufs); - av2_copy_tree_context(dst->none[cur_region_type], - src->none[cur_region_type], num_planes); - if (is_inter_block(&src->none[cur_region_type]->mic, xd->tree_type)) { - xd->mi_row = mi_row; - xd->mi_col = mi_col; - av2_update_warp_param_bank(cm, xd, 0, - &dst->none[cur_region_type]->mic); - if (cm->seq_params.enable_refmvbank) { - av2_update_ref_mv_bank(cm, xd, 1, &dst->none[cur_region_type]->mic); - } - } else { - xd->mi_row = mi_row; - xd->mi_col = mi_col; - decide_rmb_unit_update_count(cm, xd, - &dst->none[cur_region_type]->mic); - } - } - break; - // PARTITION_SPLIT - case PARTITION_SPLIT: - if (is_partition_valid(bsize, PARTITION_SPLIT)) { - for (int i = 0; i < 4; ++i) { - if (dst->split[cur_region_type][i]) { - av2_free_pc_tree_recursive(dst->split[cur_region_type][i], - num_planes, 0, 0); - dst->split[cur_region_type][i] = NULL; - } - if (src->split[cur_region_type][i]) { - const int x_idx = (i & 1) * (mi_size_wide[bsize] >> 1); - const int y_idx = (i >> 1) * (mi_size_high[bsize] >> 1); - dst->split[cur_region_type][i] = av2_alloc_pc_tree_node( - tree_type, mi_row + y_idx, mi_col + x_idx, cm->sb_size, subsize, - dst, PARTITION_SPLIT, i, i == 3, ss_x, ss_y); - av2_copy_pc_tree_recursive(xd, cm, dst->split[cur_region_type][i], - src->split[cur_region_type][i], ss_x, - ss_y, shared_bufs, tree_type, - num_planes); - } - } - } - break; - // PARTITION_HORZ - case PARTITION_HORZ: - if (is_partition_valid(bsize, PARTITION_HORZ)) { - for (int i = 0; i < 2; ++i) { - if (dst->horizontal[cur_region_type][i]) { - av2_free_pc_tree_recursive(dst->horizontal[cur_region_type][i], - num_planes, 0, 0); - dst->horizontal[cur_region_type][i] = NULL; - } - if (src->horizontal[cur_region_type][i]) { - const int this_mi_row = mi_row + i * (mi_size_high[bsize] >> 1); - dst->horizontal[cur_region_type][i] = av2_alloc_pc_tree_node( - tree_type, this_mi_row, mi_col, cm->sb_size, subsize, dst, - PARTITION_HORZ, i, i == 1, ss_x, ss_y); - av2_copy_pc_tree_recursive( - xd, cm, dst->horizontal[cur_region_type][i], - src->horizontal[cur_region_type][i], ss_x, ss_y, shared_bufs, - tree_type, num_planes); - } - } - } - break; - // PARTITION_VERT - case PARTITION_VERT: - if (is_partition_valid(bsize, PARTITION_VERT)) { - for (int i = 0; i < 2; ++i) { - if (dst->vertical[cur_region_type][i]) { - av2_free_pc_tree_recursive(dst->vertical[cur_region_type][i], - num_planes, 0, 0); - dst->vertical[cur_region_type][i] = NULL; - } - if (src->vertical[cur_region_type][i]) { - const int this_mi_col = mi_col + i * (mi_size_wide[bsize] >> 1); - dst->vertical[cur_region_type][i] = av2_alloc_pc_tree_node( - tree_type, mi_row, this_mi_col, cm->sb_size, subsize, dst, - PARTITION_VERT, i, i == 1, ss_x, ss_y); - av2_copy_pc_tree_recursive( - xd, cm, dst->vertical[cur_region_type][i], - src->vertical[cur_region_type][i], ss_x, ss_y, shared_bufs, - tree_type, num_planes); - } - } - } - break; - // PARTITION_HORZ_4A - case PARTITION_HORZ_4A: - if (is_partition_valid(bsize, PARTITION_HORZ_4A)) { - const int ebh = (mi_size_high[bsize] >> 3); - const int mi_rows[4] = { mi_row, mi_row + ebh, mi_row + ebh * 3, - mi_row + ebh * 7 }; - const BLOCK_SIZE bsize_big = - get_partition_subsize(bsize, PARTITION_HORZ); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_HORZ][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_HORZ][bsize_med]); - const BLOCK_SIZE subsizes[4] = { subsize, bsize_med, bsize_big, - subsize }; - for (int i = 0; i < 4; ++i) { - if (dst->horizontal4a[cur_region_type][i]) { - av2_free_pc_tree_recursive(dst->horizontal4a[cur_region_type][i], - num_planes, 0, 0); - dst->horizontal4a[cur_region_type][i] = NULL; - } - if (src->horizontal4a[cur_region_type][i]) { - dst->horizontal4a[cur_region_type][i] = av2_alloc_pc_tree_node( - tree_type, mi_rows[i], mi_col, cm->sb_size, subsizes[i], dst, - PARTITION_HORZ_4A, i, i == 3, ss_x, ss_y); - av2_copy_pc_tree_recursive( - xd, cm, dst->horizontal4a[cur_region_type][i], - src->horizontal4a[cur_region_type][i], ss_x, ss_y, shared_bufs, - tree_type, num_planes); - } - } - } - break; - // PARTITION_HORZ_4B - case PARTITION_HORZ_4B: - if (is_partition_valid(bsize, PARTITION_HORZ_4B)) { - const int ebh = (mi_size_high[bsize] >> 3); - const int mi_rows[4] = { mi_row, mi_row + ebh, mi_row + ebh * 5, - mi_row + ebh * 7 }; - const BLOCK_SIZE bsize_big = - get_partition_subsize(bsize, PARTITION_HORZ); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_HORZ][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_HORZ][bsize_med]); - const BLOCK_SIZE subsizes[4] = { subsize, bsize_big, bsize_med, - subsize }; - for (int i = 0; i < 4; ++i) { - if (dst->horizontal4b[cur_region_type][i]) { - av2_free_pc_tree_recursive(dst->horizontal4b[cur_region_type][i], - num_planes, 0, 0); - dst->horizontal4b[cur_region_type][i] = NULL; - } - if (src->horizontal4b[cur_region_type][i]) { - dst->horizontal4b[cur_region_type][i] = av2_alloc_pc_tree_node( - tree_type, mi_rows[i], mi_col, cm->sb_size, subsizes[i], dst, - PARTITION_HORZ_4B, i, i == 3, ss_x, ss_y); - av2_copy_pc_tree_recursive( - xd, cm, dst->horizontal4b[cur_region_type][i], - src->horizontal4b[cur_region_type][i], ss_x, ss_y, shared_bufs, - tree_type, num_planes); - } - } - } - break; - // PARTITION_VERT_4A - case PARTITION_VERT_4A: - if (is_partition_valid(bsize, PARTITION_VERT_4A)) { - const int ebw = (mi_size_wide[bsize] >> 3); - const int mi_cols[4] = { mi_col, mi_col + ebw, mi_col + ebw * 3, - mi_col + ebw * 7 }; - const BLOCK_SIZE bsize_big = - get_partition_subsize(bsize, PARTITION_VERT); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_VERT][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_VERT][bsize_med]); - const BLOCK_SIZE subsizes[4] = { subsize, bsize_med, bsize_big, - subsize }; - for (int i = 0; i < 4; ++i) { - if (dst->vertical4a[cur_region_type][i]) { - av2_free_pc_tree_recursive(dst->vertical4a[cur_region_type][i], - num_planes, 0, 0); - dst->vertical4a[cur_region_type][i] = NULL; - } - if (src->vertical4a[cur_region_type][i]) { - dst->vertical4a[cur_region_type][i] = av2_alloc_pc_tree_node( - tree_type, mi_row, mi_cols[i], cm->sb_size, subsizes[i], dst, - PARTITION_VERT_4A, i, i == 3, ss_x, ss_y); - av2_copy_pc_tree_recursive( - xd, cm, dst->vertical4a[cur_region_type][i], - src->vertical4a[cur_region_type][i], ss_x, ss_y, shared_bufs, - tree_type, num_planes); - } - } - } - break; - // PARTITION_VERT_4B - case PARTITION_VERT_4B: - if (is_partition_valid(bsize, PARTITION_VERT_4B)) { - const int ebw = (mi_size_wide[bsize] >> 3); - const int mi_cols[4] = { mi_col, mi_col + ebw, mi_col + ebw * 5, - mi_col + ebw * 7 }; - const BLOCK_SIZE bsize_big = - get_partition_subsize(bsize, PARTITION_VERT); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_VERT][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_VERT][bsize_med]); - const BLOCK_SIZE subsizes[4] = { subsize, bsize_big, bsize_med, - subsize }; - for (int i = 0; i < 4; ++i) { - if (dst->vertical4b[cur_region_type][i]) { - av2_free_pc_tree_recursive(dst->vertical4b[cur_region_type][i], - num_planes, 0, 0); - dst->vertical4b[cur_region_type][i] = NULL; - } - if (src->vertical4b[cur_region_type][i]) { - dst->vertical4b[cur_region_type][i] = av2_alloc_pc_tree_node( - tree_type, mi_row, mi_cols[i], cm->sb_size, subsizes[i], dst, - PARTITION_VERT_4B, i, i == 3, ss_x, ss_y); - av2_copy_pc_tree_recursive( - xd, cm, dst->vertical4b[cur_region_type][i], - src->vertical4b[cur_region_type][i], ss_x, ss_y, shared_bufs, - tree_type, num_planes); - } + if (src->partitioning == PARTITION_NONE) { + if (dst->none[cur_region_type]) + av2_free_pmc(dst->none[cur_region_type], num_planes); + dst->none[cur_region_type] = NULL; + if (src->none[cur_region_type]) { + dst->none[cur_region_type] = av2_alloc_pmc( + cm, + !frame_is_intra_only(cm) && cur_region_type == INTRA_REGION + ? LUMA_PART + : tree_type, + mi_row, mi_col, bsize, dst, PARTITION_NONE, 0, ss_x, ss_y, + shared_bufs); + av2_copy_tree_context(dst->none[cur_region_type], + src->none[cur_region_type], num_planes); + xd->mi_row = mi_row; + xd->mi_col = mi_col; + if (is_inter_block(&src->none[cur_region_type]->mic, xd->tree_type)) { + av2_update_warp_param_bank(cm, xd, 0, &dst->none[cur_region_type]->mic); + if (cm->seq_params.enable_refmvbank) { + av2_update_ref_mv_bank(cm, xd, 1, &dst->none[cur_region_type]->mic); } + } else { + decide_rmb_unit_update_count(cm, xd, &dst->none[cur_region_type]->mic); } - break; - - // PARTITION_HORZ_3 - case PARTITION_HORZ_3: - if (is_partition_valid(bsize, PARTITION_HORZ_3)) { - for (int i = 0; i < 4; ++i) { - const BLOCK_SIZE this_subsize = - get_h_partition_subsize(bsize, i, PARTITION_HORZ_3); - const int offset_mr = - get_h_partition_offset_mi_row(bsize, i, PARTITION_HORZ_3); - const int offset_mc = - get_h_partition_offset_mi_col(bsize, i, PARTITION_HORZ_3); - if (dst->horizontal3[cur_region_type][i]) { - av2_free_pc_tree_recursive(dst->horizontal3[cur_region_type][i], - num_planes, 0, 0); - dst->horizontal3[cur_region_type][i] = NULL; - } - if (src->horizontal3[cur_region_type][i]) { - dst->horizontal3[cur_region_type][i] = av2_alloc_pc_tree_node( - tree_type, mi_row + offset_mr, mi_col + offset_mc, cm->sb_size, - this_subsize, dst, PARTITION_HORZ_3, i, i == 3, ss_x, ss_y); - av2_copy_pc_tree_recursive( - xd, cm, dst->horizontal3[cur_region_type][i], - src->horizontal3[cur_region_type][i], ss_x, ss_y, shared_bufs, - tree_type, num_planes); - } + } + } else { + if (is_partition_valid(bsize, src->partitioning)) { + int num_sub_parts_dst = 0; + PC_TREE **dst_child_nodes = (PC_TREE **)get_child_pc_trees( + dst, src->partitioning, cur_region_type, &num_sub_parts_dst); + int num_sub_parts_src = 0; + PC_TREE **src_child_nodes = (PC_TREE **)get_child_pc_trees( + src, src->partitioning, cur_region_type, &num_sub_parts_src); + assert(num_sub_parts_src == num_sub_parts_dst); + int mi_rows[4], mi_cols[4]; + BLOCK_SIZE subblock_sizes[4]; + get_partition_subblock_layout(src->partitioning, bsize, mi_row, mi_col, + subblock_sizes, mi_rows, mi_cols); + for (int sub_idx = 0; sub_idx < num_sub_parts_src; ++sub_idx) { + if (dst_child_nodes[sub_idx]) { + av2_free_pc_tree_recursive(dst_child_nodes[sub_idx], num_planes, 0, + 0); + dst_child_nodes[sub_idx] = NULL; } - } - break; - // PARTITION_VERT_3 - case PARTITION_VERT_3: - if (is_partition_valid(bsize, PARTITION_VERT_3)) { - for (int i = 0; i < 4; ++i) { - const BLOCK_SIZE this_subsize = - get_h_partition_subsize(bsize, i, PARTITION_VERT_3); - const int offset_mr = - get_h_partition_offset_mi_row(bsize, i, PARTITION_VERT_3); - const int offset_mc = - get_h_partition_offset_mi_col(bsize, i, PARTITION_VERT_3); - if (dst->vertical3[cur_region_type][i]) { - av2_free_pc_tree_recursive(dst->vertical3[cur_region_type][i], - num_planes, 0, 0); - dst->vertical3[cur_region_type][i] = NULL; - } - if (src->vertical3[cur_region_type][i]) { - dst->vertical3[cur_region_type][i] = av2_alloc_pc_tree_node( - tree_type, mi_row + offset_mr, mi_col + offset_mc, cm->sb_size, - this_subsize, dst, PARTITION_VERT_3, i, i == 3, ss_x, ss_y); - av2_copy_pc_tree_recursive( - xd, cm, dst->vertical3[cur_region_type][i], - src->vertical3[cur_region_type][i], ss_x, ss_y, shared_bufs, - tree_type, num_planes); - } + if (src_child_nodes[sub_idx]) { + dst_child_nodes[sub_idx] = av2_alloc_pc_tree_node( + tree_type, mi_rows[sub_idx], mi_cols[sub_idx], cm->sb_size, + subblock_sizes[sub_idx], dst, src->partitioning, sub_idx, + sub_idx == (num_sub_parts_dst - 1), ss_x, ss_y); + av2_copy_pc_tree_recursive(xd, cm, dst_child_nodes[sub_idx], + src_child_nodes[sub_idx], ss_x, ss_y, + shared_bufs, tree_type, num_planes); } } - break; - default: assert(0 && "Not a valid partition."); break; + } } } @@ -904,33 +627,15 @@ PC_TREE *counterpart_from_different_partition(PC_TREE *pc_tree, PC_TREE *result; REGION_TYPE cur_region_type = pc_tree->region_type; - result = - look_for_counterpart_helper(pc_tree->split[cur_region_type][0], target); - if (result) return result; - result = look_for_counterpart_helper(pc_tree->horizontal[cur_region_type][0], - target); - if (result) return result; - result = look_for_counterpart_helper(pc_tree->vertical[cur_region_type][0], - target); - if (result) return result; - result = look_for_counterpart_helper( - pc_tree->horizontal4a[cur_region_type][0], target); - if (result) return result; - result = look_for_counterpart_helper( - pc_tree->horizontal4b[cur_region_type][0], target); - if (result) return result; - result = look_for_counterpart_helper(pc_tree->vertical4a[cur_region_type][0], - target); - if (result) return result; - result = look_for_counterpart_helper(pc_tree->vertical4b[cur_region_type][0], - target); - if (result) return result; - result = look_for_counterpart_helper(pc_tree->horizontal3[cur_region_type][0], - target); - if (result) return result; - result = look_for_counterpart_helper(pc_tree->vertical3[cur_region_type][0], - target); - if (result) return result; + + for (PARTITION_TYPE partition_type = PARTITION_HORZ; + partition_type < ALL_PARTITION_TYPES; ++partition_type) { + int num_sub_parts = 0; + PC_TREE **child_nodes = (PC_TREE **)get_child_pc_trees( + pc_tree, partition_type, cur_region_type, &num_sub_parts); + result = look_for_counterpart_helper(child_nodes[0], target); + if (result) return result; + } return NULL; } diff --git a/av2/encoder/context_tree.h b/av2/encoder/context_tree.h index 61a965c894..842b460fcb 100644 --- a/av2/encoder/context_tree.h +++ b/av2/encoder/context_tree.h @@ -148,6 +148,8 @@ PC_TREE *const *get_child_pc_trees(const PC_TREE *pc_tree, PARTITION_TYPE partition, REGION_TYPE region, int *num_sub_parts); +int get_subblock_count(PARTITION_TYPE partition_type); + void get_partition_subblock_layout(PARTITION_TYPE partition_type, BLOCK_SIZE bsize, int mi_row, int mi_col, BLOCK_SIZE sub_sizes[4], int mi_rows[4], diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index 84efd0ad76..d6e72f557c 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -1863,10 +1863,6 @@ static void encode_sb(const AV2_COMP *const cpi, ThreadData *td, } assert(bsize < BLOCK_SIZES_ALL); - const int hbs_w = mi_size_wide[bsize] / 2; - const int hbs_h = mi_size_high[bsize] / 2; - const int ebs_w = mi_size_wide[bsize] / 8; - const int ebs_h = mi_size_high[bsize] / 8; const int is_partition_root = is_partition_point(bsize); const int ctx = 0; const PARTITION_TYPE partition = pc_tree->partitioning; @@ -2024,148 +2020,24 @@ static void encode_sb(const AV2_COMP *const cpi, ThreadData *td, encode_sdp_intra_region_yuv = 1; xd->tree_type = LUMA_PART; } - switch (partition) { - case PARTITION_NONE: - encode_b(cpi, tile_data, td, tp, mi_row, mi_col, dry_run, subsize, - partition, pc_tree->none[pc_tree->region_type], rate); - break; - case PARTITION_VERT: - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col, dry_run, subsize, - pc_tree->vertical[pc_tree->region_type][0], sub_tree[0], - track_ptree_luma ? ptree_luma->sub_tree[0] : NULL, rate); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col + hbs_w, dry_run, - subsize, pc_tree->vertical[pc_tree->region_type][1], - sub_tree[1], track_ptree_luma ? ptree_luma->sub_tree[1] : NULL, - rate); - break; - case PARTITION_HORZ: - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col, dry_run, subsize, - pc_tree->horizontal[pc_tree->region_type][0], sub_tree[0], - track_ptree_luma ? ptree_luma->sub_tree[0] : NULL, rate); - encode_sb(cpi, td, tile_data, tp, mi_row + hbs_h, mi_col, dry_run, - subsize, pc_tree->horizontal[pc_tree->region_type][1], - sub_tree[1], track_ptree_luma ? ptree_luma->sub_tree[1] : NULL, - rate); - break; - case PARTITION_HORZ_4A: { - const BLOCK_SIZE bsize_big = get_partition_subsize(bsize, PARTITION_HORZ); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_HORZ][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_HORZ][bsize_med]); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col, dry_run, subsize, - pc_tree->horizontal4a[pc_tree->region_type][0], sub_tree[0], - track_ptree_luma ? ptree_luma->sub_tree[0] : NULL, rate); - encode_sb(cpi, td, tile_data, tp, mi_row + ebs_h, mi_col, dry_run, - bsize_med, pc_tree->horizontal4a[pc_tree->region_type][1], - sub_tree[1], track_ptree_luma ? ptree_luma->sub_tree[1] : NULL, - rate); - encode_sb(cpi, td, tile_data, tp, mi_row + 3 * ebs_h, mi_col, dry_run, - bsize_big, pc_tree->horizontal4a[pc_tree->region_type][2], - sub_tree[2], track_ptree_luma ? ptree_luma->sub_tree[2] : NULL, - rate); - encode_sb(cpi, td, tile_data, tp, mi_row + 7 * ebs_h, mi_col, dry_run, - subsize, pc_tree->horizontal4a[pc_tree->region_type][3], - sub_tree[3], track_ptree_luma ? ptree_luma->sub_tree[3] : NULL, - rate); - break; - } - case PARTITION_HORZ_4B: { - const BLOCK_SIZE bsize_big = get_partition_subsize(bsize, PARTITION_HORZ); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_HORZ][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_HORZ][bsize_med]); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col, dry_run, subsize, - pc_tree->horizontal4b[pc_tree->region_type][0], sub_tree[0], - track_ptree_luma ? ptree_luma->sub_tree[0] : NULL, rate); - encode_sb(cpi, td, tile_data, tp, mi_row + ebs_h, mi_col, dry_run, - bsize_big, pc_tree->horizontal4b[pc_tree->region_type][1], - sub_tree[1], track_ptree_luma ? ptree_luma->sub_tree[1] : NULL, - rate); - encode_sb(cpi, td, tile_data, tp, mi_row + 5 * ebs_h, mi_col, dry_run, - bsize_med, pc_tree->horizontal4b[pc_tree->region_type][2], - sub_tree[2], track_ptree_luma ? ptree_luma->sub_tree[2] : NULL, - rate); - encode_sb(cpi, td, tile_data, tp, mi_row + 7 * ebs_h, mi_col, dry_run, - subsize, pc_tree->horizontal4b[pc_tree->region_type][3], - sub_tree[3], track_ptree_luma ? ptree_luma->sub_tree[3] : NULL, - rate); - break; - } - case PARTITION_VERT_4A: { - const BLOCK_SIZE bsize_big = get_partition_subsize(bsize, PARTITION_VERT); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_VERT][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_VERT][bsize_med]); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col, dry_run, subsize, - pc_tree->vertical4a[pc_tree->region_type][0], sub_tree[0], - track_ptree_luma ? ptree_luma->sub_tree[0] : NULL, rate); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col + ebs_w, dry_run, - bsize_med, pc_tree->vertical4a[pc_tree->region_type][1], - sub_tree[1], track_ptree_luma ? ptree_luma->sub_tree[1] : NULL, - rate); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col + 3 * ebs_w, dry_run, - bsize_big, pc_tree->vertical4a[pc_tree->region_type][2], - sub_tree[2], track_ptree_luma ? ptree_luma->sub_tree[2] : NULL, - rate); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col + 7 * ebs_w, dry_run, - subsize, pc_tree->vertical4a[pc_tree->region_type][3], - sub_tree[3], track_ptree_luma ? ptree_luma->sub_tree[3] : NULL, - rate); - break; - } - case PARTITION_VERT_4B: { - const BLOCK_SIZE bsize_big = get_partition_subsize(bsize, PARTITION_VERT); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_VERT][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_VERT][bsize_med]); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col, dry_run, subsize, - pc_tree->vertical4b[pc_tree->region_type][0], sub_tree[0], - track_ptree_luma ? ptree_luma->sub_tree[0] : NULL, rate); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col + ebs_w, dry_run, - bsize_big, pc_tree->vertical4b[pc_tree->region_type][1], - sub_tree[1], track_ptree_luma ? ptree_luma->sub_tree[1] : NULL, - rate); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col + 5 * ebs_w, dry_run, - bsize_med, pc_tree->vertical4b[pc_tree->region_type][2], - sub_tree[2], track_ptree_luma ? ptree_luma->sub_tree[2] : NULL, - rate); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col + 7 * ebs_w, dry_run, - subsize, pc_tree->vertical4b[pc_tree->region_type][3], - sub_tree[3], track_ptree_luma ? ptree_luma->sub_tree[3] : NULL, - rate); - break; - } - case PARTITION_HORZ_3: - case PARTITION_VERT_3: { - for (int i = 0; i < 4; ++i) { - const BLOCK_SIZE this_bsize = - get_h_partition_subsize(bsize, i, partition); - const int offset_r = get_h_partition_offset_mi_row(bsize, i, partition); - const int offset_c = get_h_partition_offset_mi_col(bsize, i, partition); - const int this_mi_row = mi_row + offset_r; - const int this_mi_col = mi_col + offset_c; - PC_TREE *this_pc_tree = - partition == PARTITION_HORZ_3 - ? pc_tree->horizontal3[pc_tree->region_type][i] - : pc_tree->vertical3[pc_tree->region_type][i]; - - encode_sb(cpi, td, tile_data, tp, this_mi_row, this_mi_col, dry_run, - this_bsize, this_pc_tree, sub_tree[i], - track_ptree_luma ? ptree_luma->sub_tree[i] : NULL, rate); - } - break; + + if (partition == PARTITION_NONE) { + encode_b(cpi, tile_data, td, tp, mi_row, mi_col, dry_run, subsize, + partition, pc_tree->none[pc_tree->region_type], rate); + } else { + int num_sub_parts = 0; + PC_TREE *const *child_nodes = get_child_pc_trees( + pc_tree, partition, pc_tree->region_type, &num_sub_parts); + int mi_rows[4], mi_cols[4]; + BLOCK_SIZE subblock_sizes[4]; + get_partition_subblock_layout(partition, bsize, mi_row, mi_col, + subblock_sizes, mi_rows, mi_cols); + for (int sub_idx = 0; sub_idx < num_sub_parts; ++sub_idx) { + encode_sb(cpi, td, tile_data, tp, mi_rows[sub_idx], mi_cols[sub_idx], + dry_run, subblock_sizes[sub_idx], child_nodes[sub_idx], + sub_tree[sub_idx], + track_ptree_luma ? ptree_luma->sub_tree[sub_idx] : NULL, rate); } - case PARTITION_SPLIT: - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col, dry_run, subsize, - pc_tree->split[pc_tree->region_type][0], sub_tree[0], - track_ptree_luma ? ptree_luma->sub_tree[0] : NULL, rate); - encode_sb(cpi, td, tile_data, tp, mi_row, mi_col + hbs_w, dry_run, - subsize, pc_tree->split[pc_tree->region_type][1], sub_tree[1], - track_ptree_luma ? ptree_luma->sub_tree[1] : NULL, rate); - encode_sb(cpi, td, tile_data, tp, mi_row + hbs_h, mi_col, dry_run, - subsize, pc_tree->split[pc_tree->region_type][2], sub_tree[2], - track_ptree_luma ? ptree_luma->sub_tree[2] : NULL, rate); - encode_sb(cpi, td, tile_data, tp, mi_row + hbs_h, mi_col + hbs_w, dry_run, - subsize, pc_tree->split[pc_tree->region_type][3], sub_tree[3], - track_ptree_luma ? ptree_luma->sub_tree[3] : NULL, rate); - break; - default: assert(0 && "Invalid partition type."); break; } // encode the chroma blocks under one intra region in inter frame @@ -3680,36 +3552,10 @@ static void inter_sdp_copy_luma_mode_info(PC_TREE *pc_tree, PC_TREE *cur_pc_tree = pc_tree; PARTITION_TYPE partition = cur_pc_tree->partitioning; while (partition) { - switch (partition) { - case PARTITION_HORZ: - cur_pc_tree = cur_pc_tree->horizontal[INTRA_REGION][0]; - break; - case PARTITION_VERT: - cur_pc_tree = cur_pc_tree->vertical[INTRA_REGION][0]; - break; - case PARTITION_SPLIT: - cur_pc_tree = cur_pc_tree->split[INTRA_REGION][0]; - break; - case PARTITION_HORZ_4A: - cur_pc_tree = cur_pc_tree->horizontal4a[INTRA_REGION][0]; - break; - case PARTITION_HORZ_4B: - cur_pc_tree = cur_pc_tree->horizontal4b[INTRA_REGION][0]; - break; - case PARTITION_VERT_4A: - cur_pc_tree = cur_pc_tree->vertical4a[INTRA_REGION][0]; - break; - case PARTITION_VERT_4B: - cur_pc_tree = cur_pc_tree->vertical4b[INTRA_REGION][0]; - break; - case PARTITION_VERT_3: - cur_pc_tree = cur_pc_tree->vertical3[INTRA_REGION][0]; - break; - case PARTITION_HORZ_3: - cur_pc_tree = cur_pc_tree->horizontal3[INTRA_REGION][0]; - break; - default: assert(0 && "Invalid partition type!"); break; - } + int num_sub_parts = 0; + PC_TREE **child_nodes = (PC_TREE **)get_child_pc_trees( + cur_pc_tree, partition, INTRA_REGION, &num_sub_parts); + cur_pc_tree = child_nodes[0]; partition = cur_pc_tree->partitioning; } ctx_chroma_none->mic = cur_pc_tree->none[INTRA_REGION]->mic; @@ -4175,152 +4021,32 @@ static AVM_INLINE void trace_partition_boundary(bool *partition_boundaries, mi_row &= MAX_MIB_MASK; mi_col &= MAX_MIB_MASK; const PARTITION_TYPE partition = pc_tree->partitioning; - assert(bsize < BLOCK_SIZES_ALL); const int mi_width = mi_size_wide[bsize]; const int mi_height = mi_size_high[bsize]; - const int ebs_w = mi_size_wide[bsize] / 8; - const int ebs_h = mi_size_high[bsize] / 8; - const BLOCK_SIZE subsize = get_partition_subsize(bsize, partition); - REGION_TYPE cur_region_type = pc_tree->region_type; - switch (partition) { - case PARTITION_NONE: - for (int col = 0; col < mi_width; col++) { - partition_boundaries[(mi_row + mi_height - 1) * MAX_MIB_SIZE + - (mi_col + col)] |= (1 << HORZ); - } - for (int row = 0; row < mi_height; row++) { - partition_boundaries[(mi_row + row) * MAX_MIB_SIZE + mi_col + mi_width - - 1] |= (1 << VERT); - } - break; - case PARTITION_HORZ: - trace_partition_boundary( - partition_boundaries, pc_tree->horizontal[cur_region_type][0], mi_row, - mi_col, get_partition_subsize(bsize, PARTITION_HORZ)); - trace_partition_boundary(partition_boundaries, - pc_tree->horizontal[cur_region_type][1], - mi_row + mi_height / 2, mi_col, - get_partition_subsize(bsize, PARTITION_HORZ)); - break; - case PARTITION_VERT: - trace_partition_boundary( - partition_boundaries, pc_tree->vertical[cur_region_type][0], mi_row, - mi_col, get_partition_subsize(bsize, PARTITION_VERT)); - trace_partition_boundary( - partition_boundaries, pc_tree->vertical[cur_region_type][1], mi_row, - mi_col + mi_width / 2, get_partition_subsize(bsize, PARTITION_VERT)); - break; - case PARTITION_HORZ_3: - trace_partition_boundary( - partition_boundaries, pc_tree->horizontal3[cur_region_type][0], - mi_row, mi_col, get_h_partition_subsize(bsize, 0, PARTITION_HORZ_3)); - trace_partition_boundary( - partition_boundaries, pc_tree->horizontal3[cur_region_type][1], - mi_row + mi_height / 4, mi_col, - get_h_partition_subsize(bsize, 1, PARTITION_HORZ_3)); - trace_partition_boundary( - partition_boundaries, pc_tree->horizontal3[cur_region_type][2], - mi_row + mi_height / 4, mi_col + mi_width / 2, - get_h_partition_subsize(bsize, 1, PARTITION_HORZ_3)); - trace_partition_boundary( - partition_boundaries, pc_tree->horizontal3[cur_region_type][3], - mi_row + 3 * mi_height / 4, mi_col, - get_h_partition_subsize(bsize, 0, PARTITION_HORZ_3)); - break; - case PARTITION_VERT_3: - trace_partition_boundary( - partition_boundaries, pc_tree->vertical3[cur_region_type][0], mi_row, - mi_col, get_h_partition_subsize(bsize, 0, PARTITION_VERT_3)); - trace_partition_boundary( - partition_boundaries, pc_tree->vertical3[cur_region_type][1], mi_row, - mi_col + mi_width / 4, - get_h_partition_subsize(bsize, 1, PARTITION_VERT_3)); - trace_partition_boundary( - partition_boundaries, pc_tree->vertical3[cur_region_type][2], - mi_row + mi_height / 2, mi_col + mi_width / 4, - get_h_partition_subsize(bsize, 1, PARTITION_VERT_3)); - trace_partition_boundary( - partition_boundaries, pc_tree->vertical3[cur_region_type][3], mi_row, - mi_col + 3 * mi_width / 4, - get_h_partition_subsize(bsize, 0, PARTITION_VERT_3)); - break; - case PARTITION_HORZ_4A: { - const BLOCK_SIZE bsize_big = get_partition_subsize(bsize, PARTITION_HORZ); - assert(bsize_big < BLOCK_SIZES_ALL); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_HORZ][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_HORZ][bsize_med]); - trace_partition_boundary(partition_boundaries, - pc_tree->horizontal4a[cur_region_type][0], - mi_row, mi_col, subsize); - trace_partition_boundary(partition_boundaries, - pc_tree->horizontal4a[cur_region_type][1], - mi_row + ebs_h, mi_col, bsize_med); - trace_partition_boundary(partition_boundaries, - pc_tree->horizontal4a[cur_region_type][2], - mi_row + 3 * ebs_h, mi_col, bsize_big); - trace_partition_boundary(partition_boundaries, - pc_tree->horizontal4a[cur_region_type][3], - mi_row + 7 * ebs_h, mi_col, subsize); - break; - } - case PARTITION_HORZ_4B: { - const BLOCK_SIZE bsize_big = get_partition_subsize(bsize, PARTITION_HORZ); - assert(bsize_big < BLOCK_SIZES_ALL); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_HORZ][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_HORZ][bsize_med]); - trace_partition_boundary(partition_boundaries, - pc_tree->horizontal4b[cur_region_type][0], - mi_row, mi_col, subsize); - trace_partition_boundary(partition_boundaries, - pc_tree->horizontal4b[cur_region_type][1], - mi_row + ebs_h, mi_col, bsize_big); - trace_partition_boundary(partition_boundaries, - pc_tree->horizontal4b[cur_region_type][2], - mi_row + 5 * ebs_h, mi_col, bsize_med); - trace_partition_boundary(partition_boundaries, - pc_tree->horizontal4b[cur_region_type][3], - mi_row + 7 * ebs_h, mi_col, subsize); - break; + + if (partition == PARTITION_NONE) { + for (int col = 0; col < mi_width; col++) { + partition_boundaries[(mi_row + mi_height - 1) * MAX_MIB_SIZE + + (mi_col + col)] |= (1 << HORZ); } - case PARTITION_VERT_4A: { - const BLOCK_SIZE bsize_big = get_partition_subsize(bsize, PARTITION_VERT); - assert(bsize_big < BLOCK_SIZES_ALL); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_VERT][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_VERT][bsize_med]); - trace_partition_boundary(partition_boundaries, - pc_tree->vertical4a[cur_region_type][0], mi_row, - mi_col, subsize); - trace_partition_boundary(partition_boundaries, - pc_tree->vertical4a[cur_region_type][1], mi_row, - mi_col + ebs_w, bsize_med); - trace_partition_boundary(partition_boundaries, - pc_tree->vertical4a[cur_region_type][2], mi_row, - mi_col + 3 * ebs_w, bsize_big); - trace_partition_boundary(partition_boundaries, - pc_tree->vertical4a[cur_region_type][3], mi_row, - mi_col + 7 * ebs_w, subsize); - break; + for (int row = 0; row < mi_height; row++) { + partition_boundaries[(mi_row + row) * MAX_MIB_SIZE + mi_col + mi_width - + 1] |= (1 << VERT); } - case PARTITION_VERT_4B: { - const BLOCK_SIZE bsize_big = get_partition_subsize(bsize, PARTITION_VERT); - assert(bsize_big < BLOCK_SIZES_ALL); - const BLOCK_SIZE bsize_med = subsize_lookup[PARTITION_VERT][bsize_big]; - assert(subsize == subsize_lookup[PARTITION_VERT][bsize_med]); - trace_partition_boundary(partition_boundaries, - pc_tree->vertical4b[cur_region_type][0], mi_row, - mi_col, subsize); - trace_partition_boundary(partition_boundaries, - pc_tree->vertical4b[cur_region_type][1], mi_row, - mi_col + ebs_w, bsize_big); - trace_partition_boundary(partition_boundaries, - pc_tree->vertical4b[cur_region_type][2], mi_row, - mi_col + 5 * ebs_w, bsize_med); - trace_partition_boundary(partition_boundaries, - pc_tree->vertical4b[cur_region_type][3], mi_row, - mi_col + 7 * ebs_w, subsize); - break; + } else { + int num_sub_parts = 0; + PC_TREE *const *child_nodes = get_child_pc_trees( + pc_tree, pc_tree->partitioning, pc_tree->region_type, &num_sub_parts); + + int mi_rows[4], mi_cols[4]; + BLOCK_SIZE subblock_sizes[4]; + get_partition_subblock_layout(pc_tree->partitioning, bsize, mi_row, mi_col, + subblock_sizes, mi_rows, mi_cols); + for (int sub_idx = 0; sub_idx < num_sub_parts; ++sub_idx) { + trace_partition_boundary(partition_boundaries, child_nodes[sub_idx], + mi_rows[sub_idx], mi_cols[sub_idx], + subblock_sizes[sub_idx]); } - default: assert(0 && "Invalid partition type in trace_partition_boundary!"); } } @@ -4601,9 +4327,11 @@ static AVM_INLINE void prune_ext_partitions_3way( } // Early termination of SDP for intra blocks in inter frames -static INLINE void early_termination_inter_sdp(PC_TREE *pc_tree, +static INLINE void early_termination_inter_sdp(const PC_TREE *pc_tree, unsigned int *total_count, unsigned int *inter_mode_count) { + if (pc_tree == NULL) return; + REGION_TYPE cur_region_type = pc_tree->region_type; if (pc_tree->partitioning == PARTITION_NONE) { if (pc_tree->none[cur_region_type] == NULL) return; @@ -4611,82 +4339,14 @@ static INLINE void early_termination_inter_sdp(PC_TREE *pc_tree, if (mi == NULL) return; *total_count += 1; if (mi->mode >= NEARMV && mi->mode < MB_MODE_COUNT) *inter_mode_count += 1; - return; - } - switch (pc_tree->partitioning) { - case PARTITION_HORZ: - early_termination_inter_sdp(pc_tree->horizontal[cur_region_type][0], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal[cur_region_type][1], - total_count, inter_mode_count); - break; - case PARTITION_VERT: - early_termination_inter_sdp(pc_tree->vertical[cur_region_type][0], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical[cur_region_type][1], - total_count, inter_mode_count); - break; - case PARTITION_HORZ_4A: - early_termination_inter_sdp(pc_tree->horizontal4a[cur_region_type][0], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal4a[cur_region_type][1], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal4a[cur_region_type][2], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal4a[cur_region_type][3], - total_count, inter_mode_count); - break; - case PARTITION_HORZ_4B: - early_termination_inter_sdp(pc_tree->horizontal4b[cur_region_type][0], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal4b[cur_region_type][1], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal4b[cur_region_type][2], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal4b[cur_region_type][3], - total_count, inter_mode_count); - break; - case PARTITION_VERT_4A: - early_termination_inter_sdp(pc_tree->vertical4a[cur_region_type][0], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical4a[cur_region_type][1], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical4a[cur_region_type][2], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical4a[cur_region_type][3], - total_count, inter_mode_count); - break; - case PARTITION_VERT_4B: - early_termination_inter_sdp(pc_tree->vertical4b[cur_region_type][0], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical4b[cur_region_type][1], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical4b[cur_region_type][2], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical4b[cur_region_type][3], - total_count, inter_mode_count); - break; - case PARTITION_HORZ_3: - early_termination_inter_sdp(pc_tree->horizontal3[cur_region_type][0], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal3[cur_region_type][1], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal3[cur_region_type][2], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->horizontal3[cur_region_type][3], - total_count, inter_mode_count); - break; - case PARTITION_VERT_3: - early_termination_inter_sdp(pc_tree->vertical3[cur_region_type][0], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical3[cur_region_type][1], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical3[cur_region_type][2], - total_count, inter_mode_count); - early_termination_inter_sdp(pc_tree->vertical3[cur_region_type][3], - total_count, inter_mode_count); - break; - default: break; + } else { + int num_sub_parts = 0; + PC_TREE *const *child_nodes = get_child_pc_trees( + pc_tree, pc_tree->partitioning, pc_tree->region_type, &num_sub_parts); + for (int sub_idx = 0; sub_idx < num_sub_parts; ++sub_idx) { + early_termination_inter_sdp(child_nodes[sub_idx], total_count, + inter_mode_count); + } } } @@ -5190,82 +4850,16 @@ static AVM_INLINE int get_partition_depth(const PC_TREE *pc_tree, int curr_depth) { if (pc_tree == NULL) return curr_depth; const PARTITION_TYPE partition = pc_tree->partitioning; + if (partition == PARTITION_NONE) return curr_depth; + + int num_sub_parts = 0; + PC_TREE *const *child_nodes = get_child_pc_trees( + pc_tree, partition, pc_tree->region_type, &num_sub_parts); + const int depth_inc = (partition == PARTITION_SPLIT) ? 2 : 1; int max_depth = curr_depth; - int cur_region_type = pc_tree->region_type; - switch (partition) { - case PARTITION_NONE: break; - case PARTITION_SPLIT: - for (int idx = 0; idx < 4; idx++) { - max_depth = AVMMAX( - max_depth, get_partition_depth(pc_tree->split[cur_region_type][idx], - curr_depth + 2)); - } - break; - case PARTITION_HORZ: - for (int idx = 0; idx < 2; idx++) { - max_depth = AVMMAX( - max_depth, - get_partition_depth(pc_tree->horizontal[cur_region_type][idx], - curr_depth + 1)); - } - break; - case PARTITION_VERT: - for (int idx = 0; idx < 2; idx++) { - max_depth = - AVMMAX(max_depth, - get_partition_depth(pc_tree->vertical[cur_region_type][idx], - curr_depth + 1)); - } - break; - case PARTITION_HORZ_3: - for (int idx = 0; idx < 4; idx++) { - max_depth = AVMMAX( - max_depth, - get_partition_depth(pc_tree->horizontal3[cur_region_type][idx], - curr_depth + 1)); - } - break; - case PARTITION_VERT_3: - for (int idx = 0; idx < 4; idx++) { - max_depth = - AVMMAX(max_depth, - get_partition_depth(pc_tree->vertical3[cur_region_type][idx], - curr_depth + 1)); - } - break; - case PARTITION_HORZ_4A: - for (int idx = 0; idx < 4; idx++) { - max_depth = AVMMAX( - max_depth, - get_partition_depth(pc_tree->horizontal4a[cur_region_type][idx], - curr_depth + 1)); - } - break; - case PARTITION_HORZ_4B: - for (int idx = 0; idx < 4; idx++) { - max_depth = AVMMAX( - max_depth, - get_partition_depth(pc_tree->horizontal4b[cur_region_type][idx], - curr_depth + 1)); - } - break; - case PARTITION_VERT_4A: - for (int idx = 0; idx < 4; idx++) { - max_depth = AVMMAX( - max_depth, - get_partition_depth(pc_tree->vertical4a[cur_region_type][idx], - curr_depth + 1)); - } - break; - case PARTITION_VERT_4B: - for (int idx = 0; idx < 4; idx++) { - max_depth = AVMMAX( - max_depth, - get_partition_depth(pc_tree->vertical4b[cur_region_type][idx], - curr_depth + 1)); - } - break; - default: assert(0); break; + for (int sub_idx = 0; sub_idx < num_sub_parts; ++sub_idx) { + max_depth = AVMMAX(max_depth, get_partition_depth(child_nodes[sub_idx], + curr_depth + depth_inc)); } return max_depth; } diff --git a/av2/encoder/partition_strategy.c b/av2/encoder/partition_strategy.c index f9e7313dd3..efbf5ddf9a 100644 --- a/av2/encoder/partition_strategy.c +++ b/av2/encoder/partition_strategy.c @@ -1309,67 +1309,19 @@ static INLINE void add_start_mv_to_partition( SimpleMotionDataBufs *sms_bufs, int mi_row, int mi_col, BLOCK_SIZE bsize, BLOCK_SIZE sb_size, PARTITION_TYPE partition, MV start_mv) { assert(bsize < BLOCK_SIZES_ALL); - const int eighth_step_h = block_size_high[bsize] / 8; - const int eighth_step_w = block_size_wide[bsize] / 8; - static const int subblock_count[ALL_PARTITION_TYPES] = { - 1, // PARTITION_NONE - 2, // PARTITION_HORZ - 2, // PARTITION_VERT - 4, // PARTITION_HORZ_3 - 4, // PARTITION_VERT_3 - 4, // PARTITION_HORZ_4A - 4, // PARTITION_HORZ_4B - 4, // PARTITION_VERT_4A - 4, // PARTITION_VERT_4B - 4, // PARTITION_SPLIT - }; - // PARTITION x NUM_SUBBLOCKS x (ROW and COL) - static const int step_multiplier[ALL_PARTITION_TYPES][4][2] = { - { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, // PARTITION_NONE - { { 0, 0 }, { 4, 0 }, { 0, 0 }, { 0, 0 } }, // PARTITION_HORZ - { { 0, 0 }, { 0, 4 }, { 0, 0 }, { 0, 0 } }, // PARTITION_VERT - { { 0, 0 }, { 2, 0 }, { 2, 4 }, { 6, 0 } }, // PARTITION_HORZ_3 - { { 0, 0 }, { 0, 2 }, { 4, 2 }, { 0, 6 } }, // PARTITION_VERT_3 - { { 0, 0 }, { 1, 0 }, { 3, 0 }, { 7, 0 } }, // PARTITION_HORZ_4A - { { 0, 0 }, { 1, 0 }, { 5, 0 }, { 7, 0 } }, // PARTITION_HORZ_4B - { { 0, 0 }, { 0, 1 }, { 0, 3 }, { 0, 7 } }, // PARTITION_VERT_4A - { { 0, 0 }, { 0, 1 }, { 0, 5 }, { 0, 7 } }, // PARTITION_VERT_4B - { { 0, 0 }, { 0, 4 }, { 4, 0 }, { 4, 4 } }, // PARTITION_SPLIT - }; - - // Sizes of subblocks. const BLOCK_SIZE part_subsize = get_partition_subsize(bsize, partition); if (part_subsize == BLOCK_INVALID) return; - BLOCK_SIZE subsizes[4] = { part_subsize, part_subsize, part_subsize, - part_subsize }; - if (partition == PARTITION_HORZ_4A) { - subsizes[2] = get_partition_subsize(bsize, PARTITION_HORZ); - subsizes[1] = get_partition_subsize(subsizes[2], PARTITION_HORZ); - } else if (partition == PARTITION_HORZ_4B) { - subsizes[1] = get_partition_subsize(bsize, PARTITION_HORZ); - subsizes[2] = get_partition_subsize(subsizes[1], PARTITION_HORZ); - } else if (partition == PARTITION_VERT_4A) { - subsizes[2] = get_partition_subsize(bsize, PARTITION_VERT); - subsizes[1] = get_partition_subsize(subsizes[2], PARTITION_VERT); - } else if (partition == PARTITION_VERT_4B) { - subsizes[1] = get_partition_subsize(bsize, PARTITION_VERT); - subsizes[2] = get_partition_subsize(subsizes[1], PARTITION_VERT); - } - if (partition == PARTITION_HORZ_3 || partition == PARTITION_VERT_3) { - for (int idx = 0; idx < subblock_count[partition]; idx++) { - subsizes[idx] = get_h_partition_subsize(bsize, idx, partition); - } - } - - for (int idx = 0; idx < subblock_count[partition]; idx++) { - assert(subsizes[idx] != BLOCK_INVALID); - const int sub_row = - mi_row + step_multiplier[partition][idx][0] * eighth_step_h / 4; - const int sub_col = - mi_col + step_multiplier[partition][idx][1] * eighth_step_w / 4; - SimpleMotionData *subblock = av2_get_sms_data_entry( - sms_bufs, sub_row, sub_col, subsizes[idx], sb_size, 1); + int subblock_cnt = get_subblock_count(partition); + int mi_rows[4], mi_cols[4]; + BLOCK_SIZE subsizes[4]; + get_partition_subblock_layout(partition, bsize, mi_row, mi_col, subsizes, + mi_rows, mi_cols); + for (int sub_idx = 0; sub_idx < subblock_cnt; sub_idx++) { + assert(subsizes[sub_idx] != BLOCK_INVALID); + SimpleMotionData *subblock = + av2_get_sms_data_entry(sms_bufs, mi_rows[sub_idx], mi_cols[sub_idx], + subsizes[sub_idx], sb_size, 1); add_start_mv_to_block(subblock, start_mv); } } From 89a7d877b6eaed29c0622f5dcc79d5c65afac3bd Mon Sep 17 00:00:00 2001 From: Lin Zheng Date: Wed, 29 Jul 2026 15:25:27 +0000 Subject: [PATCH 48/51] Tweak adaptive_tx_type_search speed feature Anchor: 6d405a307dc47579befa9642a8d700e6c443d82a Test condition: CTC, RA, 33 frames, speed 1 +---------+--------+--------+--------+--------+----------+ | Summary | Y | U | V | YUV | Enc-time | +---------+--------+--------+--------+--------+----------+ | A1 | 0.01% | -0.03% | 0.08% | 0.01% | 99.14% | | A2 | 0.02% | 0.05% | 0.03% | 0.02% | 97.98% | |avg wo b2| 0.02% | 0.04% | 0.04% | 0.02% | 97.69% | +---------+--------+--------+--------+--------+----------+ STATS_CHANGED --- av2/encoder/speed_features.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index c90fbdf33e..88d404186c 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -1397,6 +1397,11 @@ void av2_set_speed_features_qindex_dependent(AV2_COMP *cpi, int speed) { ((speed < 1) ? qindex_thresh2 : qindex_thresh4)) { sf->tx_sf.restrict_tx_partition_type_search = 1; } + + if (speed >= 1 && cm->quant_params.base_qindex <= qindex_thresh2) { + sf->tx_sf.adaptive_tx_type_search_idx = 5; + sf->tx_sf.adaptive_tx_partition_type_search_idx = 5; + } } if (cm->quant_params.base_qindex <= qindex_thresh && From 3aee035b09b69802f76c77f355a3b8b961c5a17a Mon Sep 17 00:00:00 2001 From: yunqingwang1 Date: Fri, 31 Jul 2026 13:58:03 -0700 Subject: [PATCH 49/51] Add enable_low_complexity_decode (LC) mode (#5183) Introduced an encoder option: "enable_low_complexity_decode" (LC mode) to target reduced decoding complexity. This mode is disabled by default. Also added related API control for ongoing LC mode development. --- apps/avmenc.c | 2 ++ av2/arg_defs.c | 4 ++++ av2/arg_defs.h | 1 + av2/av2_cx_iface.c | 39 +++++++++++++++++++++++++++++++++++++-- av2/encoder/encoder.h | 3 +++ avm/avm_encoder.h | 7 +++++++ avm/avmcx.h | 9 +++++++++ common/args.c | 1 + 8 files changed, 64 insertions(+), 2 deletions(-) diff --git a/apps/avmenc.c b/apps/avmenc.c index 18e175cb58..100bdba18e 100644 --- a/apps/avmenc.c +++ b/apps/avmenc.c @@ -304,6 +304,7 @@ const arg_def_t *av2_key_val_args[] = { &g_av2_codec_arg_defs.enable_joint_mvd, &g_av2_codec_arg_defs.enable_keyframe_filtering, &g_av2_codec_arg_defs.enable_lf_sub_pu, + &g_av2_codec_arg_defs.enable_low_complexity_decode, &g_av2_codec_arg_defs.enable_masked_comp, &g_av2_codec_arg_defs.enable_mfh_obu_signaling, &g_av2_codec_arg_defs.enable_mhccp, @@ -632,6 +633,7 @@ static void init_config(cfg_options_t *config) { config->scan_type_info_present_flag = 0; config->enable_mfh_obu_signaling = 0; config->operating_points_count = 1; + config->enable_low_complexity_decode = 0; } int read_icc_profile(struct AvxEncoderConfig *global, const char *file) { diff --git a/av2/arg_defs.c b/av2/arg_defs.c index 2994236293..14b58370d8 100644 --- a/av2/arg_defs.c +++ b/av2/arg_defs.c @@ -886,6 +886,10 @@ const av2_codec_arg_definitions_t g_av2_codec_arg_defs = { .use_short_metadata = ARG_DEF(NULL, "use-short-metadata", 1, "Use short metadata OBU format " "(0: GROUP format [default], 1: SHORT format)"), + .enable_low_complexity_decode = + ARG_DEF(NULL, "enable-low-complexity-decode", 1, + "Enable low complexity decode " + "(0: false (default), 1: true)"), #endif // CONFIG_AV2_ENCODER .enable_short_refresh_frame_flags = ARG_DEF(NULL, "enable-short-refresh-frame-flags", 1, diff --git a/av2/arg_defs.h b/av2/arg_defs.h index b79087dc5a..896c51fa4a 100644 --- a/av2/arg_defs.h +++ b/av2/arg_defs.h @@ -278,6 +278,7 @@ typedef struct av2_codec_arg_definitions { arg_def_t dpb_size; arg_def_t enable_bru; arg_def_t disable_loopfilters_across_tiles; + arg_def_t enable_low_complexity_decode; #endif // CONFIG_AV2_ENCODER arg_def_t frame_hash_metadata; arg_def_t frame_hash_per_plane; diff --git a/av2/av2_cx_iface.c b/av2/av2_cx_iface.c index ee57e70316..6f9a0f9811 100644 --- a/av2/av2_cx_iface.c +++ b/av2/av2_cx_iface.c @@ -245,6 +245,7 @@ struct av2_extracfg { int buffer_refresh_multi_layers_test[REF_FRAMES]; int multi_layers_lag_test; int force_deferred_frames_for_ras_test; + unsigned int enable_low_complexity_decode; }; // Example subgop configs. Currently not used by default. @@ -574,6 +575,7 @@ static struct av2_extracfg default_extra_cfg = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // buffer_refresh_multi_layers_test 0, // multi_layers_test for nozero lag 0, // force_deferred_frames_for_ras_test + 0, // enable_low_complexity_decode }; // clang-format on @@ -862,6 +864,8 @@ static avm_codec_err_t validate_config(avm_codec_alg_priv_t *ctx, RANGE_CHECK(extra_cfg, reduced_tx_type_set, 0, 3); + RANGE_CHECK_HI(extra_cfg, enable_low_complexity_decode, 1); + return AVM_CODEC_OK; } @@ -1037,6 +1041,7 @@ static void update_encoder_config(cfg_options_t *cfg, cfg->enable_ext_seg = extra_cfg->enable_ext_seg; cfg->dpb_size = extra_cfg->dpb_size; cfg->operating_points_count = extra_cfg->operating_points_count; + cfg->enable_low_complexity_decode = extra_cfg->enable_low_complexity_decode; } static void update_default_encoder_config(const cfg_options_t *cfg, @@ -1156,6 +1161,7 @@ static void update_default_encoder_config(const cfg_options_t *cfg, extra_cfg->scan_type_info_present_flag = cfg->scan_type_info_present_flag; extra_cfg->enable_mfh_obu_signaling = cfg->enable_mfh_obu_signaling; extra_cfg->operating_points_count = cfg->operating_points_count; + extra_cfg->enable_low_complexity_decode = cfg->enable_low_complexity_decode; } static double convert_qp_offset(int qp, int qp_offset, int bit_depth) { @@ -1754,6 +1760,18 @@ static avm_codec_err_t set_encoder_config(AV2EncoderConfig *oxcf, oxcf->unit_test_cfg.force_deferred_frames_for_ras_test = extra_cfg->force_deferred_frames_for_ras_test; + // Now, low complexity decode mode is only supported for good-quality + // encoding. This can be further modified if needed. + oxcf->enable_low_complexity_decode = + extra_cfg->enable_low_complexity_decode && + cfg->g_usage == AVM_USAGE_GOOD_QUALITY; + if (extra_cfg->enable_low_complexity_decode && + cfg->g_usage != AVM_USAGE_GOOD_QUALITY) { + fprintf(stderr, + "Warning: setting enable_low_complexity_decode to 0 since it " + "requires good-quality usage.\n"); + } + if (update_config) { update_encoder_config(&cfg->encoder_cfg, extra_cfg); } @@ -2765,6 +2783,14 @@ static avm_codec_err_t ctrl_set_force_deferred_frames_for_ras_test( return update_extra_cfg(ctx, &extra_cfg); } +static avm_codec_err_t ctrl_set_enable_low_complexity_decode( + avm_codec_alg_priv_t *ctx, va_list args) { + struct av2_extracfg extra_cfg = ctx->extra_cfg; + extra_cfg.enable_low_complexity_decode = + CAST(AV2E_SET_ENABLE_LOW_COMPLEXITY_DECODE, args); + return update_extra_cfg(ctx, &extra_cfg); +} + static avm_codec_err_t create_stats_buffer(FIRSTPASS_STATS **frame_stats_buffer, STATS_BUFFER_CTX *stats_buf_context, int num_lap_buffers) { @@ -4537,6 +4563,11 @@ static avm_codec_err_t encoder_set_option(avm_codec_alg_priv_t *ctx, } else if (avm_arg_match_helper(&arg, &g_av2_codec_arg_defs.enable_bru, argv, err_string)) { extra_cfg.enable_bru = avm_arg_parse_int_helper(&arg, err_string); + } else if (avm_arg_match_helper( + &arg, &g_av2_codec_arg_defs.enable_low_complexity_decode, argv, + err_string)) { + extra_cfg.enable_low_complexity_decode = + avm_arg_parse_int_helper(&arg, err_string); } else if (avm_arg_match_helper( &arg, &g_av2_codec_arg_defs.disable_loopfilters_across_tiles, argv, err_string)) { @@ -4723,6 +4754,8 @@ static avm_codec_ctrl_fn_map_t encoder_ctrl_maps[] = { { AV2E_SET_MONOTONIC_OUTPUT_ORDER, ctrl_set_monotonic_output_order }, { AV2E_SET_FORCE_DEFERRED_FRAMES_FOR_RAS_TEST, ctrl_set_force_deferred_frames_for_ras_test }, + { AV2E_SET_ENABLE_LOW_COMPLEXITY_DECODE, + ctrl_set_enable_low_complexity_decode }, // Getters { AVME_GET_LAST_QUANTIZER, ctrl_get_quantizer }, @@ -4874,7 +4907,8 @@ static const avm_codec_enc_cfg_t encoder_usage_cfg[] = { NULL, 0, 0, 0, // enable_mfh_obu_signaling 1, - }, // cfg + 0, // enable_low_complexity_decode + }, // cfg }, { // NOLINT @@ -5009,7 +5043,8 @@ static const avm_codec_enc_cfg_t encoder_usage_cfg[] = { NULL, 0, 0, 0, // enable_mfh_obu_signaling 1, - }, // cfg + 0, // enable_low_complexity_decode + }, // cfg }, }; diff --git a/av2/encoder/encoder.h b/av2/encoder/encoder.h index 6b5997c9f8..9896a97226 100644 --- a/av2/encoder/encoder.h +++ b/av2/encoder/encoder.h @@ -1212,6 +1212,9 @@ typedef struct AV2EncoderConfig { // Number of operating points per OPS, in the range 0 to MAX_OPS_COUNT (7). int operating_points_count; + + // Enable the low complexity decode mode. + unsigned int enable_low_complexity_decode; /*!\endcond */ } AV2EncoderConfig; diff --git a/avm/avm_encoder.h b/avm/avm_encoder.h index 87cb9adcae..da30358261 100644 --- a/avm/avm_encoder.h +++ b/avm/avm_encoder.h @@ -680,6 +680,13 @@ typedef struct cfg_options { * */ int operating_points_count; + + /*!\brief enable the low complexity decode mode + * If 0, disables the low complexity decode mode (default). + * If 1 and the usage is good-quality, enables the low complexity decode + * mode. + */ + unsigned int enable_low_complexity_decode; } cfg_options_t; /*!\brief Encoded Frame Flags diff --git a/avm/avmcx.h b/avm/avmcx.h index d666486699..40c9def402 100644 --- a/avm/avmcx.h +++ b/avm/avmcx.h @@ -1249,6 +1249,12 @@ enum avme_enc_control_id { * the restricted_prediction_switch output ordering path. */ AV2E_SET_FORCE_DEFERRED_FRAMES_FOR_RAS_TEST = 185, + + /*!\brief Codec control function to enable the low complexity decode mode, + * unsigned int parameter. Value of zero disables this mode. Value of one and + * (g_usage == AVM_USAGE_GOOD_QUALITY) enables this mode. + */ + AV2E_SET_ENABLE_LOW_COMPLEXITY_DECODE = 186, }; /*!\brief avm 1-D scaling mode @@ -1776,6 +1782,9 @@ AVM_CTRL_USE_TYPE(AV2E_SET_MONOTONIC_OUTPUT_ORDER, int) AVM_CTRL_USE_TYPE(AV2E_SET_FORCE_DEFERRED_FRAMES_FOR_RAS_TEST, int) #define AVME_CTRL_AV2E_SET_FORCE_DEFERRED_FRAMES_FOR_RAS_TEST + +AVM_CTRL_USE_TYPE(AV2E_SET_ENABLE_LOW_COMPLEXITY_DECODE, unsigned int) +#define AVME_CTRL_AV2E_SET_ENABLE_LOW_COMPLEXITY_DECODE /*!\endcond */ /*! @} - end defgroup avm_encoder */ #ifdef __cplusplus diff --git a/common/args.c b/common/args.c index 21d48f4eb4..cb34ce25e9 100644 --- a/common/args.c +++ b/common/args.c @@ -170,6 +170,7 @@ int parse_cfg(const char *file, cfg_options_t *config) { GET_PARAMS(crop_win_top_offset); GET_PARAMS(crop_win_bottom_offset); GET_PARAMS(operating_points_count); + GET_PARAMS(enable_low_complexity_decode); fprintf(stderr, "\nInvalid parameter: %s", left); exit(-1); From b361a6f0b6a845989193b2788144382cacd882ff Mon Sep 17 00:00:00 2001 From: RemyaPrakasan <115149832+RemyaPrakasan@users.noreply.github.com> Date: Sat, 1 Aug 2026 05:14:02 +0530 Subject: [PATCH 50/51] Cleanup unused code in compound type search (#5176) 1. Cleanup the unused sf 'enable_interinter_diffwtd_newmv_search` and its associated code 2. Cleanup the code and comments related to COMPOUND_DISTWTD No Stats Changed --- av2/common/av2_common_int.h | 5 +- av2/encoder/bitstream.c | 5 +- av2/encoder/compound_type.c | 144 ++++++++++------------------------- av2/encoder/speed_features.c | 1 - av2/encoder/speed_features.h | 4 - 5 files changed, 44 insertions(+), 115 deletions(-) diff --git a/av2/common/av2_common_int.h b/av2/common/av2_common_int.h index 863a65b781..6e39442efe 100644 --- a/av2/common/av2_common_int.h +++ b/av2/common/av2_common_int.h @@ -602,10 +602,7 @@ typedef struct { } DeltaQInfo; typedef struct { - int order_hint_bits_minus_1; // dist_wtd_comp, ref_frame_mvs, - // frame_sign_bias - // if 0, enable_dist_wtd_comp and - // enable_ref_frame_mvs must be set as 0. + int order_hint_bits_minus_1; int enable_ref_frame_mvs; // 0 - disable ref frame mvs // 1 - enable it int reduced_ref_frame_mvs_mode; // use 1 reference frame combination diff --git a/av2/encoder/bitstream.c b/av2/encoder/bitstream.c index 72b8d453de..3b44b8d0a9 100644 --- a/av2/encoder/bitstream.c +++ b/av2/encoder/bitstream.c @@ -2111,9 +2111,8 @@ static AVM_INLINE void pack_inter_mode_mvs(AV2_COMP *cpi, avm_writer *w) { } // First write idx to indicate current compound inter prediction mode - // group Group A (0): dist_wtd_comp, compound_average Group B (1): - // interintra, compound_diffwtd, wedge - + // group Group A (0): compound_average Group B (1): interintra, + // compound_diffwtd, wedge. if (has_second_ref(mbmi) && mbmi->mode < NEAR_NEARMV_OPTFLOW && (!mbmi->refinemv_flag || !switchable_refinemv_flag(cm, mbmi)) && !is_joint_amvd_coding_mode(mbmi->mode, mbmi->use_amvd)) { diff --git a/av2/encoder/compound_type.c b/av2/encoder/compound_type.c index e9b35f7425..bba4099032 100644 --- a/av2/encoder/compound_type.c +++ b/av2/encoder/compound_type.c @@ -53,15 +53,12 @@ static INLINE int is_comp_rd_match(const AV2_COMP *const cpi, // TODO(any): Consider tools like OPFL, SMVR in the match criteria. - // Store the stats for COMPOUND_AVERAGE and COMPOUND_DISTWTD - for (int comp_type = COMPOUND_AVERAGE; comp_type < COMPOUND_WEDGE; - comp_type++) { - comp_rate[comp_type] = st->rate[comp_type]; - comp_dist[comp_type] = st->dist[comp_type]; - comp_model_rate[comp_type] = st->model_rate[comp_type]; - comp_model_dist[comp_type] = st->model_dist[comp_type]; - comp_rs2[comp_type] = st->comp_rs2[comp_type]; - } + // Store the stats for COMPOUND_AVERAGE. + comp_rate[COMPOUND_AVERAGE] = st->rate[COMPOUND_AVERAGE]; + comp_dist[COMPOUND_AVERAGE] = st->dist[COMPOUND_AVERAGE]; + comp_model_rate[COMPOUND_AVERAGE] = st->model_rate[COMPOUND_AVERAGE]; + comp_model_dist[COMPOUND_AVERAGE] = st->model_dist[COMPOUND_AVERAGE]; + comp_rs2[COMPOUND_AVERAGE] = st->comp_rs2[COMPOUND_AVERAGE]; // For compound wedge/segment, reuse data only if NEWMV is not present in // either of the directions @@ -862,66 +859,49 @@ int av2_handle_inter_intra_mode(const AV2_COMP *const cpi, MACROBLOCK *const x, return 0; } -static void alloc_compound_type_rd_buffers_no_check( - CompoundTypeRdBuffers *const bufs) { - bufs->pred0 = - (uint16_t *)avm_memalign(16, MAX_SB_SQUARE * sizeof(*bufs->pred0)); - bufs->pred1 = - (uint16_t *)avm_memalign(16, MAX_SB_SQUARE * sizeof(*bufs->pred1)); - bufs->residual1 = - (int16_t *)avm_memalign(32, MAX_SB_SQUARE * sizeof(*bufs->residual1)); - bufs->diff10 = - (int16_t *)avm_memalign(32, MAX_SB_SQUARE * sizeof(*bufs->diff10)); - bufs->tmp_best_mask_buf = (uint8_t *)avm_malloc( - 2 * MAX_SB_SQUARE * sizeof(*bufs->tmp_best_mask_buf)); -} - -// Computes the valid compound_types to be evaluated -static INLINE int compute_valid_comp_types( - MACROBLOCK *x, const AV2_COMP *const cpi, int *try_average_and_distwtd_comp, - BLOCK_SIZE bsize, int masked_compound_used, int mode_search_mask, - COMPOUND_TYPE *valid_comp_types) { +// Computes the valid compound_types to be evaluated. +static INLINE int compute_valid_comp_types(MACROBLOCK *x, + const AV2_COMP *const cpi, + BLOCK_SIZE bsize, + int masked_compound_used, + int mode_search_mask, + COMPOUND_TYPE *valid_comp_types) { int valid_type_count = 0; - int comp_type, valid_check; MACROBLOCKD *xd = &x->e_mbd; MB_MODE_INFO *mbmi = xd->mi[0]; const PREDICTION_MODE this_mode = mbmi->mode; - // For implementation simplicity, set compound type to COMPOUND_AVERAGE for - // now to avoid compound type RD search. In practice, dist_wtd will always - // be applied instead. if (this_mode >= NEAR_NEARMV_OPTFLOW || (mbmi->refinemv_flag && switchable_refinemv_flag(&cpi->common, mbmi))) { - *try_average_and_distwtd_comp = 0; - valid_comp_types[0] = COMPOUND_AVERAGE; - return 1; + valid_comp_types[valid_type_count++] = COMPOUND_AVERAGE; + return valid_type_count; } - int8_t enable_masked_type[MASKED_COMPOUND_TYPES] = { 0, 0 }; - const int try_average_comp = (mode_search_mask & (1 << COMPOUND_AVERAGE)); - *try_average_and_distwtd_comp = 0; - - // Check if COMPOUND_AVERAGE and COMPOUND_DISTWTD are valid cases - for (comp_type = COMPOUND_AVERAGE; comp_type < COMPOUND_WEDGE; comp_type++) { - valid_check = (comp_type == COMPOUND_AVERAGE) ? try_average_comp : 0; - if (!*try_average_and_distwtd_comp && valid_check && - is_interinter_compound_used(comp_type, bsize)) - valid_comp_types[valid_type_count++] = comp_type; + // Check if COMPOUND_AVERAGE is valid. + if ((mode_search_mask & (1 << COMPOUND_AVERAGE)) && + is_interinter_compound_used(COMPOUND_AVERAGE, bsize)) { + valid_comp_types[valid_type_count++] = COMPOUND_AVERAGE; } - // Check if COMPOUND_WEDGE and COMPOUND_DIFFWTD are valid cases + + // Check if COMPOUND_WEDGE and COMPOUND_DIFFWTD are valid. if (masked_compound_used) { // enable_masked_type[0] corresponds to COMPOUND_WEDGE // enable_masked_type[1] corresponds to COMPOUND_DIFFWTD + int8_t enable_masked_type[MASKED_COMPOUND_TYPES] = { 0 }; + enable_masked_type[0] = enable_wedge_interinter_search(x, cpi); enable_masked_type[1] = !is_thin_4xn_nx4_block(bsize) && cpi->oxcf.comp_type_cfg.enable_diff_wtd_comp; - for (comp_type = COMPOUND_WEDGE; comp_type <= COMPOUND_DIFFWTD; - comp_type++) { + + for (COMPOUND_TYPE comp_type = COMPOUND_WEDGE; + comp_type <= COMPOUND_DIFFWTD; ++comp_type) { if ((mode_search_mask & (1 << comp_type)) && is_interinter_compound_used(comp_type, bsize) && - enable_masked_type[comp_type - COMPOUND_WEDGE]) + enable_masked_type[comp_type - COMPOUND_WEDGE]) { valid_comp_types[valid_type_count++] = comp_type; + } } } + assert(valid_type_count <= COMPOUND_TYPES); return valid_type_count; } @@ -936,8 +916,7 @@ static INLINE void calc_masked_type_cost(const ModeCosts *mode_costs, // Account for group index cost when wedge and/or diffwtd prediction are // enabled if (masked_compound_used) { - // Compound group index of average and distwtd is 0 - // Compound group index of wedge and diffwtd is 1 + // Compound group index of average is 0 and that of wedge and diffwtd is 1. masked_type_cost[COMPOUND_AVERAGE] += mode_costs->comp_group_idx_cost[comp_group_idx_ctx][0]; masked_type_cost[COMPOUND_WEDGE] += @@ -997,11 +976,8 @@ static INLINE void update_best_info(const MB_MODE_INFO *const mbmi, int64_t *rd, static INLINE void update_mask_best_mv(const MB_MODE_INFO *const mbmi, int_mv *best_mv, int_mv *cur_mv, const COMPOUND_TYPE cur_type, - int *best_tmp_rate_mv, int tmp_rate_mv, - const SPEED_FEATURES *const sf) { - if (cur_type == COMPOUND_WEDGE || - (sf->inter_sf.enable_interinter_diffwtd_newmv_search && - cur_type == COMPOUND_DIFFWTD)) { + int *best_tmp_rate_mv, int tmp_rate_mv) { + if (cur_type == COMPOUND_WEDGE) { *best_tmp_rate_mv = tmp_rate_mv; best_mv[0].as_int = mbmi->mv[0].as_int; best_mv[1].as_int = mbmi->mv[1].as_int; @@ -1153,10 +1129,6 @@ static int64_t masked_compound_type_rd( have_newmv_in_inter_mode(this_mode) && (compound_type == COMPOUND_WEDGE) && (!cpi->sf.inter_sf.disable_interinter_wedge_newmv_search); - int diffwtd_newmv_search = - cpi->sf.inter_sf.enable_interinter_diffwtd_newmv_search && - compound_type == COMPOUND_DIFFWTD && - have_newmv_in_inter_mode(this_mode); // Search for new MV if needed and build predictor if (wedge_newmv_search) { @@ -1166,36 +1138,6 @@ static int64_t masked_compound_type_rd( const int mi_col = xd->mi_col; av2_enc_build_inter_predictor(cm, xd, mi_row, mi_col, ctx, bsize, AVM_PLANE_Y, AVM_PLANE_Y); - } else if (diffwtd_newmv_search) { - *out_rate_mv = av2_interinter_compound_motion_search(cpi, x, cur_mv, - bsize, this_mode); - // we need to update the mask according to the new motion vector - CompoundTypeRdBuffers tmp_buf; - int64_t tmp_rd = INT64_MAX; - alloc_compound_type_rd_buffers_no_check(&tmp_buf); - get_inter_predictor_masked_compound_y(x, bsize, tmp_buf.pred0, - tmp_buf.pred1, tmp_buf.residual1, - tmp_buf.diff10, stride); - - tmp_rd = pick_interinter_mask[compound_type - COMPOUND_WEDGE]( - cpi, x, bsize, tmp_buf.pred0, tmp_buf.pred1, tmp_buf.residual1, - tmp_buf.diff10, &cur_sse); - // we can reuse rs2 here - tmp_rd += RDCOST(x->rdmult, *rs2 + *out_rate_mv, 0); - - if (tmp_rd >= best_rd_cur) { - // restore the motion vector - mbmi->mv[0].as_int = cur_mv[0].as_int; - mbmi->mv[1].as_int = cur_mv[1].as_int; - *out_rate_mv = rate_mv; - av2_build_wedge_inter_predictor_from_buf_y(xd, bsize, pred0, stride, - pred1, stride); - } else { - // build the final prediciton using the updated mv - av2_build_wedge_inter_predictor_from_buf_y( - xd, bsize, tmp_buf.pred0, stride, tmp_buf.pred1, stride); - } - release_compound_type_rd_buffers(&tmp_buf); } else { *out_rate_mv = rate_mv; av2_build_wedge_inter_predictor_from_buf_y(xd, bsize, pred0, stride, @@ -1320,14 +1262,11 @@ int av2_compound_type_rd(const AV2_COMP *const cpi, MACROBLOCK *x, COMPOUND_TYPE valid_comp_types[COMPOUND_TYPES] = { COMPOUND_AVERAGE, COMPOUND_WEDGE, COMPOUND_DIFFWTD }; - int valid_type_count = 0; - int try_average_and_distwtd_comp = 0; + // compute_valid_comp_types() returns the number of valid compound types to be // evaluated and populates the same in the local array valid_comp_types[]. - // It also sets the flag 'try_average_and_distwtd_comp' - valid_type_count = compute_valid_comp_types( - x, cpi, &try_average_and_distwtd_comp, bsize, masked_compound_used, - mode_search_mask, valid_comp_types); + const int valid_type_count = compute_valid_comp_types( + x, cpi, bsize, masked_compound_used, mode_search_mask, valid_comp_types); // The following context indices are independent of compound type const int comp_group_idx_ctx = get_comp_group_idx_context(cm, xd); @@ -1337,7 +1276,7 @@ int av2_compound_type_rd(const AV2_COMP *const cpi, MACROBLOCK *x, else if (mbmi->refinemv_flag && switchable_refinemv_flag(cm, mbmi)) av2_zero_array(masked_type_cost, COMPOUND_TYPES); else - // Populates masked_type_cost local array for the 4 compound types + // Populates masked_type_cost local array for the 3 compound types. calc_masked_type_cost(&x->mode_costs, bsize, comp_group_idx_ctx, masked_compound_used, masked_type_cost); @@ -1369,8 +1308,7 @@ int av2_compound_type_rd(const AV2_COMP *const cpi, MACROBLOCK *x, assert(IMPLIES(is_thin_4xn_nx4_block(bsize), cur_type != COMPOUND_DIFFWTD)); - // Case COMPOUND_AVERAGE and COMPOUND_DISTWTD - if (cur_type < COMPOUND_WEDGE) { + if (cur_type == COMPOUND_AVERAGE) { update_mbmi_for_compound_type(mbmi, cur_type); rs2 = masked_type_cost[cur_type]; @@ -1384,7 +1322,7 @@ int av2_compound_type_rd(const AV2_COMP *const cpi, MACROBLOCK *x, if (comp_rate[cur_type] == INT_MAX) { av2_enc_build_inter_predictor(cm, xd, mi_row, mi_col, orig_dst, bsize, AVM_PLANE_Y, AVM_PLANE_Y); - if (cur_type == COMPOUND_AVERAGE) *is_luma_interp_done = 1; + *is_luma_interp_done = 1; // Compute RD cost for the current type RD_STATS est_rd_stats; @@ -1429,8 +1367,8 @@ int av2_compound_type_rd(const AV2_COMP *const cpi, MACROBLOCK *x, comp_model_dist[cur_type]); } } - // use spare buffer for following compound type try - if (cur_type == COMPOUND_AVERAGE) restore_dst_buf(xd, *tmp_dst, 1); + // Use spare buffer for other compound types. + restore_dst_buf(xd, *tmp_dst, 1); } else { // Handle masked compound types update_mbmi_for_compound_type(mbmi, cur_type); @@ -1467,7 +1405,7 @@ int av2_compound_type_rd(const AV2_COMP *const cpi, MACROBLOCK *x, memcpy(buffers->tmp_best_mask_buf, xd->seg_mask, mask_len); if (have_newmv_in_inter_mode(this_mode)) update_mask_best_mv(mbmi, best_mv, cur_mv, cur_type, - &best_tmp_rate_mv, tmp_rate_mv, &cpi->sf); + &best_tmp_rate_mv, tmp_rate_mv); } } // reset to original mvs for next iteration diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 88d404186c..005a227017 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -817,7 +817,6 @@ static AVM_INLINE void init_inter_sf(INTER_MODE_SPEED_FEATURES *inter_sf) { inter_sf->prune_mode_search_simple_translation = 0; inter_sf->prune_comp_type_by_comp_avg = 0; inter_sf->disable_interinter_wedge_newmv_search = 0; - inter_sf->enable_interinter_diffwtd_newmv_search = 0; inter_sf->prune_motion_mode_level = 0; inter_sf->fast_interintra_wedge_search = 0; inter_sf->prune_comp_type_by_model_rd = 0; diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index ddbca29319..e9352132f9 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -729,10 +729,6 @@ typedef struct INTER_MODE_SPEED_FEATURES { // Enable/disable ME for interinter wedge search. int disable_interinter_wedge_newmv_search; - // Enable/disable ME for interinter diffwtd search. PSNR BD-rate gain of - // ~0.1 on the lowres test set, but ~15% slower computation. - int enable_interinter_diffwtd_newmv_search; - // Disable interinter_wedge int disable_interinter_wedge; From 78d9f4c04aa6620baf304475e45cd709c6b9a74c Mon Sep 17 00:00:00 2001 From: Jianle Chen Date: Sat, 1 Aug 2026 17:55:40 -0700 Subject: [PATCH 51/51] Enable deblock filter for partition research (#5180) This feature considers the distortion reduction of deblocking filter for partition research. -- The deblocking filter is applied to a non-split partition after the best mode is picked for the current block. The distortion improvement of the deblocking filter is used to update the best RD cost of the current none-split partition block. This encoder side only feature provides the coding gain with slight encoding time increase. Should be a good trade-off for low speed level. Results of 33 frame (cpu1), a1 (missing 3 sequences) and a2 (missing 1 sequence) are as follows: +---------+--------+-------+-------+-------+----------+----------+ | Summary | Y | U | V | YUV | Enc-time | Dec-time | +---------+--------+-------+-------+-------+----------+----------+ | A1 | -0.62% | -0.14% | -0.49% | -0.58% | 102.06% | 100.82% | | A2 | -0.39% | +0.15% | -0.70% | -0.38% | 102.37% | 100.56% | +---------+--------+-------+-------+-------+----------+----------+ --- av2/common/av2_loopfilter.c | 179 +++++++++++++++++++-------------- av2/common/av2_loopfilter.h | 6 +- av2/common/thread_common.c | 4 +- av2/encoder/encodeframe.c | 3 + av2/encoder/partition_search.c | 115 ++++++++++++++++++++- av2/encoder/speed_features.c | 4 + av2/encoder/speed_features.h | 3 + 7 files changed, 228 insertions(+), 86 deletions(-) diff --git a/av2/common/av2_loopfilter.c b/av2/common/av2_loopfilter.c index 092c4f6300..edba623d75 100644 --- a/av2/common/av2_loopfilter.c +++ b/av2/common/av2_loopfilter.c @@ -553,7 +553,7 @@ static TX_SIZE set_lpf_parameters( AV2_COMMON *const cm, const MACROBLOCKD *const xd, const EDGE_DIR edge_dir, const uint32_t x, const uint32_t y, const int plane, const struct macroblockd_plane *const plane_ptr, TX_SIZE *tx_size, - int *mi_size_min) { + int *mi_size_min, const int dlk_rd_flag) { if (*mi_size_min) { *mi_size_min -= 1; return *tx_size; @@ -611,7 +611,7 @@ static TX_SIZE set_lpf_parameters( check_sub_pu_edge(cm, xd, mbmi, plane, tree_type, scale_horz, scale_vert, edge_dir, coord, &ts, &sub_pu_edge, &tx_m_partition_size); if (!tu_edge && !sub_pu_edge) return ts; - if (cm->seq_params.disable_loopfilters_across_tiles) { + if (cm->seq_params.disable_loopfilters_across_tiles || dlk_rd_flag) { if (edge_dir == VERT_EDGE) if (is_vert_tile_boundary(&cm->tiles, mi_col)) return ts; if (edge_dir == HORZ_EDGE) @@ -812,7 +812,9 @@ static uint8_t get_lossless_flag( void av2_filter_block_plane_vert(AV2_COMMON *const cm, const MACROBLOCKD *const xd, const int plane, const MACROBLOCKD_PLANE *const plane_ptr, - const uint32_t mi_row, const uint32_t mi_col) { + const uint32_t mi_row, const uint32_t mi_col, + const int dlk_rd_flag, + const BLOCK_SIZE bsize) { if (!plane && !cm->lf.apply_deblocking_filter[0]) return; const int mib_size = cm->mib_size; const uint32_t scale_horz = plane_ptr->subsampling_x; @@ -826,8 +828,14 @@ void av2_filter_block_plane_vert(AV2_COMMON *const cm, } uint16_t *const dst_ptr = plane_ptr->dst.buf; const int dst_stride = plane_ptr->dst.stride; - const int y_range = (mib_size >> scale_vert); - const int x_range = (mib_size >> scale_horz); + int x_range, y_range; + if (dlk_rd_flag) { + y_range = mi_size_high[bsize] >> scale_vert; + x_range = mi_size_wide[bsize] >> scale_horz; + } else { + y_range = (mib_size >> scale_vert); + x_range = (mib_size >> scale_horz); + } AV2_DEBLOCKING_PARAMETERS params_buf[MAX_MIB_SIZE]; TX_SIZE tx_size_buf[MAX_MIB_SIZE] = { 0 }; @@ -852,9 +860,9 @@ void av2_filter_block_plane_vert(AV2_COMMON *const cm, uint32_t advance_units; TX_SIZE cur_tx_size = TX_4X4; - cur_tx_size = set_lpf_parameters(params, prev_x, curr_y, cm, xd, - VERT_EDGE, curr_x, curr_y, plane, - plane_ptr, tx_size, mi_size_min_height); + cur_tx_size = set_lpf_parameters( + params, prev_x, curr_y, cm, xd, VERT_EDGE, curr_x, curr_y, plane, + plane_ptr, tx_size, mi_size_min_height, dlk_rd_flag); if (cur_tx_size == TX_INVALID) { params->filter_length_neg = 0; @@ -863,35 +871,38 @@ void av2_filter_block_plane_vert(AV2_COMMON *const cm, cur_tx_size = TX_4X4; } - const avm_bit_depth_t bit_depth = cm->seq_params.bit_depth; - bool is_lossless_current_block = get_lossless_flag( - cm, curr_x, curr_y, scale_horz, scale_vert, plane, plane_ptr); - bool is_lossless_prev_block = get_lossless_flag( - cm, prev_x, curr_y, scale_horz, scale_vert, plane, plane_ptr); - bool skip_deblock_lossless = - is_lossless_current_block && is_lossless_prev_block; + if (!dlk_rd_flag || + !is_vert_tile_boundary(&cm->tiles, mi_col + (x << scale_horz))) { + const avm_bit_depth_t bit_depth = cm->seq_params.bit_depth; + bool is_lossless_current_block = get_lossless_flag( + cm, curr_x, curr_y, scale_horz, scale_vert, plane, plane_ptr); + bool is_lossless_prev_block = get_lossless_flag( + cm, prev_x, curr_y, scale_horz, scale_vert, plane, plane_ptr); + bool skip_deblock_lossless = + is_lossless_current_block && is_lossless_prev_block; + + int do_filter = 1; + if (cm->seq_params.disable_loopfilters_across_tiles) { + if (is_vert_tile_boundary(&cm->tiles, mi_col + (x << scale_horz))) + do_filter = 0; + } + if (do_filter) { + if (!skip_deblock_lossless && + (params->filter_length_neg || params->filter_length_pos)) { + if (!(is_lossless_prev_block || is_lossless_current_block)) { + avm_highbd_lpf_vertical_generic( + p, dst_stride, params->filter_length_neg, + params->filter_length_pos, ¶ms->q_threshold, + ¶ms->side_threshold, bit_depth, is_lossless_prev_block, + is_lossless_current_block); - int do_filter = 1; - if (cm->seq_params.disable_loopfilters_across_tiles) { - if (is_vert_tile_boundary(&cm->tiles, mi_col + (x << scale_horz))) - do_filter = 0; - } - if (do_filter) { - if (!skip_deblock_lossless && - (params->filter_length_neg || params->filter_length_pos)) { - if (!(is_lossless_prev_block || is_lossless_current_block)) { - avm_highbd_lpf_vertical_generic( - p, dst_stride, params->filter_length_neg, - params->filter_length_pos, ¶ms->q_threshold, - ¶ms->side_threshold, bit_depth, is_lossless_prev_block, - is_lossless_current_block); - - } else { - avm_highbd_lpf_vertical_generic_c( - p, dst_stride, params->filter_length_neg, - params->filter_length_pos, ¶ms->q_threshold, - ¶ms->side_threshold, bit_depth, is_lossless_prev_block, - is_lossless_current_block); + } else { + avm_highbd_lpf_vertical_generic_c( + p, dst_stride, params->filter_length_neg, + params->filter_length_pos, ¶ms->q_threshold, + ¶ms->side_threshold, bit_depth, is_lossless_prev_block, + is_lossless_current_block); + } } } } @@ -911,7 +922,9 @@ void av2_filter_block_plane_vert(AV2_COMMON *const cm, void av2_filter_block_plane_horz(AV2_COMMON *const cm, const MACROBLOCKD *const xd, const int plane, const MACROBLOCKD_PLANE *const plane_ptr, - const uint32_t mi_row, const uint32_t mi_col) { + const uint32_t mi_row, const uint32_t mi_col, + const int dlk_rd_flag, + const BLOCK_SIZE bsize) { if (!plane && !cm->lf.apply_deblocking_filter[1]) return; const int mib_size = cm->mib_size; const uint32_t scale_horz = plane_ptr->subsampling_x; @@ -925,8 +938,14 @@ void av2_filter_block_plane_horz(AV2_COMMON *const cm, } uint16_t *const dst_ptr = plane_ptr->dst.buf; const int dst_stride = plane_ptr->dst.stride; - const int y_range = (mib_size >> scale_vert); - const int x_range = (mib_size >> scale_horz); + int x_range, y_range; + if (dlk_rd_flag) { + y_range = mi_size_high[bsize] >> scale_vert; + x_range = mi_size_wide[bsize] >> scale_horz; + } else { + y_range = (mib_size >> scale_vert); + x_range = (mib_size >> scale_horz); + } AV2_DEBLOCKING_PARAMETERS params_buf[MAX_MIB_SIZE]; TX_SIZE tx_size_buf[MAX_MIB_SIZE] = { 0 }; @@ -951,43 +970,47 @@ void av2_filter_block_plane_horz(AV2_COMMON *const cm, uint32_t advance_units; TX_SIZE cur_tx_size = TX_4X4; - cur_tx_size = set_lpf_parameters(params, curr_x, prev_y, cm, xd, - HORZ_EDGE, curr_x, curr_y, plane, - plane_ptr, tx_size, mi_size_min_width); + cur_tx_size = set_lpf_parameters( + params, curr_x, prev_y, cm, xd, HORZ_EDGE, curr_x, curr_y, plane, + plane_ptr, tx_size, mi_size_min_width, dlk_rd_flag); if (cur_tx_size == TX_INVALID) { params->filter_length_neg = 0; params->filter_length_pos = 0; cur_tx_size = TX_4X4; } - bool is_lossless_current_block = get_lossless_flag( - cm, curr_x, curr_y, scale_horz, scale_vert, plane, plane_ptr); - bool is_lossless_prev_block = get_lossless_flag( - cm, curr_x, prev_y, scale_horz, scale_vert, plane, plane_ptr); - bool skip_deblock_lossless = - is_lossless_current_block && is_lossless_prev_block; - - int do_filter = 1; - if (cm->seq_params.disable_loopfilters_across_tiles) { - if (is_horz_tile_boundary(&cm->tiles, mi_row + (y << scale_vert))) - do_filter = 0; - } - if (do_filter) { - const avm_bit_depth_t bit_depth = cm->seq_params.bit_depth; - if (!skip_deblock_lossless && - (params->filter_length_neg || params->filter_length_pos)) { - if (!(is_lossless_current_block || is_lossless_prev_block)) { - avm_highbd_lpf_horizontal_generic( - p, dst_stride, params->filter_length_neg, - params->filter_length_pos, ¶ms->q_threshold, - ¶ms->side_threshold, bit_depth, is_lossless_prev_block, - is_lossless_current_block); - } else { - avm_highbd_lpf_horizontal_generic_c( - p, dst_stride, params->filter_length_neg, - params->filter_length_pos, ¶ms->q_threshold, - ¶ms->side_threshold, bit_depth, is_lossless_prev_block, - is_lossless_current_block); + + if (!dlk_rd_flag || + !is_horz_tile_boundary(&cm->tiles, mi_row + (y << scale_vert))) { + bool is_lossless_current_block = get_lossless_flag( + cm, curr_x, curr_y, scale_horz, scale_vert, plane, plane_ptr); + bool is_lossless_prev_block = get_lossless_flag( + cm, curr_x, prev_y, scale_horz, scale_vert, plane, plane_ptr); + bool skip_deblock_lossless = + is_lossless_current_block && is_lossless_prev_block; + + int do_filter = 1; + if (cm->seq_params.disable_loopfilters_across_tiles) { + if (is_horz_tile_boundary(&cm->tiles, mi_row + (y << scale_vert))) + do_filter = 0; + } + if (do_filter) { + const avm_bit_depth_t bit_depth = cm->seq_params.bit_depth; + if (!skip_deblock_lossless && + (params->filter_length_neg || params->filter_length_pos)) { + if (!(is_lossless_current_block || is_lossless_prev_block)) { + avm_highbd_lpf_horizontal_generic( + p, dst_stride, params->filter_length_neg, + params->filter_length_pos, ¶ms->q_threshold, + ¶ms->side_threshold, bit_depth, is_lossless_prev_block, + is_lossless_current_block); + } else { + avm_highbd_lpf_horizontal_generic_c( + p, dst_stride, params->filter_length_neg, + params->filter_length_pos, ¶ms->q_threshold, + ¶ms->side_threshold, bit_depth, is_lossless_prev_block, + is_lossless_current_block); + } } } } @@ -1031,21 +1054,21 @@ static void loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV2_COMMON *cm, // filter vertical edges av2_setup_dst_planes(pd, frame_buffer, mi_row, mi_col, plane, plane + 1, NULL); - av2_filter_block_plane_vert(cm, xd, plane, &pd[plane], mi_row, - mi_col); + av2_filter_block_plane_vert(cm, xd, plane, &pd[plane], mi_row, mi_col, + 0, BLOCK_INVALID); // filter horizontal edges if (mi_col - mib_size >= 0) { av2_setup_dst_planes(pd, frame_buffer, mi_row, mi_col - mib_size, plane, plane + 1, NULL); av2_filter_block_plane_horz(cm, xd, plane, &pd[plane], mi_row, - mi_col - mib_size); + mi_col - mib_size, 0, BLOCK_INVALID); } } // filter horizontal edges av2_setup_dst_planes(pd, frame_buffer, mi_row, mi_col - mib_size, plane, plane + 1, NULL); av2_filter_block_plane_horz(cm, xd, plane, &pd[plane], mi_row, - mi_col - mib_size); + mi_col - mib_size, 0, BLOCK_INVALID); } } else { // filter all vertical edges in every 128x128 super block @@ -1053,8 +1076,8 @@ static void loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV2_COMMON *cm, for (mi_col = col_start; mi_col < col_end; mi_col += mib_size) { av2_setup_dst_planes(pd, frame_buffer, mi_row, mi_col, plane, plane + 1, NULL); - av2_filter_block_plane_vert(cm, xd, plane, &pd[plane], mi_row, - mi_col); + av2_filter_block_plane_vert(cm, xd, plane, &pd[plane], mi_row, mi_col, + 0, BLOCK_INVALID); } } @@ -1063,8 +1086,8 @@ static void loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV2_COMMON *cm, for (mi_col = col_start; mi_col < col_end; mi_col += mib_size) { av2_setup_dst_planes(pd, frame_buffer, mi_row, mi_col, plane, plane + 1, NULL); - av2_filter_block_plane_horz(cm, xd, plane, &pd[plane], mi_row, - mi_col); + av2_filter_block_plane_horz(cm, xd, plane, &pd[plane], mi_row, mi_col, + 0, BLOCK_INVALID); } } } diff --git a/av2/common/av2_loopfilter.h b/av2/common/av2_loopfilter.h index daa22b7603..311f9202cf 100644 --- a/av2/common/av2_loopfilter.h +++ b/av2/common/av2_loopfilter.h @@ -103,12 +103,14 @@ void init_tip_lf_parameter(struct AV2Common *cm, int plane_start, void av2_filter_block_plane_vert(struct AV2Common *const cm, const MACROBLOCKD *const xd, const int plane, const MACROBLOCKD_PLANE *const plane_ptr, - const uint32_t mi_row, const uint32_t mi_col); + const uint32_t mi_row, const uint32_t mi_col, + const int dlk_rd_flag, const BLOCK_SIZE bsize); void av2_filter_block_plane_horz(struct AV2Common *const cm, const MACROBLOCKD *const xd, const int plane, const MACROBLOCKD_PLANE *const plane_ptr, - const uint32_t mi_row, const uint32_t mi_col); + const uint32_t mi_row, const uint32_t mi_col, + const int dlk_rd_flag, const BLOCK_SIZE bsize); int df_quant_from_qindex(int q_index, int bit_depth); int df_side_from_qindex(int q_index, int bit_depth); diff --git a/av2/common/thread_common.c b/av2/common/thread_common.c index ce4372642c..4c175349b7 100644 --- a/av2/common/thread_common.c +++ b/av2/common/thread_common.c @@ -325,7 +325,7 @@ static INLINE void thread_loop_filter_rows( plane + 1, NULL); av2_filter_block_plane_vert(cm, xd, plane, &planes[plane], mi_row, - mi_col); + mi_col, 0, BLOCK_INVALID); sync_write(lf_sync, r, c, sb_cols, plane); } } else if (dir == 1) { @@ -343,7 +343,7 @@ static INLINE void thread_loop_filter_rows( av2_setup_dst_planes(planes, frame_buffer, mi_row, mi_col, plane, plane + 1, NULL); av2_filter_block_plane_horz(cm, xd, plane, &planes[plane], mi_row, - mi_col); + mi_col, 0, BLOCK_INVALID); } } } else { diff --git a/av2/encoder/encodeframe.c b/av2/encoder/encodeframe.c index 8adf93a66d..99acbe8cbd 100644 --- a/av2/encoder/encodeframe.c +++ b/av2/encoder/encodeframe.c @@ -2263,6 +2263,9 @@ static AVM_INLINE void encode_frame_internal(AV2_COMP *cpi) { av2_enc_setup_tip_frame(cpi); + cm->lf.apply_deblocking_filter[0] = cpi->oxcf.tool_cfg.enable_deblocking; + if (cm->lf.apply_deblocking_filter[0]) av2_loop_filter_frame_init(cm, 0, 1); + cm->current_frame.skip_mode_info.skip_mode_flag = check_skip_mode_enabled(cpi) && cpi->oxcf.tool_cfg.enable_skip_mode; diff --git a/av2/encoder/partition_search.c b/av2/encoder/partition_search.c index d6e72f557c..07f29f8568 100644 --- a/av2/encoder/partition_search.c +++ b/av2/encoder/partition_search.c @@ -12,12 +12,14 @@ #include "avm/avm_codec.h" #include "avm_ports/system_state.h" +#include "avm_dsp/psnr.h" #include "av2/common/bru.h" #include "avm_ports/avm_timer.h" #include "av2/encoder/partition_mlp.h" #include "av2/common/av2_common_int.h" +#include "av2/common/av2_loopfilter.h" #include "av2/common/blockd.h" #include "av2/common/common_data.h" #include "av2/common/enums.h" @@ -3562,10 +3564,95 @@ static void inter_sdp_copy_luma_mode_info(PC_TREE *pc_tree, *mbmi = cur_pc_tree->none[INTRA_REGION]->mic; } +static int64_t get_dist_offset_by_deblock( + AV2_COMP *const cpi, ThreadData *td, TileDataEnc *tile_data, MACROBLOCK *x, + TokenExtra **tp, PICK_MODE_CONTEXT *ctx_none, RD_STATS *const this_rdc, + const int mi_col, const int mi_row, const BLOCK_SIZE bsize) { + AV2_COMMON *const cm = &cpi->common; + + const YV12_BUFFER_CONFIG *curr = &cm->cur_frame->buf; + const YV12_BUFFER_CONFIG *src = cpi->source; + + const YV12_BUFFER_CONFIG *filtered = &cpi->trial_frame_rst; + int rate = 0; + encode_b(cpi, tile_data, td, tp, mi_row, mi_col, DRY_RUN_NORMAL, bsize, + PARTITION_NONE, ctx_none, &rate); + + const int bw = block_size_wide[bsize]; + const int bh = block_size_high[bsize]; + + int64_t rec_dist = avm_highbd_get_y_sse_part(src, curr, mi_col * MI_SIZE, bw, + mi_row * MI_SIZE, bh); + + if (x->e_mbd.tree_type != LUMA_PART) { + const int sub_x = cm->seq_params.subsampling_x; + const int sub_y = cm->seq_params.subsampling_y; + rec_dist += avm_highbd_get_u_sse_part( + src, curr, mi_col * MI_SIZE >> sub_x, bw >> sub_x, + mi_row * MI_SIZE >> sub_y, bh >> sub_y); + rec_dist += avm_highbd_get_v_sse_part( + src, curr, mi_col * MI_SIZE >> sub_x, bw >> sub_x, + mi_row * MI_SIZE >> sub_y, bh >> sub_y); + } + + if (llabs(this_rdc->dist - rec_dist) < this_rdc->dist / 50) { + int h_start = mi_col * MI_SIZE; + int v_start = mi_row * MI_SIZE; + int area_w = bw; + int area_h = bh; + + MACROBLOCKD *xd = &x->e_mbd; + if (xd->up_available) { + int v_offset = bh == 4 ? 4 : 8; + v_start -= v_offset; + area_h += v_offset; + } + if (xd->left_available) { + int h_offset = bw == 4 ? 4 : 8; + h_start -= h_offset; + area_w += h_offset; + } + + const int64_t unfiltered_y_dist = + avm_highbd_get_y_sse_part(src, curr, h_start, area_w, v_start, area_h); + + uint16_t *curr_data = curr->buffers[0] + v_start * curr->y_stride + h_start; + uint16_t *filtered_data = + filtered->buffers[0] + v_start * filtered->y_stride + h_start; + copy_tile(area_w, area_h, curr_data, curr->y_stride, filtered_data, + filtered->y_stride); + + const int plane = 0; + struct macroblockd_plane *pd = xd->plane; + av2_setup_dst_planes(pd, filtered, mi_row, mi_col, plane, plane + 1, NULL); + av2_filter_block_plane_vert(cm, xd, plane, &pd[plane], mi_row, mi_col, 1, + bsize); + + av2_setup_dst_planes(pd, filtered, mi_row, mi_col, plane, plane + 1, NULL); + av2_filter_block_plane_horz(cm, xd, plane, &pd[plane], mi_row, mi_col, 1, + bsize); + + const int64_t filtered_y_dist = avm_highbd_get_y_sse_part( + src, filtered, h_start, area_w, v_start, area_h); + + const int bit_depth = cm->seq_params.bit_depth; + int dist_normal; // dist is normalized to 16 * 8_bit_content_distortion + if (bit_depth <= 10) { + dist_normal = 1 << ((10 - cm->seq_params.bit_depth) * 2); + return dist_normal * (filtered_y_dist - unfiltered_y_dist); + } else { + dist_normal = 1 << ((cm->seq_params.bit_depth - 10) * 2); + return (filtered_y_dist - unfiltered_y_dist) / dist_normal; + } + } else { + return 0; + } +} + // PARTITION_NONE search. static void none_partition_search( AV2_COMP *const cpi, ThreadData *td, TileDataEnc *tile_data, MACROBLOCK *x, - PC_TREE *pc_tree, SIMPLE_MOTION_DATA_TREE *sms_tree, + TokenExtra **tp, PC_TREE *pc_tree, SIMPLE_MOTION_DATA_TREE *sms_tree, RD_SEARCH_MACROBLOCK_CONTEXT *x_ctx, PartitionSearchState *part_search_state, RD_STATS *best_rdc, unsigned int *pb_source_variance, int64_t *none_rd, int64_t *part_none_rd, @@ -3610,6 +3697,16 @@ static void none_partition_search( // Set PARTITION_NONE context and cost. set_none_partition_params(cm, td, x, pc_tree, part_search_state, &best_remain_rdcost, best_rdc, &pt_cost); + if (best_rdc->rdcost != INT64_MAX && + cpi->sf.lpf_sf.enable_deblock_for_partition_search && + !cpi->is_screen_content_type) { + // increase the remaining best cost which could have be reduced by deblock + // filer 1.125 (9/8) is experimental number which is not intensively tested. + best_remain_rdcost.rate = best_remain_rdcost.rate * 9 / 8; + best_remain_rdcost.dist = best_remain_rdcost.dist * 9 / 8; + best_remain_rdcost.rdcost = best_remain_rdcost.rdcost * 9 / 8; + } + if (bsize == cm->sb_size) x->e_mbd.is_cfl_allowed_in_sdp = is_cfl_allowed_for_sdp( cm, &x->e_mbd, ptree_luma, PARTITION_NONE, bsize); @@ -3658,6 +3755,16 @@ static void none_partition_search( av2_add_mode_search_context_to_cache(sms_data, pc_tree->none[pc_tree->region_type]); } + + if (cpi->sf.lpf_sf.enable_deblock_for_partition_search && + cm->lf.apply_deblocking_filter[0] && this_rdc->rate != INT_MAX && + ctx_none != NULL && x->e_mbd.tree_type != CHROMA_PART && + !cpi->is_screen_content_type) { + const int64_t distortion_offset = get_dist_offset_by_deblock( + cpi, td, tile_data, x, tp, ctx_none, this_rdc, mi_col, mi_row, bsize); + this_rdc->dist += distortion_offset; + } + av2_rd_cost_update(x->rdmult, this_rdc); #if CONFIG_COLLECT_PARTITION_STATS @@ -5384,7 +5491,7 @@ bool av2_rd_pick_partition( int64_t part_none_rd = INT64_MAX; if (!search_none_after_rect && !search_none_after_split && partition_none_allowed) { - none_partition_search(cpi, td, tile_data, x, pc_tree, sms_tree, &x_ctx, + none_partition_search(cpi, td, tile_data, x, tp, pc_tree, sms_tree, &x_ctx, &part_search_state, &best_rdc, &pb_source_variance, none_rd, &part_none_rd, &level_banks, ptree_luma); } @@ -5423,7 +5530,7 @@ bool av2_rd_pick_partition( } if (part_search_state.forced_partition == PARTITION_INVALID && partition_none_allowed && search_none_after_split) { - none_partition_search(cpi, td, tile_data, x, pc_tree, sms_tree, &x_ctx, + none_partition_search(cpi, td, tile_data, x, tp, pc_tree, sms_tree, &x_ctx, &part_search_state, &best_rdc, &pb_source_variance, none_rd, &part_none_rd, &level_banks, ptree_luma); } @@ -5494,7 +5601,7 @@ bool av2_rd_pick_partition( partition_none_allowed) { // Prune partitions based on rect results. prune_none_after_rect(&part_search_state, pc_tree); - none_partition_search(cpi, td, tile_data, x, pc_tree, sms_tree, &x_ctx, + none_partition_search(cpi, td, tile_data, x, tp, pc_tree, sms_tree, &x_ctx, &part_search_state, &best_rdc, &pb_source_variance, none_rd, &part_none_rd, &level_banks, ptree_luma); } diff --git a/av2/encoder/speed_features.c b/av2/encoder/speed_features.c index 005a227017..88178e3441 100644 --- a/av2/encoder/speed_features.c +++ b/av2/encoder/speed_features.c @@ -335,6 +335,7 @@ static void set_good_speed_features_framesize_independent( sf->mv_sf.fast_motion_estimation_on_block_256 = 1; sf->rd_sf.perform_coeff_opt = 1; + if (speed >= 1) { sf->flexmv_sf.prune_non_one_pel_mv_using_best_mv_prec = 1; sf->inter_sf.selective_ref_frame = 2; @@ -406,6 +407,7 @@ static void set_good_speed_features_framesize_independent( sf->part_sf.partition_pruning_with_mlp = 1; sf->part_sf.partition_pruning_with_mlp_none_thresh = 3.5f; + sf->lpf_sf.enable_deblock_for_partition_search = 1; } if (speed >= 2) { @@ -609,6 +611,7 @@ static void set_good_speed_features_framesize_independent( sf->mv_sf.warp_search_method = WARP_SEARCH_DIAMOND; sf->tpl_sf.prune_starting_mv = 3; + sf->lpf_sf.enable_deblock_for_partition_search = 0; } if (speed >= 6) { @@ -931,6 +934,7 @@ static AVM_INLINE void init_lpf_sf(LOOP_FILTER_SPEED_FEATURES *lpf_sf) { lpf_sf->cdef_pick_method = CDEF_FULL_SEARCH; lpf_sf->disable_lr_filter = 0; lpf_sf->wienerns_refine_iters = 2; + lpf_sf->enable_deblock_for_partition_search = 0; } static void av2_disable_ml_based_transform_sf(TX_SPEED_FEATURES *const tx_sf) { diff --git a/av2/encoder/speed_features.h b/av2/encoder/speed_features.h index e9352132f9..cd1ce30364 100644 --- a/av2/encoder/speed_features.h +++ b/av2/encoder/speed_features.h @@ -987,6 +987,9 @@ typedef struct LOOP_FILTER_SPEED_FEATURES { // Number of refinement steps for WIENER_NONSEP tool int wienerns_refine_iters; + + // enable deblock for block partition search + int enable_deblock_for_partition_search; } LOOP_FILTER_SPEED_FEATURES; typedef struct REALTIME_SPEED_FEATURES {