# aom: Reorder the two default\_extra\_cfg structs

**URL:** <https://discourse.libsdl.org/t/aom-reorder-the-two-default-extra-cfg-structs/53732>\
**Category:** SDL Commits\
**Created:** [August 22, 2024, 12:25am UTC](https://discourse.libsdl.org/t/aom-reorder-the-two-default-extra-cfg-structs/53732 "2024-08-22T00:25:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [August 22, 2024, 12:25am UTC](https://discourse.libsdl.org/t/aom-reorder-the-two-default-extra-cfg-structs/53732/1 "2024-08-22T00:25:37Z")

</div>

> <https://github.com/libsdl-org/aom/commit/feaeb3317e24b24d62e3d2af01a91a79d7775d51>
>
> Move the regular default\_extra\_cfg struct before the
> CONFIG\_REALTIME\_ONLY defaul…t\_extra\_cfg struct.
> 
> This change prepares for converting default\_extra\_cfg to an array.
> 
> Bug: 359341194
> Change-Id: I0978d358d1b5e1aab6169b9ad7f6f04455dc77a1

```diff
From feaeb3317e24b24d62e3d2af01a91a79d7775d51 Mon Sep 17 00:00:00 2001
From: Wan-Teh Chang <[EMAIL REDACTED]>
Date: Thu, 15 Aug 2024 11:06:24 -0700
Subject: [PATCH] Reorder the two default_extra_cfg structs

Move the regular default_extra_cfg struct before the
CONFIG_REALTIME_ONLY default_extra_cfg struct.

This change prepares for converting default_extra_cfg to an array.

Bug: 359341194
Change-Id: I0978d358d1b5e1aab6169b9ad7f6f04455dc77a1
---
 av1/av1_cx_iface.c | 76 +++++++++++++++++++++++-----------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index a13ba518a..a3440d05e 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -213,22 +213,9 @@ struct av1_extracfg {
   int sb_qp_sweep;
 };
 
-#if CONFIG_REALTIME_ONLY
-// Settings changed for realtime only build:
-// cpu_used: 7
-// enable_tpl_model: 0
-// enable_restoration: 0
-// enable_obmc: 0
-// deltaq_mode: NO_DELTA_Q
-// enable_global_motion usage: 0
-// enable_warped_motion at sequence level: 0
-// allow_warped_motion at frame level: 0
-// coeff_cost_upd_freq: COST_UPD_OFF
-// mode_cost_upd_freq: COST_UPD_OFF
-// mv_cost_upd_freq: COST_UPD_OFF
-// dv_cost_upd_freq: COST_UPD_OFF
+#if !CONFIG_REALTIME_ONLY
 static const struct av1_extracfg default_extra_cfg = {
- 7, // cpu_used
+ 0, // cpu_used
   1, // enable_auto_alt_ref
   0, // enable_auto_bwd_ref
   0, // noise_sensitivity
@@ -239,7 +226,7 @@ static const struct av1_extracfg default_extra_cfg = {
   0, // tile_columns
   0, // tile_rows
   0, // auto_tiles
- 0, // enable_tpl_model
+ 1, // enable_tpl_model
   1, // enable_keyframe_filtering
   7, // arnr_max_frames
   5, // arnr_strength
@@ -259,9 +246,9 @@ static const struct av1_extracfg default_extra_cfg = {
   0, // gf_cbr_boost_pct
   0, // lossless
   1, // enable_cdef
- 0, // enable_restoration
+ 1, // enable_restoration
   0, // force_video_mode
- 0, // enable_obmc
+ 1, // enable_obmc
   3, // disable_trellis_quant
   0, // enable_qm
   DEFAULT_QM_Y, // qm_y
@@ -276,7 +263,7 @@ static const struct av1_extracfg default_extra_cfg = {
   1, // enable dual filter
   0, // enable delta quant in chroma planes
   NO_AQ, // aq_mode
- NO_DELTA_Q, // deltaq_mode
+ DELTA_Q_OBJECTIVE, // deltaq_mode
   100, // deltaq_strength
   0, // delta lf mode
   0, // frame_periodic_boost
@@ -321,9 +308,9 @@ static const struct av1_extracfg default_extra_cfg = {
   1, // enable difference-weighted compound
   1, // enable interinter wedge compound
   1, // enable interintra wedge compound
- 0, // enable_global_motion usage
- 0, // enable_warped_motion at sequence level
- 0, // allow_warped_motion at frame level
+ 1, // enable_global_motion usage
+ 1, // enable_warped_motion at sequence level
+ 1, // allow_warped_motion at frame level
   1, // enable filter intra at sequence level
   1, // enable smooth intra modes usage for sequence
   1, // enable Paeth intra mode usage for sequence
@@ -360,10 +347,10 @@ static const struct av1_extracfg default_extra_cfg = {
   }, // target_seq_level_idx
   0, // tier_mask
   0, // min_cr
- COST_UPD_OFF, // coeff_cost_upd_freq
- COST_UPD_OFF, // mode_cost_upd_freq
- COST_UPD_OFF, // mv_cost_upd_freq
- COST_UPD_OFF, // dv_cost_upd_freq
+ COST_UPD_SB, // coeff_cost_upd_freq
+ COST_UPD_SB, // mode_cost_upd_freq
+ COST_UPD_SB, // mv_cost_upd_freq
+ COST_UPD_SB, // dv_cost_upd_freq
   0, // ext_tile_debug
   0, // sb_multipass_unit_test
   -1, // passes
@@ -378,8 +365,21 @@ static const struct av1_extracfg default_extra_cfg = {
   0, // sb_qp_sweep
 };
 #else
+// Settings changed for realtime only build:
+// cpu_used: 7
+// enable_tpl_model: 0
+// enable_restoration: 0
+// enable_obmc: 0
+// deltaq_mode: NO_DELTA_Q
+// enable_global_motion usage: 0
+// enable_warped_motion at sequence level: 0
+// allow_warped_motion at frame level: 0
+// coeff_cost_upd_freq: COST_UPD_OFF
+// mode_cost_upd_freq: COST_UPD_OFF
+// mv_cost_upd_freq: COST_UPD_OFF
+// dv_cost_upd_freq: COST_UPD_OFF
 static const struct av1_extracfg default_extra_cfg = {
- 0, // cpu_used
+ 7, // cpu_used
   1, // enable_auto_alt_ref
   0, // enable_auto_bwd_ref
   0, // noise_sensitivity
@@ -390,7 +390,7 @@ static const struct av1_extracfg default_extra_cfg = {
   0, // tile_columns
   0, // tile_rows
   0, // auto_tiles
- 1, // enable_tpl_model
+ 0, // enable_tpl_model
   1, // enable_keyframe_filtering
   7, // arnr_max_frames
   5, // arnr_strength
@@ -410,9 +410,9 @@ static const struct av1_extracfg default_extra_cfg = {
   0, // gf_cbr_boost_pct
   0, // lossless
   1, // enable_cdef
- 1, // enable_restoration
+ 0, // enable_restoration
   0, // force_video_mode
- 1, // enable_obmc
+ 0, // enable_obmc
   3, // disable_trellis_quant
   0, // enable_qm
   DEFAULT_QM_Y, // qm_y
@@ -427,7 +427,7 @@ static const struct av1_extracfg default_extra_cfg = {
   1, // enable dual filter
   0, // enable delta quant in chroma planes
   NO_AQ, // aq_mode
- DELTA_Q_OBJECTIVE, // deltaq_mode
+ NO_DELTA_Q, // deltaq_mode
   100, // deltaq_strength
   0, // delta lf mode
   0, // frame_periodic_boost
@@ -472,9 +472,9 @@ static const struct av1_extracfg default_extra_cfg = {
   1, // enable difference-weighted compound
   1, // enable interinter wedge compound
   1, // enable interintra wedge compound
- 1, // enable_global_motion usage
- 1, // enable_warped_motion at sequence level
- 1, // allow_warped_motion at frame level
+ 0, // enable_global_motion usage
+ 0, // enable_warped_motion at sequence level
+ 0, // allow_warped_motion at frame level
   1, // enable filter intra at sequence level
   1, // enable smooth intra modes usage for sequence
   1, // enable Paeth intra mode usage for sequence
@@ -511,10 +511,10 @@ static const struct av1_extracfg default_extra_cfg = {
   }, // target_seq_level_idx
   0, // tier_mask
   0, // min_cr
- COST_UPD_SB, // coeff_cost_upd_freq
- COST_UPD_SB, // mode_cost_upd_freq
- COST_UPD_SB, // mv_cost_upd_freq
- COST_UPD_SB, // dv_cost_upd_freq
+ COST_UPD_OFF, // coeff_cost_upd_freq
+ COST_UPD_OFF, // mode_cost_upd_freq
+ COST_UPD_OFF, // mv_cost_upd_freq
+ COST_UPD_OFF, // dv_cost_upd_freq
   0, // ext_tile_debug
   0, // sb_multipass_unit_test
   -1, // passes

```
