Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 628065133
  • Loading branch information
Googler authored and jwcullen committed Apr 25, 2024
1 parent 60d7fab commit fea2bfe
Show file tree
Hide file tree
Showing 55 changed files with 1,196 additions and 904 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ format. These tools can be used as a complement to the `libiamf`
and write an IA Sequence.
* `adm_to_user_metadata/` - Components to convert ADM files to proto
files which can be used for input to the encoder.
* `codec/` - Files that encode or decode substreams with
codec-specific libraries.
* `tests/` - Unit tests for files under `codec/`.
* `proto/` - [Protocol buffers](https://protobuf.dev/) defining the
data scheme for the input files under `iamf/cli/testdata/` or
user-created ones.
Expand Down
134 changes: 14 additions & 120 deletions iamf/cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,6 @@ exports_files(
],
)

cc_library(
name = "aac_encoder_decoder",
srcs = ["aac_encoder_decoder.cc"],
hdrs = ["aac_encoder_decoder.h"],
deps = [
":audio_frame_with_data",
":decoder_base",
":encoder_base",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/common:macros",
"//iamf/common:obu_util",
"//iamf/common:write_bit_buffer",
"//iamf/obu:codec_config",
"//iamf/obu/decoder_config:aac_decoder_config",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@fdk_aac//:aac_decoder_lib",
"@fdk_aac//:aac_encoder_lib",
"@fdk_aac//:fdk_sys_lib",
],
)

cc_library(
name = "arbitrary_obu_generator",
srcs = ["arbitrary_obu_generator.cc"],
Expand Down Expand Up @@ -98,13 +74,13 @@ cc_library(
srcs = ["audio_frame_decoder.cc"],
hdrs = ["audio_frame_decoder.h"],
deps = [
":aac_encoder_decoder",
":audio_element_with_data",
":audio_frame_with_data",
":cli_util",
":decoder_base",
":opus_encoder_decoder",
":wav_writer",
"//iamf/cli/codec:aac_encoder_decoder",
"//iamf/cli/codec:decoder_base",
"//iamf/cli/codec:opus_encoder_decoder",
"//iamf/common:macros",
"//iamf/obu:codec_config",
"@com_google_absl//absl/container:node_hash_map",
Expand All @@ -119,16 +95,16 @@ cc_library(
srcs = ["audio_frame_generator.cc"],
hdrs = ["audio_frame_generator.h"],
deps = [
":aac_encoder_decoder",
":audio_element_with_data",
":audio_frame_with_data",
":demixing_module",
":encoder_base",
":flac_encoder_decoder",
":global_timing_module",
":lpcm_encoder",
":opus_encoder_decoder",
":parameters_manager",
"//iamf/cli/codec:aac_encoder_decoder",
"//iamf/cli/codec:encoder_base",
"//iamf/cli/codec:flac_encoder_decoder",
"//iamf/cli/codec:lpcm_encoder",
"//iamf/cli/codec:opus_encoder_decoder",
"//iamf/cli/proto:audio_frame_cc_proto",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/cli/proto:test_vector_metadata_cc_proto",
Expand Down Expand Up @@ -212,12 +188,6 @@ cc_library(
],
)

cc_library(
name = "decoder_base",
hdrs = ["decoder_base.h"],
deps = ["@com_google_absl//absl/status"],
)

cc_library(
name = "demixing_module",
srcs = ["demixing_module.cc"],
Expand All @@ -242,21 +212,6 @@ cc_library(
],
)

cc_library(
name = "encoder_base",
srcs = ["encoder_base.cc"],
hdrs = ["encoder_base.h"],
deps = [
":audio_frame_with_data",
"//iamf/common:macros",
"//iamf/obu:codec_config",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/synchronization",
],
)

cc_library(
name = "encoder_main_lib",
srcs = ["encoder_main_lib.cc"],
Expand All @@ -277,6 +232,7 @@ cc_library(
":mix_presentation_generator",
":obu_sequencer",
":parameter_block_generator",
":parameter_block_partitioner",
":parameter_block_with_data",
":parameters_manager",
":wav_sample_provider",
Expand All @@ -298,27 +254,6 @@ cc_library(
],
)

cc_library(
name = "flac_encoder_decoder",
srcs = ["flac_encoder_decoder.cc"],
hdrs = ["flac_encoder_decoder.h"],
deps = [
":audio_frame_with_data",
":encoder_base",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/common:macros",
"//iamf/common:obu_util",
"//iamf/obu:codec_config",
"//iamf/obu/decoder_config:flac_decoder_config",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/synchronization",
"@flac//:src",
],
)

cc_library(
name = "global_timing_module",
srcs = ["global_timing_module.cc"],
Expand Down Expand Up @@ -398,23 +333,6 @@ cc_library(
],
)

cc_library(
name = "lpcm_encoder",
srcs = ["lpcm_encoder.cc"],
hdrs = ["lpcm_encoder.h"],
deps = [
":audio_frame_with_data",
":cli_util",
":encoder_base",
"//iamf/common:macros",
"//iamf/obu:codec_config",
"//iamf/obu/decoder_config:lpcm_decoder_config",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/synchronization",
],
)

cc_library(
name = "mix_presentation_finalizer",
srcs = ["mix_presentation_finalizer.cc"],
Expand Down Expand Up @@ -485,27 +403,6 @@ cc_library(
],
)

cc_library(
name = "opus_encoder_decoder",
srcs = ["opus_encoder_decoder.cc"],
hdrs = ["opus_encoder_decoder.h"],
deps = [
":audio_frame_with_data",
":decoder_base",
":encoder_base",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/common:macros",
"//iamf/common:obu_util",
"//iamf/obu:codec_config",
"//iamf/obu/decoder_config:opus_decoder_config",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@libopus",
],
)

cc_library(
name = "parameter_block_generator",
srcs = ["parameter_block_generator.cc"],
Expand All @@ -515,7 +412,6 @@ cc_library(
":cli_util",
":demixing_module",
":global_timing_module",
":parameter_block_partitioner",
":parameter_block_with_data",
":recon_gain_generator",
"//iamf/cli/proto:parameter_block_cc_proto",
Expand Down Expand Up @@ -546,14 +442,12 @@ cc_library(
hdrs = ["parameter_block_partitioner.h"],
deps = [
":cli_util",
":parameter_block_with_data",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/cli/proto:ia_sequence_header_cc_proto",
"//iamf/cli/proto:parameter_block_cc_proto",
"//iamf/cli/proto:parameter_data_cc_proto",
"//iamf/common:macros",
"//iamf/obu:demixing_info_param_data",
"//iamf/obu:ia_sequence_header",
"//iamf/obu:leb128",
"//iamf/obu:obu_header",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/common:obu_util",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
Expand Down
7 changes: 3 additions & 4 deletions iamf/cli/audio_frame_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
#include "iamf/cli/audio_frame_decoder.h"

#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <list>
Expand All @@ -24,12 +23,12 @@
#include "absl/log/log.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "iamf/cli/aac_encoder_decoder.h"
#include "iamf/cli/audio_element_with_data.h"
#include "iamf/cli/audio_frame_with_data.h"
#include "iamf/cli/cli_util.h"
#include "iamf/cli/decoder_base.h"
#include "iamf/cli/opus_encoder_decoder.h"
#include "iamf/cli/codec/aac_encoder_decoder.h"
#include "iamf/cli/codec/decoder_base.h"
#include "iamf/cli/codec/opus_encoder_decoder.h"
#include "iamf/cli/wav_writer.h"
#include "iamf/common/macros.h"
#include "iamf/obu/codec_config.h"
Expand Down
10 changes: 5 additions & 5 deletions iamf/cli/audio_frame_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/synchronization/mutex.h"
#include "iamf/cli/aac_encoder_decoder.h"
#include "iamf/cli/audio_element_with_data.h"
#include "iamf/cli/audio_frame_with_data.h"
#include "iamf/cli/codec/aac_encoder_decoder.h"
#include "iamf/cli/codec/encoder_base.h"
#include "iamf/cli/codec/flac_encoder_decoder.h"
#include "iamf/cli/codec/lpcm_encoder.h"
#include "iamf/cli/codec/opus_encoder_decoder.h"
#include "iamf/cli/demixing_module.h"
#include "iamf/cli/encoder_base.h"
#include "iamf/cli/flac_encoder_decoder.h"
#include "iamf/cli/global_timing_module.h"
#include "iamf/cli/lpcm_encoder.h"
#include "iamf/cli/opus_encoder_decoder.h"
#include "iamf/cli/parameters_manager.h"
#include "iamf/cli/proto/audio_frame.pb.h"
#include "iamf/cli/proto/codec_config.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion iamf/cli/audio_frame_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include "absl/synchronization/mutex.h"
#include "iamf/cli/audio_element_with_data.h"
#include "iamf/cli/audio_frame_with_data.h"
#include "iamf/cli/codec/encoder_base.h"
#include "iamf/cli/demixing_module.h"
#include "iamf/cli/encoder_base.h"
#include "iamf/cli/global_timing_module.h"
#include "iamf/cli/parameters_manager.h"
#include "iamf/cli/proto/audio_frame.pb.h"
Expand Down
107 changes: 107 additions & 0 deletions iamf/cli/codec/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Files to interface between IAMF Tools and codec libraries when encoding and decoding substreams.

package(default_visibility = ["//iamf/cli:__subpackages__"])

cc_library(
name = "aac_encoder_decoder",
srcs = ["aac_encoder_decoder.cc"],
hdrs = ["aac_encoder_decoder.h"],
deps = [
":decoder_base",
":encoder_base",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/common:macros",
"//iamf/common:obu_util",
"//iamf/common:write_bit_buffer",
"//iamf/obu:codec_config",
"//iamf/obu/decoder_config:aac_decoder_config",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@fdk_aac//:aac_decoder_lib",
"@fdk_aac//:aac_encoder_lib",
"@fdk_aac//:fdk_sys_lib",
],
)

cc_library(
name = "decoder_base",
hdrs = ["decoder_base.h"],
deps = ["@com_google_absl//absl/status"],
)

cc_library(
name = "encoder_base",
srcs = ["encoder_base.cc"],
hdrs = ["encoder_base.h"],
deps = [
"//iamf/cli:audio_frame_with_data",
"//iamf/common:macros",
"//iamf/obu:codec_config",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/synchronization",
],
)

cc_library(
name = "flac_encoder_decoder",
srcs = ["flac_encoder_decoder.cc"],
hdrs = ["flac_encoder_decoder.h"],
deps = [
":encoder_base",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/common:macros",
"//iamf/common:obu_util",
"//iamf/obu:codec_config",
"//iamf/obu/decoder_config:flac_decoder_config",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/synchronization",
"@flac//:src",
],
)

cc_library(
name = "lpcm_encoder",
srcs = ["lpcm_encoder.cc"],
hdrs = ["lpcm_encoder.h"],
deps = [
":encoder_base",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:cli_util",
"//iamf/common:macros",
"//iamf/obu:codec_config",
"//iamf/obu/decoder_config:lpcm_decoder_config",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/synchronization",
],
)

cc_library(
name = "opus_encoder_decoder",
srcs = ["opus_encoder_decoder.cc"],
hdrs = ["opus_encoder_decoder.h"],
deps = [
":decoder_base",
":encoder_base",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/common:macros",
"//iamf/common:obu_util",
"//iamf/obu:codec_config",
"//iamf/obu/decoder_config:opus_decoder_config",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@libopus",
],
)
Loading

0 comments on commit fea2bfe

Please sign in to comment.