Skip to content

Commit

Permalink
Defines InternalSampleType in types.h (formerly leb128.h)
Browse files Browse the repository at this point in the history
- This allows controlling the type in a central place, in case we want to
  change it in the future.
- Use this type for internal computation. Convert to/from int32_t only when
  necessary, e.g.
  - File IO.
  - Encoding and decoding using underlying codecs.
  - Computing recon gains.

PiperOrigin-RevId: 670894393
  • Loading branch information
yero authored and jwcullen committed Sep 4, 2024
1 parent 5844836 commit b613647
Show file tree
Hide file tree
Showing 99 changed files with 407 additions and 544 deletions.
23 changes: 12 additions & 11 deletions iamf/cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ cc_library(
":channel_label",
"//iamf/obu:audio_element",
"//iamf/obu:codec_config",
"//iamf/obu:leb128",
"//iamf/obu:parameter_block",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
],
)
Expand Down Expand Up @@ -95,11 +95,11 @@ cc_library(
"//iamf/obu:codec_config",
"//iamf/obu:demixing_info_param_data",
"//iamf/obu:ia_sequence_header",
"//iamf/obu:leb128",
"//iamf/obu:mix_presentation",
"//iamf/obu:obu_header",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log",
Expand All @@ -126,8 +126,8 @@ cc_library(
"//iamf/obu:audio_element",
"//iamf/obu:audio_frame",
"//iamf/obu:demixing_info_param_data",
"//iamf/obu:leb128",
"//iamf/obu:parameter_block",
"//iamf/obu:types",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
Expand Down Expand Up @@ -162,8 +162,8 @@ cc_library(
"//iamf/obu:arbitrary_obu",
"//iamf/obu:codec_config",
"//iamf/obu:ia_sequence_header",
"//iamf/obu:leb128",
"//iamf/obu:mix_presentation",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
Expand All @@ -185,8 +185,8 @@ cc_library(
"//iamf/common:obu_util",
"//iamf/obu:audio_element",
"//iamf/obu:codec_config",
"//iamf/obu:leb128",
"//iamf/obu:param_definitions",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log",
Expand Down Expand Up @@ -236,10 +236,10 @@ cc_library(
"//iamf/common:macros",
"//iamf/obu:codec_config",
"//iamf/obu:ia_sequence_header",
"//iamf/obu:leb128",
"//iamf/obu:mix_presentation",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
Expand All @@ -254,7 +254,7 @@ cc_library(
deps = [
"//iamf/cli/proto:test_vector_metadata_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"//iamf/obu:leb128",
"//iamf/obu:types",
"@com_google_absl//absl/log",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
Expand Down Expand Up @@ -293,8 +293,8 @@ cc_library(
":parameter_block_with_data",
":wav_writer",
"//iamf/cli/proto:mix_presentation_cc_proto",
"//iamf/obu:leb128",
"//iamf/obu:mix_presentation",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/functional:any_invocable",
"@com_google_absl//absl/log",
Expand Down Expand Up @@ -364,9 +364,9 @@ cc_library(
":parameter_block_with_data",
"//iamf/common:macros",
"//iamf/obu:demixing_info_param_data",
"//iamf/obu:leb128",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
Expand Down Expand Up @@ -403,6 +403,7 @@ cc_library(
":demixing_module",
"//iamf/common:macros",
"//iamf/common:obu_util",
"//iamf/obu:types",
"@com_google_absl//absl/base:no_destructor",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
Expand All @@ -419,8 +420,8 @@ cc_library(
":audio_element_with_data",
"//iamf/cli/renderer:audio_element_renderer_base",
"//iamf/obu:audio_element",
"//iamf/obu:leb128",
"//iamf/obu:mix_presentation",
"//iamf/obu:types",
],
)

Expand Down Expand Up @@ -448,7 +449,7 @@ cc_library(
":wav_reader",
"//iamf/cli/proto:audio_frame_cc_proto",
"//iamf/common:macros",
"//iamf/obu:leb128",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
Expand Down
2 changes: 1 addition & 1 deletion iamf/cli/audio_element_with_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include "iamf/cli/channel_label.h"
#include "iamf/obu/audio_element.h"
#include "iamf/obu/codec_config.h"
#include "iamf/obu/leb128.h"
#include "iamf/obu/parameter_block.h"
#include "iamf/obu/types.h"

namespace iamf_tools {

Expand Down
2 changes: 1 addition & 1 deletion iamf/cli/cli_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
#include "iamf/obu/codec_config.h"
#include "iamf/obu/demixing_info_param_data.h"
#include "iamf/obu/ia_sequence_header.h"
#include "iamf/obu/leb128.h"
#include "iamf/obu/mix_presentation.h"
#include "iamf/obu/obu_header.h"
#include "iamf/obu/param_definitions.h"
#include "iamf/obu/parameter_block.h"
#include "iamf/obu/types.h"

namespace iamf_tools {

Expand Down
2 changes: 1 addition & 1 deletion iamf/cli/cli_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
#include "iamf/obu/codec_config.h"
#include "iamf/obu/demixing_info_param_data.h"
#include "iamf/obu/ia_sequence_header.h"
#include "iamf/obu/leb128.h"
#include "iamf/obu/mix_presentation.h"
#include "iamf/obu/obu_header.h"
#include "iamf/obu/param_definitions.h"
#include "iamf/obu/parameter_block.h"
#include "iamf/obu/types.h"

namespace iamf_tools {

Expand Down
2 changes: 1 addition & 1 deletion iamf/cli/codec/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ cc_test(
"//iamf/cli/codec:encoder_base",
"//iamf/obu:audio_frame",
"//iamf/obu:codec_config",
"//iamf/obu:leb128",
"//iamf/obu:obu_header",
"//iamf/obu:types",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_googletest//:gtest_main",
Expand Down
2 changes: 1 addition & 1 deletion iamf/cli/codec/tests/encoder_base_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include "iamf/cli/audio_frame_with_data.h"
#include "iamf/obu/audio_frame.h"
#include "iamf/obu/codec_config.h"
#include "iamf/obu/leb128.h"
#include "iamf/obu/obu_header.h"
#include "iamf/obu/types.h"

namespace iamf_tools {
namespace {
Expand Down
Loading

0 comments on commit b613647

Please sign in to comment.