blob: 16b4b1f53fd99bbc11788a2828ccc8c06f760938 [file] [log] [blame]
load("@rules_cc//cc:cc_test.bzl", "cc_test")
package(default_visibility = ["//iamf/cli/tests:__subpackages__"])
# keep-sorted start block=yes prefix_order=cc_library,cc_test newline_separated=yes
cc_library(
name = "cli_test_utils",
testonly = True,
srcs = ["cli_test_utils.cc"],
hdrs = ["cli_test_utils.h"],
visibility = [
"//iamf:__subpackages__",
],
deps = [
"@com_google_googletest//:gtest",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:demixing_module",
"//iamf/cli:loudness_calculator_base",
"//iamf/cli:loudness_calculator_factory_base",
"//iamf/cli:obu_processor",
"//iamf/cli:obu_sequencer_base",
"//iamf/cli:obu_with_data_generator",
"//iamf/cli:parameter_block_with_data",
"//iamf/cli:sample_processor_base",
"//iamf/cli:wav_reader",
"//iamf/cli/proto:mix_presentation_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"//iamf/cli/proto_conversion/proto_to_obu:audio_element_generator",
"//iamf/cli/proto_conversion/proto_to_obu:mix_presentation_generator",
"//iamf/cli/renderer:audio_element_renderer_base",
"//iamf/cli/user_metadata_builder:audio_element_metadata_builder",
"//iamf/cli/user_metadata_builder:iamf_input_layout",
"//iamf/common:leb_generator",
"//iamf/common:read_bit_buffer",
"//iamf/common:write_bit_buffer",
"//iamf/common/utils:macros",
"//iamf/common/utils:numeric_utils",
"//iamf/obu:audio_element",
"//iamf/obu:codec_config",
"//iamf/obu:ia_sequence_header",
"//iamf/obu:mix_presentation",
"//iamf/obu:obu_base",
"//iamf/obu:obu_header",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_data",
"//iamf/obu:types",
"//iamf/obu/decoder_config:aac_decoder_config",
"//iamf/obu/decoder_config:flac_decoder_config",
"//iamf/obu/decoder_config:lpcm_decoder_config",
"//iamf/obu/decoder_config:opus_decoder_config",
"@com_google_protobuf//:protobuf",
# [internal] Placeholder for fine-grained protobuf dependency: "io",
],
)
cc_test(
name = "audio_frame_decoder_test",
srcs = ["audio_frame_decoder_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_decoder",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:channel_label",
"//iamf/obu:audio_frame",
"//iamf/obu:codec_config",
"//iamf/obu:obu_header",
"//iamf/obu:parameter_data",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status:status_matchers",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "channel_label_test",
srcs = ["channel_label_test.cc"],
deps = [
"//iamf/cli:channel_label",
"//iamf/obu:audio_element",
"//iamf/obu:parameter_data",
"@com_google_absl//absl/status:status_matchers",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "cli_test_utils_test",
srcs = ["cli_test_utils_test.cc"],
deps = [
":cli_test_utils",
"//iamf/common:write_bit_buffer",
"//iamf/obu:obu_base",
"//iamf/obu:obu_header",
"//iamf/obu/tests:obu_test_utils",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/strings:string_view",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "cli_util_test",
size = "small",
srcs = ["cli_util_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:cli_util",
"//iamf/cli:obu_with_data_generator",
"//iamf/cli/proto:obu_header_cc_proto",
"//iamf/cli/proto:parameter_data_cc_proto",
"//iamf/obu:audio_element",
"//iamf/obu:audio_frame",
"//iamf/obu:codec_config",
"//iamf/obu:mix_presentation",
"//iamf/obu:obu_header",
"//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/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "demixing_module_test",
srcs = ["demixing_module_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_decoder",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:channel_label",
"//iamf/cli:demixing_module",
"//iamf/cli/proto:user_metadata_cc_proto",
"//iamf/cli/proto_conversion:channel_label_utils",
"//iamf/cli/proto_conversion:downmixing_reconstruction_util",
"//iamf/common/utils:numeric_utils",
"//iamf/obu:audio_element",
"//iamf/obu:audio_frame",
"//iamf/obu:codec_config",
"//iamf/obu:obu_header",
"//iamf/obu:parameter_data",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "encoder_main_lib_test",
size = "medium",
srcs = ["encoder_main_lib_test.cc"],
data = [
"//iamf/cli/testdata:input_wav_files",
"//iamf/cli/testdata:test_vectors",
],
shard_count = 32,
deps = [
":cli_test_utils",
"//iamf/cli:encoder_main_lib",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/cli/proto:ia_sequence_header_cc_proto",
"//iamf/cli/proto:test_vector_metadata_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
"@com_google_protobuf//:protobuf",
],
)
cc_test(
name = "global_timing_module_test",
srcs = ["global_timing_module_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:global_timing_module",
"//iamf/cli/proto:parameter_block_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"//iamf/obu:codec_config",
"//iamf/obu:param_definitions",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "iamf_components_test",
srcs = ["iamf_components_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:iamf_components",
"//iamf/cli/proto:test_vector_metadata_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"@com_google_googletest//:gtest_main",
"@com_google_protobuf//:protobuf",
],
)
cc_test(
name = "iamf_encoder_test",
srcs = ["iamf_encoder_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:channel_label",
"//iamf/cli:demixing_module",
"//iamf/cli:iamf_components",
"//iamf/cli:iamf_encoder",
"//iamf/cli:loudness_calculator_factory_base",
"//iamf/cli:parameter_block_with_data",
"//iamf/cli:renderer_factory",
"//iamf/cli:rendering_mix_presentation_finalizer",
"//iamf/cli:wav_writer",
"//iamf/cli/proto:arbitrary_obu_cc_proto",
"//iamf/cli/proto:audio_element_cc_proto",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/cli/proto:ia_sequence_header_cc_proto",
"//iamf/cli/proto:mix_presentation_cc_proto",
"//iamf/cli/proto:test_vector_metadata_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"//iamf/cli/user_metadata_builder:audio_element_metadata_builder",
"//iamf/cli/user_metadata_builder:iamf_input_layout",
"//iamf/obu:arbitrary_obu",
"//iamf/obu:codec_config",
"//iamf/obu:ia_sequence_header",
"//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:status_matchers",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
"@com_google_protobuf//:protobuf",
],
)
cc_test(
name = "obu_processor_test",
srcs = ["obu_processor_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:global_timing_module",
"//iamf/cli:obu_processor",
"//iamf/cli:parameter_block_with_data",
"//iamf/cli:parameters_manager",
"//iamf/cli:rendering_mix_presentation_finalizer",
"//iamf/cli:sample_processor_base",
"//iamf/cli:wav_reader",
"//iamf/cli:wav_writer",
"//iamf/cli/user_metadata_builder:iamf_input_layout",
"//iamf/common:read_bit_buffer",
"//iamf/obu:arbitrary_obu",
"//iamf/obu:audio_frame",
"//iamf/obu:codec_config",
"//iamf/obu:ia_sequence_header",
"//iamf/obu:mix_presentation",
"//iamf/obu:obu_base",
"//iamf/obu:obu_header",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/obu:parameter_data",
"//iamf/obu:temporal_delimiter",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/strings:string_view",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "obu_sequencer_base_test",
srcs = ["obu_sequencer_base_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:obu_sequencer_base",
"//iamf/cli:parameter_block_with_data",
"//iamf/cli:temporal_unit_view",
"//iamf/common:leb_generator",
"//iamf/common:write_bit_buffer",
"//iamf/obu:arbitrary_obu",
"//iamf/obu:audio_frame",
"//iamf/obu:codec_config",
"//iamf/obu:ia_sequence_header",
"//iamf/obu:mix_presentation",
"//iamf/obu:obu_base",
"//iamf/obu:obu_header",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/obu:parameter_data",
"//iamf/obu:temporal_delimiter",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "obu_sequencer_iamf_test",
srcs = ["obu_sequencer_iamf_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:obu_sequencer_iamf",
"//iamf/cli:parameter_block_with_data",
"//iamf/cli:temporal_unit_view",
"//iamf/common:leb_generator",
"//iamf/common:read_bit_buffer",
"//iamf/obu:arbitrary_obu",
"//iamf/obu:audio_frame",
"//iamf/obu:codec_config",
"//iamf/obu:ia_sequence_header",
"//iamf/obu:mix_presentation",
"//iamf/obu:obu_header",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/obu:parameter_data",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "obu_with_data_generator_test",
srcs = ["obu_with_data_generator_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:channel_label",
"//iamf/cli:global_timing_module",
"//iamf/cli:obu_with_data_generator",
"//iamf/cli:parameter_block_with_data",
"//iamf/cli:parameters_manager",
"//iamf/obu:audio_element",
"//iamf/obu:audio_frame",
"//iamf/obu:codec_config",
"//iamf/obu:obu_header",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/obu:parameter_data",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:node_hash_map",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/status:statusor",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "parameter_block_partitioner_test",
size = "small",
srcs = ["parameter_block_partitioner_test.cc"],
deps = [
"//iamf/cli:parameter_block_partitioner",
"//iamf/cli/proto:parameter_block_cc_proto",
"//iamf/cli/proto:parameter_data_cc_proto",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_googletest//:gtest_main",
"@com_google_protobuf//:protobuf",
],
)
cc_test(
name = "parameters_manager_test",
size = "small",
srcs = ["parameters_manager_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:parameter_block_with_data",
"//iamf/cli:parameters_manager",
"//iamf/obu:audio_element",
"//iamf/obu:codec_config",
"//iamf/obu:obu_header",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/obu:parameter_data",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "profile_filter_test",
srcs = ["profile_filter_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:profile_filter",
"//iamf/cli/proto:ia_sequence_header_cc_proto",
"//iamf/cli/proto:obu_header_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"//iamf/obu:audio_element",
"//iamf/obu:codec_config",
"//iamf/obu:ia_sequence_header",
"//iamf/obu:mix_presentation",
"//iamf/obu:obu_header",
"//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/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "recon_gain_generator_test",
srcs = ["recon_gain_generator_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:channel_label",
"//iamf/cli:demixing_module",
"//iamf/cli:recon_gain_generator",
"//iamf/cli/proto:user_metadata_cc_proto",
"//iamf/obu:types",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "renderer_factory_test",
srcs = ["renderer_factory_test.cc"],
deps = [
"//iamf/cli:channel_label",
"//iamf/cli:renderer_factory",
"//iamf/cli/proto:obu_header_cc_proto",
"//iamf/cli/proto:parameter_data_cc_proto",
"//iamf/cli/proto:temporal_delimiter_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"//iamf/obu:audio_element",
"//iamf/obu:mix_presentation",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "rendering_mix_presentation_finalizer_test",
srcs = ["rendering_mix_presentation_finalizer_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:channel_label",
"//iamf/cli:demixing_module",
"//iamf/cli:loudness_calculator_base",
"//iamf/cli:loudness_calculator_factory_base",
"//iamf/cli:parameter_block_with_data",
"//iamf/cli:renderer_factory",
"//iamf/cli:rendering_mix_presentation_finalizer",
"//iamf/cli:wav_reader",
"//iamf/cli:wav_writer",
"//iamf/cli/proto:codec_config_cc_proto",
"//iamf/cli/proto_conversion/proto_to_obu:codec_config_generator",
"//iamf/cli/renderer:audio_element_renderer_base",
"//iamf/cli/user_metadata_builder:codec_config_obu_metadata_builder",
"//iamf/cli/user_metadata_builder:iamf_input_layout",
"//iamf/obu:audio_element",
"//iamf/obu:codec_config",
"//iamf/obu:mix_presentation",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@com_google_protobuf//:protobuf",
],
)
cc_test(
name = "sample_processor_base_test",
srcs = ["sample_processor_base_test.cc"],
deps = [
":cli_test_utils",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "temporal_unit_view_test",
srcs = ["temporal_unit_view_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:audio_frame_with_data",
"//iamf/cli:parameter_block_with_data",
"//iamf/cli:temporal_unit_view",
"//iamf/obu:arbitrary_obu",
"//iamf/obu:audio_frame",
"//iamf/obu:codec_config",
"//iamf/obu:obu_header",
"//iamf/obu:param_definitions",
"//iamf/obu:parameter_block",
"//iamf/obu:parameter_data",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "textproto_templates_test",
srcs = ["textproto_templates_test.cc"],
data = [
"//iamf/cli/testdata:input_wav_files",
"//iamf/cli/textproto_templates:textprotos",
],
shard_count = 4,
deps = [
":cli_test_utils",
"//iamf/cli:encoder_main_lib",
"//iamf/cli/proto:audio_frame_cc_proto",
"//iamf/cli/proto:test_vector_metadata_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "wav_reader_test",
srcs = ["wav_reader_test.cc"],
data = [
"//iamf/cli/testdata:input_wav_files",
],
deps = [
":cli_test_utils",
"//iamf/cli:wav_reader",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "wav_sample_provider_test",
srcs = ["wav_sample_provider_test.cc"],
data = [
"//iamf/cli/testdata:input_wav_files",
],
deps = [
":cli_test_utils",
"//iamf/cli:audio_element_with_data",
"//iamf/cli:channel_label",
"//iamf/cli:demixing_module",
"//iamf/cli:wav_sample_provider",
"//iamf/cli/proto:audio_element_cc_proto",
"//iamf/cli/proto:audio_frame_cc_proto",
"//iamf/cli/proto:user_metadata_cc_proto",
"//iamf/cli/user_metadata_builder:iamf_input_layout",
"//iamf/obu:codec_config",
"//iamf/obu:types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
"@com_google_protobuf//:protobuf",
],
)
cc_test(
name = "wav_writer_test",
srcs = ["wav_writer_test.cc"],
deps = [
":cli_test_utils",
"//iamf/cli:wav_reader",
"//iamf/cli:wav_writer",
"@com_google_absl//absl/status:status_matchers",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
],
)
# keep-sorted end