aom: Remove binary_codes_writer.[hc] w/CONFIG_REALTIME_ONLY=1

From b95c9fddafa6cfa9951f375525c54d51c2333ab1 Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Mon, 19 Aug 2024 12:35:11 -0700
Subject: [PATCH] Remove binary_codes_writer.[hc] w/CONFIG_REALTIME_ONLY=1

This only is only used by code related to loop restoration, which is
disabled in this config.

Bug: aomedia:3416
Change-Id: I0272ab9b8806cfbc8cb33ad5fadfdc5a7fb1f0b7
---
 aom_dsp/aom_dsp.cmake | 4 ++--
 test/test.cmake       | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/aom_dsp/aom_dsp.cmake b/aom_dsp/aom_dsp.cmake
index 05179e84e..f875456d3 100644
--- a/aom_dsp/aom_dsp.cmake
+++ b/aom_dsp/aom_dsp.cmake
@@ -160,8 +160,6 @@ endif()
 if(CONFIG_AV1_ENCODER)
   list(APPEND AOM_DSP_ENCODER_SOURCES
               "${AOM_ROOT}/aom_dsp/avg.c"
-              "${AOM_ROOT}/aom_dsp/binary_codes_writer.c"
-              "${AOM_ROOT}/aom_dsp/binary_codes_writer.h"
               "${AOM_ROOT}/aom_dsp/bitwriter.c"
               "${AOM_ROOT}/aom_dsp/bitwriter.h"
               "${AOM_ROOT}/aom_dsp/blk_sse_sum.c"
@@ -193,6 +191,8 @@ if(CONFIG_AV1_ENCODER)
   # Flow estimation library
   if(NOT CONFIG_REALTIME_ONLY)
     list(APPEND AOM_DSP_ENCODER_SOURCES "${AOM_ROOT}/aom_dsp/pyramid.c"
+                "${AOM_ROOT}/aom_dsp/binary_codes_writer.c"
+                "${AOM_ROOT}/aom_dsp/binary_codes_writer.h"
                 "${AOM_ROOT}/aom_dsp/flow_estimation/corner_detect.c"
                 "${AOM_ROOT}/aom_dsp/flow_estimation/corner_match.c"
                 "${AOM_ROOT}/aom_dsp/flow_estimation/disflow.c"
diff --git a/test/test.cmake b/test/test.cmake
index 68caf0c22..7f0123e33 100644
--- a/test/test.cmake
+++ b/test/test.cmake
@@ -282,6 +282,7 @@ if(NOT BUILD_SHARED_LIBS)
                      "${AOM_ROOT}/test/altref_test.cc"
                      "${AOM_ROOT}/test/av1_encoder_parms_get_to_decoder.cc"
                      "${AOM_ROOT}/test/av1_ext_tile_test.cc"
+                     "${AOM_ROOT}/test/binary_codes_test.cc"
                      "${AOM_ROOT}/test/cnn_test.cc"
                      "${AOM_ROOT}/test/decode_multithreaded_test.cc"
                      "${AOM_ROOT}/test/error_resilience_test.cc"