From 7a721cf96513d1bef607623d7d5fc674602e7d3f Mon Sep 17 00:00:00 2001 From: flim Date: Fri, 11 Oct 2024 16:30:25 -0700 Subject: [PATCH] Refactor build and development related docs to a separate file. PiperOrigin-RevId: 684990481 --- README.md | 66 +++----------------------------------- docs/build_instructions.md | 66 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 61 deletions(-) create mode 100644 docs/build_instructions.md diff --git a/README.md b/README.md index 2d3b5a6..01f3ca1 100644 --- a/README.md +++ b/README.md @@ -11,63 +11,16 @@ The [Immersive Audio Model and Formats](https://aomediacodec.github.io/iamf/) format. These tools can be used as a complement to the `libiamf` [reference decoder](https://github.com/AOMediaCodec/libiamf/). -### Folder Structure - -* `` - Project-level files like the license, README (this file), and - BUILD files. -* `iamf/` - * `common/` - Common utility files. - * `tests/` - Unit tests for files under `common/`. - * `cli/` - Files related to the command line interface (CLI) to generate - and write an IA Sequence. - * `adm_to_user_metadata/` - Components to convert ADM files to - protocol buffers 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/`. - * `obu_to_proto/` - Components to convert classes under `iamf/obu` to - protocol buffers. - * `proto/` - [Protocol buffers](https://protobuf.dev/) defining the - data scheme for the input files under `iamf/cli/testdata/` or - user-created ones. - * `proto_to_obu/` - Components to convert protocol buffers to classes - under `iamf/obu`. - * `testdata/` - Sample input files to the encoder. See also - [Test Suite](#Test-Suite). - * `tests/` - Unit tests for files under `iamf/cli/`. - * `obu/` - Files relating to IAMF Open Bitstream Units (OBU)s. - * `decoder_config/` - Files relating codec-specific decoder configs. - * `tests/` - Unit tests for files under `decoder_config/`. - * `tests/` - Unit tests for files under `obu/`. -* `external/` - Custom `*.BUILD` files for external dependencies. - ### Encoder The encoder can be used to encode a standalone IAMF Sequence (`.iamf`) file -based on an input protocol buffer. See [Test Suite](#Test-Suite) for several -example input files. - -#### Prerequisites for building the encoder - -- Bazel: `iamf-tools` uses the Bazel build system. See Bazel's - [Getting started](https://bazel.build/start) page for installation - instructions. -- CMake: required to build some dependencies. See CMake's - [Download](https://cmake.org/download/) page to install. - -#### Building the encoder on Linux +based on an input protocol buffer. See +[Test suite](docs/build_instructions.md#Test-suite) for several example input +files. -Building the encoder binary: - -``` -bazel build -c opt //iamf/cli:encoder_main -``` +#### Building the encoder -Running built-in tests: - -``` -bazel test -c opt //iamf/... -``` +See [Build instructions](docs/build_instructions.md) to build from source. #### Using the encoder with proto input @@ -106,15 +59,6 @@ Optional flags: bazel-bin/iamf/cli/encoder_main --adm_filename=path/to/adm.wav --output_iamf_directory=. ``` -### Test suite - -[iamf/cli/testdata](iamf/cli/testdata) covers a wide variety of IAMF features. -These samples can be used as encoder input. After encoding the resultant `.iamf` -files can be used to assist in testing or debugging an IAMF-compliant decoder. - -See the separate [README.md](iamf/cli/testdata/README.md) for further -documentation. - ## Web demo The [web demo](https://aomediacodec.github.io/iamf-tools/web_demo/) hosted in diff --git a/docs/build_instructions.md b/docs/build_instructions.md new file mode 100644 index 0000000..49f0727 --- /dev/null +++ b/docs/build_instructions.md @@ -0,0 +1,66 @@ +# Build instructions + +## Prerequisites for building the encoder + +- Bazel: `iamf-tools` uses the Bazel build system. See Bazel's + [Getting started](https://bazel.build/start) page for installation + instructions. +- CMake: required to build some dependencies. See CMake's + [Download](https://cmake.org/download/) page to install. + +## Building the encoder on Linux + +Building the encoder binary: + +``` +bazel build -c opt //iamf/cli:encoder_main +``` + +Running built-in tests: + +``` +bazel test -c opt //iamf/... +``` + +## Test suite + +[iamf/cli/testdata](../iamf/cli/testdata) covers a wide variety of IAMF features. +These samples can be used as encoder input. After encoding the resultant `.iamf` +files can be used to assist in testing or debugging an IAMF-compliant decoder. + +See the separate [README.md](../iamf/cli/testdata/README.md) for further +documentation. + +## Folder structure + +* `` - Project-level files like the license, README (this file), and + BUILD files. +* `iamf/` + * `common/` - Common utility files. + * `tests/` - Unit tests for files under `common/`. + * `cli/` - Files related to the command line interface (CLI) to generate + and write an IA Sequence. + * `adm_to_user_metadata/` - Components to convert ADM files to + protocol buffers 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/`. + * `obu_to_proto/` - Components to convert classes under `iamf/obu` to + protocol buffers. + * `proto/` - [Protocol buffers](https://protobuf.dev/) defining the + data scheme for the input files under `iamf/cli/testdata/` or + user-created ones. + * `proto_to_obu/` - Components to convert protocol buffers to classes + under `iamf/obu`. + * `testdata/` - Sample input files to the encoder. See also + [Test Suite](#Test-Suite). + * `tests/` - Unit tests for files under `iamf/cli/`. + * `obu/` - Files relating to IAMF Open Bitstream Units (OBU)s. + * `decoder_config/` - Files relating codec-specific decoder configs. + * `tests/` - Unit tests for files under `decoder_config/`. + * `tests/` - Unit tests for files under `obu/`. +* `external/` - Custom `*.BUILD` files for external dependencies. +* `docs/` - Documentation. + +## Contributing +If you have improvements or fixes, we would love to have your contributions. See [CONTRIBUTING.md](../CONTRIBUTING.md) for details.