Skip to content

Commit

Permalink
Refactor build and development related docs to a separate file.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 684990481
  • Loading branch information
felicialim committed Oct 16, 2024
1 parent e1b762c commit 7a721cf
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 61 deletions.
66 changes: 5 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

* `<root>` - 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

Expand Down Expand Up @@ -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
Expand Down
66 changes: 66 additions & 0 deletions docs/build_instructions.md
Original file line number Diff line number Diff line change
@@ -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

* `<root>` - 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.

0 comments on commit 7a721cf

Please sign in to comment.