1README.md {#LREADME} 2========= 3# AV1 Codec Library 4 5## Contents 61. [Building the lib and applications](#building-the-library-and-applications) 7 - [Prerequisites](#prerequisites) 8 - [Get the code](#get-the-code) 9 - [Basics](#basic-build) 10 - [Configuration options](#configuration-options) 11 - [Dylib builds](#dylib-builds) 12 - [Debugging](#debugging) 13 - [Cross compiling](#cross-compiling) 14 - [Sanitizer support](#sanitizers) 15 - [MSVC builds](#microsoft-visual-studio-builds) 16 - [Xcode builds](#xcode-builds) 17 - [Emscripten builds](#emscripten-builds) 18 - [Extra Build Flags](#extra-build-flags) 19 - [Build with VMAF support](#build-with-vmaf) 202. [Testing the library](#testing-the-av1-codec) 21 - [Basics](#testing-basics) 22 - [Unit tests](#unit-tests) 23 - [Example tests](#example-tests) 24 - [Encoder tests](#encoder-tests) 25 - [IDE hosted tests](#ide-hosted-tests) 26 - [Downloading test data](#downloading-the-test-data) 27 - [Adding a new test data file](#adding-a-new-test-data-file) 28 - [Additional test data](#additional-test-data) 29 - [Sharded testing](#sharded-testing) 30 - [Running tests directly](#running-test_libaom-directly) 31 - [Running tests via CMake](#running-the-tests-via-the-cmake-build) 323. [Coding style](#coding-style) 334. [License header](#license-header) 345. [Submitting patches](#submitting-patches) 35 - [Login cookie](#login-cookie) 36 - [Contributor agreement](#contributor-agreement) 37 - [Testing your code](#testing-your-code) 38 - [Commit message hook](#commit-message-hook) 39 - [Upload your change](#upload-your-change) 40 - [Incorporating Reviewer Comments](#incorporating-reviewer-comments) 41 - [Submitting your change](#submitting-your-change) 42 - [Viewing change status](#viewing-the-status-of-uploaded-changes) 436. [Support](#support) 447. [Bug reports](#bug-reports) 45 46## Building the library and applications {#building-the-library-and-applications} 47 48### Prerequisites {#prerequisites} 49 501. [CMake](https://cmake.org). See CMakeLists.txt for the minimum version 51 required. 522. [Git](https://git-scm.com/). 533. A modern C compiler. gcc 6+, clang 7+, Microsoft Visual Studio 2019+ or 54 the latest version of MinGW-w64 (clang64 or ucrt toolchains) are 55 recommended. A C++ compiler is necessary to build the unit tests and some 56 features contained in the examples. 574. [Perl](https://www.perl.org/). 585. For x86 targets, [yasm](http://yasm.tortall.net/) or a recent version (2.14 59 or later) of [nasm](http://www.nasm.us/). (If both yasm and nasm are 60 present, yasm will be used by default. Pass -DENABLE_NASM=ON to cmake to 61 select nasm.) If you download yasm with the intention to work with Visual 62 Studio, please download win32.exe or win64.exe and rename it into yasm.exe. 63 DO NOT download or use vsyasm.exe. The MSYS2 version of the yasm binary can 64 also be used and avoids an issue caused by a missing Visual C++ 65 Redistributable install (Visual Studio 2010, MSVCR100.dll). 666. Building the documentation requires 67 [doxygen version 1.8.10 or newer](http://doxygen.org). 687. Emscripten builds require the portable 69 [EMSDK](https://kripken.github.io/emscripten-site/index.html). 70 71### Get the code {#get-the-code} 72 73The AV1 library source code is stored in the Alliance for Open Media Git 74repository: 75 76~~~ 77 $ git clone https://aomedia.googlesource.com/aom 78 # By default, the above command stores the source in the aom directory: 79 $ cd aom 80~~~ 81 82### Basic build {#basic-build} 83 84CMake replaces the configure step typical of many projects. Running CMake will 85produce configuration and build files for the currently selected CMake 86generator. For most systems the default generator is Unix Makefiles. The basic 87form of a makefile build is the following: 88 89~~~ 90 $ cmake path/to/aom 91 $ make 92~~~ 93 94The above will generate a makefile build that produces the AV1 library and 95applications for the current host system after the make step completes 96successfully. The compiler chosen varies by host platform, but a general rule 97applies: On systems where cc and c++ are present in $PATH at the time CMake is 98run the generated build will use cc and c++ by default. 99 100### Configuration options {#configuration-options} 101 102The AV1 codec library has a great many configuration options. These come in two 103varieties: 104 105 1. Build system configuration options. These have the form `ENABLE_FEATURE`. 106 2. AV1 codec configuration options. These have the form `CONFIG_FEATURE`. 107 108Both types of options are set at the time CMake is run. The following example 109enables ccache and disables the AV1 encoder: 110 111~~~ 112 $ cmake path/to/aom -DENABLE_CCACHE=1 -DCONFIG_AV1_ENCODER=0 113 $ make 114~~~ 115 116The available configuration options are too numerous to list here. Build system 117configuration options can be found at the top of the CMakeLists.txt file found 118in the root of the AV1 repository, and AV1 codec configuration options can 119currently be found in the file `build/cmake/aom_config_defaults.cmake`. 120 121### Dylib builds {#dylib-builds} 122 123A dylib (shared object) build of the AV1 codec library can be enabled via the 124CMake built in variable `BUILD_SHARED_LIBS`: 125 126~~~ 127 $ cmake path/to/aom -DBUILD_SHARED_LIBS=1 128 $ make 129~~~ 130 131This is currently only supported on non-Windows targets. 132 133### Debugging {#debugging} 134 135Depending on the generator used there are multiple ways of going about 136debugging AV1 components. For single configuration generators like the Unix 137Makefiles generator, setting `CMAKE_BUILD_TYPE` to Debug is sufficient: 138 139~~~ 140 $ cmake path/to/aom -DCMAKE_BUILD_TYPE=Debug 141~~~ 142 143For Xcode, mainly because configuration controls for Xcode builds are buried two 144configuration windows deep and must be set for each subproject within the Xcode 145IDE individually, `CMAKE_CONFIGURATION_TYPES` should be set to Debug: 146 147~~~ 148 $ cmake path/to/aom -G Xcode -DCMAKE_CONFIGURATION_TYPES=Debug 149~~~ 150 151For Visual Studio the in-IDE configuration controls should be used. Simply set 152the IDE project configuration to Debug to allow for stepping through the code. 153 154In addition to the above it can sometimes be useful to debug only C and C++ 155code. To disable all assembly code and intrinsics set `AOM_TARGET_CPU` to 156generic at generation time: 157 158~~~ 159 $ cmake path/to/aom -DAOM_TARGET_CPU=generic 160~~~ 161 162### Cross compiling {#cross-compiling} 163 164For the purposes of building the AV1 codec and applications and relative to the 165scope of this guide, all builds for architectures differing from the native host 166architecture will be considered cross compiles. The AV1 CMake build handles 167cross compiling via the use of toolchain files included in the AV1 repository. 168The toolchain files available at the time of this writing are: 169 170 - arm64-ios.cmake 171 - arm64-linux-clang.cmake 172 - arm64-linux-gcc.cmake 173 - arm64-mingw-gcc.cmake 174 - armv7-ios.cmake 175 - armv7-linux-gcc.cmake 176 - armv7-mingw-gcc.cmake 177 - armv7s-ios.cmake 178 - ppc-linux-gcc.cmake 179 - riscv-linux-gcc.cmake 180 - x86-ios-simulator.cmake 181 - x86-linux.cmake 182 - x86-macos.cmake 183 - x86-mingw-gcc.cmake 184 - x86\_64-ios-simulator.cmake 185 - x86\_64-mingw-gcc.cmake 186 187The following example demonstrates use of the x86-macos.cmake toolchain file on 188a x86\_64 MacOS host: 189 190~~~ 191 $ cmake path/to/aom \ 192 -DCMAKE_TOOLCHAIN_FILE=path/to/aom/build/cmake/toolchains/x86-macos.cmake 193 $ make 194~~~ 195 196To build for an unlisted target creation of a new toolchain file is the best 197solution. The existing toolchain files can be used a starting point for a new 198toolchain file since each one exposes the basic requirements for toolchain files 199as used in the AV1 codec build. 200 201As a temporary work around an unoptimized AV1 configuration that builds only C 202and C++ sources can be produced using the following commands: 203 204~~~ 205 $ cmake path/to/aom -DAOM_TARGET_CPU=generic 206 $ make 207~~~ 208 209In addition to the above it's important to note that the toolchain files 210suffixed with gcc behave differently than the others. These toolchain files 211attempt to obey the $CROSS environment variable. 212 213### Sanitizers {#sanitizers} 214 215Sanitizer integration is built-in to the CMake build system. To enable a 216sanitizer, add `-DSANITIZE=<type>` to the CMake command line. For example, to 217enable address sanitizer: 218 219~~~ 220 $ cmake path/to/aom -DSANITIZE=address 221 $ make 222~~~ 223 224Sanitizers available vary by platform, target, and compiler. Consult your 225compiler documentation to determine which, if any, are available. 226 227### Microsoft Visual Studio builds {#microsoft-visual-studio-builds} 228 229Building the AV1 codec library in Microsoft Visual Studio is supported. Visual 230Studio 2019 (16.0) or later is required. The following example demonstrates 231generating projects and a solution for the Microsoft IDE: 232 233~~~ 234 # This does not require a bash shell; Command Prompt (cmd.exe) is fine. 235 # This assumes the build host is a Windows x64 computer. 236 237 # To create a Visual Studio 2022 solution for the x64 target: 238 $ cmake path/to/aom -G "Visual Studio 17 2022" 239 240 # To create a Visual Studio 2022 solution for the 32-bit x86 target: 241 $ cmake path/to/aom -G "Visual Studio 17 2022" -A Win32 242 243 # To create a Visual Studio 2019 solution for the x64 target: 244 $ cmake path/to/aom -G "Visual Studio 16 2019" 245 246 # To create a Visual Studio 2019 solution for the 32-bit x86 target: 247 $ cmake path/to/aom -G "Visual Studio 16 2019" -A Win32 248 249 # To build the solution: 250 $ cmake --build . 251~~~ 252 253NOTE: The build system targets Windows 7 or later by compiling files with 254`-D_WIN32_WINNT=0x0601`. 255 256### Xcode builds {#xcode-builds} 257 258Building the AV1 codec library in Xcode is supported. The following example 259demonstrates generating an Xcode project: 260 261~~~ 262 $ cmake path/to/aom -G Xcode 263~~~ 264 265### Emscripten builds {#emscripten-builds} 266 267Building the AV1 codec library with Emscripten is supported. Typically this is 268used to hook into the AOMAnalyzer GUI application. These instructions focus on 269using the inspector with AOMAnalyzer, but all tools can be built with 270Emscripten. 271 272It is assumed here that you have already downloaded and installed the EMSDK, 273installed and activated at least one toolchain, and setup your environment 274appropriately using the emsdk\_env script. 275 2761. Build [AOM Analyzer](https://github.com/xiph/aomanalyzer). 277 2782. Configure the build: 279 280~~~ 281 $ cmake path/to/aom \ 282 -DENABLE_CCACHE=1 \ 283 -DAOM_TARGET_CPU=generic \ 284 -DENABLE_DOCS=0 \ 285 -DENABLE_TESTS=0 \ 286 -DCONFIG_ACCOUNTING=1 \ 287 -DCONFIG_INSPECTION=1 \ 288 -DCONFIG_MULTITHREAD=0 \ 289 -DCONFIG_RUNTIME_CPU_DETECT=0 \ 290 -DCONFIG_WEBM_IO=0 \ 291 -DCMAKE_TOOLCHAIN_FILE=path/to/emsdk-portable/.../Emscripten.cmake 292~~~ 293 2943. Build it: run make if that's your generator of choice: 295 296~~~ 297 $ make inspect 298~~~ 299 3004. Run the analyzer: 301 302~~~ 303 # inspect.js is in the examples sub directory of the directory in which you 304 # executed cmake. 305 $ path/to/AOMAnalyzer path/to/examples/inspect.js path/to/av1/input/file 306~~~ 307 308### Extra build flags {#extra-build-flags} 309 310Three variables allow for passing of additional flags to the build system. 311 312- AOM\_EXTRA\_C\_FLAGS 313- AOM\_EXTRA\_CXX\_FLAGS 314- AOM\_EXTRA\_EXE\_LINKER\_FLAGS 315 316The build system attempts to ensure the flags passed through the above variables 317are passed to tools last in order to allow for override of default behavior. 318These flags can be used, for example, to enable asserts in a release build: 319 320~~~ 321 $ cmake path/to/aom \ 322 -DCMAKE_BUILD_TYPE=Release \ 323 -DAOM_EXTRA_C_FLAGS=-UNDEBUG \ 324 -DAOM_EXTRA_CXX_FLAGS=-UNDEBUG 325~~~ 326 327### Build with VMAF support {#build-with-vmaf} 328 329After installing 330[libvmaf.a](https://github.com/Netflix/vmaf/tree/master/libvmaf), 331you can use it with the encoder: 332 333~~~ 334 $ cmake path/to/aom -DCONFIG_TUNE_VMAF=1 335~~~ 336 337Please note that the default VMAF model 338("/usr/local/share/model/vmaf_v0.6.1.json") 339will be used unless you set the following flag when running the encoder: 340 341~~~ 342 # --vmaf-model-path=path/to/model 343~~~ 344 345## Testing the AV1 codec {#testing-the-av1-codec} 346 347### Testing basics {#testing-basics} 348 349There are several methods of testing the AV1 codec. All of these methods require 350the presence of the AV1 source code and a working build of the AV1 library and 351applications. 352 353#### 1. Unit tests: {#unit-tests} 354 355The unit tests can be run at build time: 356 357~~~ 358 # Before running the make command the LIBAOM_TEST_DATA_PATH environment 359 # variable should be set to avoid downloading the test files to the 360 # cmake build configuration directory. 361 $ cmake path/to/aom 362 # Note: The AV1 CMake build creates many test targets. Running make 363 # with multiple jobs will speed up the test run significantly. 364 $ make runtests 365~~~ 366 367#### 2. Example tests: {#example-tests} 368 369The example tests require a bash shell and can be run in the following manner: 370 371~~~ 372 # See the note above about LIBAOM_TEST_DATA_PATH above. 373 $ cmake path/to/aom 374 $ make 375 # It's best to build the testdata target using many make jobs. 376 # Running it like this will verify and download (if necessary) 377 # one at a time, which takes a while. 378 $ make testdata 379 $ path/to/aom/test/examples.sh --bin-path examples 380~~~ 381 382#### 3. Encoder tests: {#encoder-tests} 383 384When making a change to the encoder run encoder tests to confirm that your 385change has a positive or negligible impact on encode quality. When running these 386tests the build configuration should be changed to enable internal encoder 387statistics: 388 389~~~ 390 $ cmake path/to/aom -DCONFIG_INTERNAL_STATS=1 391 $ make 392~~~ 393 394The repository contains scripts intended to make running these tests as simple 395as possible. The following example demonstrates creating a set of baseline clips 396for comparison to results produced after making your change to libaom: 397 398~~~ 399 # This will encode all Y4M files in the current directory using the 400 # settings specified to create the encoder baseline statistical data: 401 $ cd path/to/test/inputs 402 # This command line assumes that run_encodes.sh, its helper script 403 # best_encode.sh, and the aomenc you intend to test are all within a 404 # directory in your PATH. 405 $ run_encodes.sh 200 500 50 baseline 406~~~ 407 408After making your change and creating the baseline clips, you'll need to run 409encodes that include your change(s) to confirm that things are working as 410intended: 411 412~~~ 413 # This will encode all Y4M files in the current directory using the 414 # settings specified to create the statistical data for your change: 415 $ cd path/to/test/inputs 416 # This command line assumes that run_encodes.sh, its helper script 417 # best_encode.sh, and the aomenc you intend to test are all within a 418 # directory in your PATH. 419 $ run_encodes.sh 200 500 50 mytweak 420~~~ 421 422After creating both data sets you can use `test/visual_metrics.py` to generate a 423report that can be viewed in a web browser: 424 425~~~ 426 $ visual_metrics.py metrics_template.html "*stt" baseline mytweak \ 427 > mytweak.html 428~~~ 429 430You can view the report by opening mytweak.html in a web browser. 431 432 433### IDE hosted tests {#ide-hosted-tests} 434 435By default the generated projects files created by CMake will not include the 436runtests and testdata rules when generating for IDEs like Microsoft Visual 437Studio and Xcode. This is done to avoid intolerably long build cycles in the 438IDEs-- IDE behavior is to build all targets when selecting the build project 439options in MSVS and Xcode. To enable the test rules in IDEs the 440`ENABLE_IDE_TEST_HOSTING` variable must be enabled at CMake generation time: 441 442~~~ 443 # This example uses Xcode. To get a list of the generators 444 # available, run cmake with the -G argument missing its 445 # value. 446 $ cmake path/to/aom -DENABLE_IDE_TEST_HOSTING=1 -G Xcode 447~~~ 448 449### Downloading the test data {#downloading-the-test-data} 450 451The fastest and easiest way to obtain the test data is to use CMake to generate 452a build using the Unix Makefiles generator, and then to build only the testdata 453rule. By default the test files will be downloaded to the current directory. The 454`LIBAOM_TEST_DATA_PATH` environment variable can be used to set a 455custom one. 456 457~~~ 458 $ cmake path/to/aom -G "Unix Makefiles" 459 # 28 is used because there are 28 test files as of this writing. 460 $ make -j28 testdata 461~~~ 462 463The above make command will only download and verify the test data. 464 465### Adding a new test data file {#adding-a-new-test-data-file} 466 467First, add the new test data file to the `aom-test-data` bucket of the 468`aomedia-testing` project on Google Cloud Platform. You may need to ask someone 469with the necessary access permissions to do this for you. 470 471NOTE: When a new test data file is added to the `aom-test-data` bucket, its 472"Public access" is initially "Not public". We need to change its 473"Public access" to "Public" by using the following 474[`gsutil`](https://cloud.google.com/storage/docs/gsutil_install) command: 475~~~ 476 $ gsutil acl ch -g all:R gs://aom-test-data/test-data-file-name 477~~~ 478This command grants the `AllUsers` group READ access to the file named 479"test-data-file-name" in the `aom-test-data` bucket. 480 481Once the new test data file has been added to `aom-test-data`, create a CL to 482add the name of the new test data file to `test/test_data_util.cmake` and add 483the SHA1 checksum of the new test data file to `test/test-data.sha1`. (The SHA1 484checksum of a file can be calculated by running the `sha1sum` command on the 485file.) 486 487### Additional test data {#additional-test-data} 488 489The test data mentioned above is strictly intended for unit testing. 490 491Additional input data for testing the encoder can be obtained from: 492https://media.xiph.org/video/derf/ 493 494### Sharded testing {#sharded-testing} 495 496The AV1 codec library unit tests are built upon gtest which supports sharding of 497test jobs. Sharded test runs can be achieved in a couple of ways. 498 499#### 1. Running test\_libaom directly: {#running-test_libaom-directly} 500 501~~~ 502 # Set the environment variable GTEST_TOTAL_SHARDS to control the number of 503 # shards. 504 $ export GTEST_TOTAL_SHARDS=10 505 # (GTEST shard indexing is 0 based). 506 $ seq 0 $(( $GTEST_TOTAL_SHARDS - 1 )) \ 507 | xargs -n 1 -P 0 -I{} env GTEST_SHARD_INDEX={} ./test_libaom 508~~~ 509 510To create a test shard for each CPU core available on the current system set 511`GTEST_TOTAL_SHARDS` to the number of CPU cores on your system minus one. 512 513#### 2. Running the tests via the CMake build: {#running-the-tests-via-the-cmake-build} 514 515~~~ 516 # For IDE based builds, ENABLE_IDE_TEST_HOSTING must be enabled. See 517 # the IDE hosted tests section above for more information. If the IDE 518 # supports building targets concurrently tests will be sharded by default. 519 520 # For make and ninja builds the -j parameter controls the number of shards 521 # at test run time. This example will run the tests using 10 shards via 522 # make. 523 $ make -j10 runtests 524~~~ 525 526The maximum number of test targets that can run concurrently is determined by 527the number of CPUs on the system where the build is configured as detected by 528CMake. A system with 24 cores can run 24 test shards using a value of 24 with 529the `-j` parameter. When CMake is unable to detect the number of cores 10 shards 530is the default maximum value. 531 532## Coding style {#coding-style} 533 534We are using the Google C Coding Style defined by the 535[Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html). 536 537The coding style used by this project is enforced with clang-format using the 538configuration contained in the 539[.clang-format](https://chromium.googlesource.com/webm/aom/+/main/.clang-format) 540file in the root of the repository. 541 542You can download clang-format using your system's package manager, or directly 543from [llvm.org](http://llvm.org/releases/download.html). You can also view the 544[documentation](https://clang.llvm.org/docs/ClangFormat.html) on llvm.org. 545Output from clang-format varies by clang-format version, for best results your 546version should match the one used on Jenkins. You can find the clang-format 547version by reading the comment in the `.clang-format` file linked above. 548 549Before pushing changes for review you can format your code with: 550 551~~~ 552 # Apply clang-format to modified .c, .h and .cc files 553 $ clang-format -i --style=file \ 554 $(git diff --name-only --diff-filter=ACMR '*.[hc]' '*.cc') 555~~~ 556 557Check the .clang-format file for the version used to generate it if there is any 558difference between your local formatting and the review system. 559 560Some Git installations have clang-format integration. Here are some examples: 561 562~~~ 563 # Apply clang-format to all staged changes: 564 $ git clang-format 565 566 # Clang format all staged and unstaged changes: 567 $ git clang-format -f 568 569 # Clang format all staged and unstaged changes interactively: 570 $ git clang-format -f -p 571~~~ 572 573## License header {#license-header} 574 575Use the following comment block in new C/C++ source files, replacing "${year}" 576with the current year. The same comment should be added to other file types, 577adjusting the comment syntax as necessary. 578 579``` 580/* 581 * Copyright (c) ${year}, Alliance for Open Media. All rights reserved. 582 * 583 * This source code is subject to the terms of the BSD 2 Clause License and 584 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License 585 * was not distributed with this source code in the LICENSE file, you can 586 * obtain it at www.aomedia.org/license/software. If the Alliance for Open 587 * Media Patent License 1.0 was not distributed with this source code in the 588 * PATENTS file, you can obtain it at www.aomedia.org/license/patent. 589 */ 590``` 591 592## Submitting patches {#submitting-patches} 593 594We manage the submission of patches using the 595[Gerrit](https://www.gerritcodereview.com/) code review tool. This tool 596implements a workflow on top of the Git version control system to ensure that 597all changes get peer reviewed and tested prior to their distribution. 598 599### Login cookie {#login-cookie} 600 601Browse to [AOMedia Git index](https://aomedia.googlesource.com/) and login with 602your account (Gmail credentials, for example). Next, follow the 603`Generate Password` Password link at the top of the page. You’ll be given 604instructions for creating a cookie to use with our Git repos. 605 606You must also have a Gerrit account associated with your Google account. To do 607this visit the [Gerrit review server](https://aomedia-review.googlesource.com) 608and click "Sign in" (top right). 609 610### Contributor agreement {#contributor-agreement} 611 612You will be required to execute a 613[contributor agreement](http://aomedia.org/license) to ensure that the AOMedia 614Project has the right to distribute your changes. 615 616Note: If you are pushing changes on behalf of an Alliance for Open Media member 617organization this step is not necessary. 618 619### Testing your code {#testing-your-code} 620 621The testing basics are covered in the [testing section](#testing-the-av1-codec) 622above. 623 624In addition to the local tests, many more (e.g. asan, tsan, valgrind) will run 625through Jenkins instances upon upload to gerrit. 626 627### Commit message hook {#commit-message-hook} 628 629Gerrit requires that each submission include a unique Change-Id. You can assign 630one manually using git commit --amend, but it’s easier to automate it with the 631commit-msg hook provided by Gerrit. 632 633Copy commit-msg to the `.git/hooks` directory of your local repo. Here's an 634example: 635 636~~~ 637 $ curl -Lo aom/.git/hooks/commit-msg https://chromium-review.googlesource.com/tools/hooks/commit-msg 638 639 # Next, ensure that the downloaded commit-msg script is executable: 640 $ chmod u+x aom/.git/hooks/commit-msg 641~~~ 642 643See the Gerrit 644[documentation](https://gerrit-review.googlesource.com/Documentation/user-changeid.html) 645for more information. 646 647### Upload your change {#upload-your-change} 648 649The command line to upload your patch looks like this: 650 651~~~ 652 $ git push https://aomedia-review.googlesource.com/aom HEAD:refs/for/main 653~~~ 654 655### Incorporating reviewer comments {#incorporating-reviewer-comments} 656 657If you previously uploaded a change to Gerrit and the Approver has asked for 658changes, follow these steps: 659 6601. Edit the files to make the changes the reviewer has requested. 6612. Recommit your edits using the --amend flag, for example: 662 663~~~ 664 $ git commit -a --amend 665~~~ 666 6673. Use the same git push command as above to upload to Gerrit again for another 668 review cycle. 669 670In general, you should not rebase your changes when doing updates in response to 671review. Doing so can make it harder to follow the evolution of your change in 672the diff view. 673 674### Submitting your change {#submitting-your-change} 675 676Once your change has been Approved and Verified, you can “submit” it through the 677Gerrit UI. This will usually automatically rebase your change onto the branch 678specified. 679 680Sometimes this can’t be done automatically. If you run into this problem, you 681must rebase your changes manually: 682 683~~~ 684 $ git fetch 685 $ git rebase origin/branchname 686~~~ 687 688If there are any conflicts, resolve them as you normally would with Git. When 689you’re done, reupload your change. 690 691### Viewing the status of uploaded changes {#viewing-the-status-of-uploaded-changes} 692 693To check the status of a change that you uploaded, open 694[Gerrit](https://aomedia-review.googlesource.com/), sign in, and click My > 695Changes. 696 697## Support {#support} 698 699This library is an open source project supported by its community. Please 700please email aomediacodec@jointdevelopment.kavi.com for help. 701 702## Bug reports {#bug-reports} 703 704Bug reports can be filed in the Alliance for Open Media 705[issue tracker](https://aomedia.issues.chromium.org/). For security reports, 706select 'Security report' from the Template dropdown. 707