blob: 7e510860bcf734913ab816bb70cba439dc948c76 [file] [log] [blame] [view]
Tom Finegan9e57db22017-06-07 07:22:37 -07001# AV1 Codec Library
2
Tom Fineganbca03fc2017-12-08 07:47:06 -08003## Contents
41. [Building the lib and applications](#building-the-library-and-applications)
5 - [Prerequisites](#prerequisites)
Tom Finegan9007d342017-12-14 07:47:13 -08006 - [Get the code](#get-the-code)
Tom Fineganbca03fc2017-12-08 07:47:06 -08007 - [Basics](#basic-build)
8 - [Configuration options](#configuration-options)
9 - [Dylib builds](#dylib-builds)
10 - [Debugging](#debugging)
11 - [Cross compiling](#cross-compiling)
12 - [Sanitizer support](#sanitizers)
13 - [MSVC builds](#microsoft-visual-studio-builds)
14 - [Xcode builds](#xcode-builds)
15 - [Emscripten builds](#emscripten-builds)
162. [Testing the library](#testing-the-av1-codec)
17 - [Basics](#testing-basics)
18 - [Unit tests](#1_unit-tests)
19 - [Example tests](#2_example-tests)
Tom Finegan9007d342017-12-14 07:47:13 -080020 - [Encoder tests](#3_encoder-tests)
Tom Fineganbca03fc2017-12-08 07:47:06 -080021 - [IDE hosted tests](#ide-hosted-tests)
22 - [Downloading test data](#downloading-the-test-data)
Tom Finegan9007d342017-12-14 07:47:13 -080023 - [Additional test data](#additional-test-data)
Tom Fineganbca03fc2017-12-08 07:47:06 -080024 - [Sharded testing](#sharded-testing)
25 - [Running tests directly](#1_running-test_libaom-directly)
26 - [Running tests via CMake](#2_running-the-tests-via-the-cmake-build)
273. [Coding style](#coding-style)
Tom Finegan9007d342017-12-14 07:47:13 -0800284. [Submitting patches](#submitting-patches)
29 - [Login cookie](#login-cookie)
30 - [Contributor agreement](#contributor-agreement)
31 - [Testing your code](#testing-your-code)
32 - [Commit message hook](#commit-message-hook)
33 - [Upload your change](#upload-your-change)
34 - [Incorporating Reviewer Comments](#incorporating-reviewer-comments)
35 - [Submitting your change](#submitting-your-change)
36 - [Viewing change status](#viewing-the-status-of-uploaded-changes)
375. [Support](#support)
386. [Bug reports](#bug-reports)
Tom Fineganbca03fc2017-12-08 07:47:06 -080039
Tom Finegan9e57db22017-06-07 07:22:37 -070040## Building the library and applications
41
42### Prerequisites
43
44 1. [CMake](https://cmake.org) version 3.5 or higher.
45 2. [Git](https://git-scm.com/).
46 3. [Perl](https://www.perl.org/).
47 4. For x86 targets, [yasm](http://yasm.tortall.net/), which is preferred, or a
48 recent version of [nasm](http://www.nasm.us/).
49 5. Building the documentation requires [doxygen](http://doxygen.org).
Tom Fineganff766cd2017-06-20 14:18:03 -070050 6. Building the unit tests requires [Python](https://www.python.org/).
Tom Finegan84d35992017-07-07 10:38:01 -070051 7. Emscripten builds require the portable
52 [EMSDK](https://kripken.github.io/emscripten-site/index.html).
Tom Finegan9e57db22017-06-07 07:22:37 -070053
Tom Finegan9007d342017-12-14 07:47:13 -080054### Get the code
55
56The AV1 library source code is stored in the Alliance for Open Media Git
57repository:
58
59~~~
60 $ git clone https://aomedia.googlesource.com/aom
61 # By default, the above command stores the source in the aom directory:
62 $ cd aom
63~~~
64
Tom Finegan9e57db22017-06-07 07:22:37 -070065### Basic build
66
67CMake replaces the configure step typical of many projects. Running CMake will
68produce configuration and build files for the currently selected CMake
69generator. For most systems the default generator is Unix Makefiles. The basic
70form of a makefile build is the following:
71
Tom Finegan9007d342017-12-14 07:47:13 -080072~~~
Tom Finegan9e57db22017-06-07 07:22:37 -070073 $ cmake path/to/aom
74 $ make
Tom Finegan9007d342017-12-14 07:47:13 -080075~~~
Tom Finegan9e57db22017-06-07 07:22:37 -070076
77The above will generate a makefile build that produces the AV1 library and
78applications for the current host system after the make step completes
79successfully. The compiler chosen varies by host platform, but a general rule
80applies: On systems where cc and c++ are present in $PATH at the time CMake is
81run the generated build will use cc and c++ by default.
82
83### Configuration options
84
85The AV1 codec library has a great many configuration options. These come in two
86varieties:
87
88 1. Build system configuration options. These have the form `ENABLE_FEATURE`.
89 2. AV1 codec configuration options. These have the form `CONFIG_FEATURE`.
90
91Both types of options are set at the time CMake is run. The following example
Sebastien Alaiwan7c524d42018-01-02 10:10:55 +010092enables ccache and disables the AV1 encoder:
Tom Finegan9e57db22017-06-07 07:22:37 -070093
Tom Finegan007b2ee2017-07-11 14:47:06 -070094~~~
Sebastien Alaiwan7c524d42018-01-02 10:10:55 +010095 $ cmake path/to/aom -DENABLE_CCACHE=1 -DCONFIG_AV1_ENCODER=0
Tom Finegan9e57db22017-06-07 07:22:37 -070096 $ make
Tom Finegan007b2ee2017-07-11 14:47:06 -070097~~~
Tom Finegan9e57db22017-06-07 07:22:37 -070098
99The available configuration options are too numerous to list here. Build system
100configuration options can be found at the top of the CMakeLists.txt file found
101in the root of the AV1 repository, and AV1 codec configuration options can
102currently be found in the file `build/cmake/aom_config_defaults.cmake`.
103
Tom Finegan84f2d792017-06-15 23:06:44 -0700104### Dylib builds
105
106A dylib (shared object) build of the AV1 codec library can be enabled via the
Tom Finegan007b2ee2017-07-11 14:47:06 -0700107CMake built in variable `BUILD_SHARED_LIBS`:
Tom Finegan84f2d792017-06-15 23:06:44 -0700108
Tom Finegan007b2ee2017-07-11 14:47:06 -0700109~~~
110 $ cmake path/to/aom -DBUILD_SHARED_LIBS=1
Tom Finegan84f2d792017-06-15 23:06:44 -0700111 $ make
Tom Finegan007b2ee2017-07-11 14:47:06 -0700112~~~
Tom Finegan84f2d792017-06-15 23:06:44 -0700113
114This is currently only supported on non-Windows targets.
115
Tom Fineganfe809bd2017-09-27 11:54:24 -0700116### Debugging
117
118Depending on the generator used there are multiple ways of going about
119debugging AV1 components. For single configuration generators like the Unix
120Makefiles generator, setting `CMAKE_BUILD_TYPE` to Debug is sufficient:
121
122~~~
123 $ cmake path/to/aom -DCMAKE_BUILD_TYPE=Debug
124~~~
125
126For Xcode, mainly because configuration controls for Xcode builds are buried two
Tom Finegand77323d2017-09-29 09:41:43 -0700127configuration windows deep and must be set for each subproject within the Xcode
128IDE individually, `CMAKE_CONFIGURATION_TYPES` should be set to Debug:
Tom Fineganfe809bd2017-09-27 11:54:24 -0700129
130~~~
131 $ cmake path/to/aom -G Xcode -DCMAKE_CONFIGURATION_TYPES=Debug
132~~~
133
134For Visual Studio the in-IDE configuration controls should be used. Simply set
135the IDE project configuration to Debug to allow for stepping through the code.
136
137In addition to the above it can sometimes be useful to debug only C and C++
Tom Finegand77323d2017-09-29 09:41:43 -0700138code. To disable all assembly code and intrinsics set `AOM_TARGET_CPU` to
Tom Fineganfe809bd2017-09-27 11:54:24 -0700139generic at generation time:
140
141~~~
142 $ cmake path/to/aom -DAOM_TARGET_CPU=generic
143~~~
144
Tom Finegan9e57db22017-06-07 07:22:37 -0700145### Cross compiling
146
147For the purposes of building the AV1 codec and applications and relative to the
148scope of this guide, all builds for architectures differing from the native host
149architecture will be considered cross compiles. The AV1 CMake build handles
150cross compiling via the use of toolchain files included in the AV1 repository.
151The toolchain files available at the time of this writing are:
152
153 - arm64-ios.cmake
154 - arm64-linux-gcc.cmake
155 - armv7-ios.cmake
156 - armv7-linux-gcc.cmake
157 - armv7s-ios.cmake
158 - mips32-linux-gcc.cmake
159 - mips64-linux-gcc.cmake
160 - x86-ios-simulator.cmake
161 - x86-linux.cmake
162 - x86-macos.cmake
Tom Finegand77323d2017-09-29 09:41:43 -0700163 - x86-mingw-gcc.cmake
Tom Finegan9e57db22017-06-07 07:22:37 -0700164 - x86\_64-ios-simulator.cmake
Tom Finegand77323d2017-09-29 09:41:43 -0700165 - x86\_64-mingw-gcc.cmake
Tom Finegan9e57db22017-06-07 07:22:37 -0700166
167The following example demonstrates use of the x86-macos.cmake toolchain file on
168a x86\_64 MacOS host:
169
Tom Finegan007b2ee2017-07-11 14:47:06 -0700170~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700171 $ cmake path/to/aom \
172 -DCMAKE_TOOLCHAIN_FILE=path/to/aom/build/cmake/toolchains/x86-macos.cmake
173 $ make
Tom Finegan007b2ee2017-07-11 14:47:06 -0700174~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700175
176To build for an unlisted target creation of a new toolchain file is the best
177solution. The existing toolchain files can be used a starting point for a new
178toolchain file since each one exposes the basic requirements for toolchain files
179as used in the AV1 codec build.
180
181As a temporary work around an unoptimized AV1 configuration that builds only C
182and C++ sources can be produced using the following commands:
183
Tom Finegan007b2ee2017-07-11 14:47:06 -0700184~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700185 $ cmake path/to/aom -DAOM_TARGET_CPU=generic
186 $ make
Tom Finegan007b2ee2017-07-11 14:47:06 -0700187~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700188
189In addition to the above it's important to note that the toolchain files
190suffixed with gcc behave differently than the others. These toolchain files
191attempt to obey the $CROSS environment variable.
192
Tom Finegan8a30baf2017-09-13 11:35:34 -0700193### Sanitizers
194
195Sanitizer integration is built-in to the CMake build system. To enable a
196sanitizer, add `-DSANITIZE=<type>` to the CMake command line. For example, to
197enable address sanitizer:
198
199~~~
200 $ cmake path/to/aom -DSANITIZE=address
201 $ make
202~~~
203
204Sanitizers available vary by platform, target, and compiler. Consult your
205compiler documentation to determine which, if any, are available.
206
Tom Finegan9e57db22017-06-07 07:22:37 -0700207### Microsoft Visual Studio builds
208
209Building the AV1 codec library in Microsoft Visual Studio is supported. The
210following example demonstrates generating projects and a solution for the
211Microsoft IDE:
212
Tom Finegan007b2ee2017-07-11 14:47:06 -0700213~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700214 # This does not require a bash shell; command.exe is fine.
215 $ cmake path/to/aom -G "Visual Studio 15 2017"
Tom Finegan007b2ee2017-07-11 14:47:06 -0700216~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700217
218### Xcode builds
219
220Building the AV1 codec library in Xcode is supported. The following example
221demonstrates generating an Xcode project:
222
Tom Finegan007b2ee2017-07-11 14:47:06 -0700223~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700224 $ cmake path/to/aom -G Xcode
Tom Finegan007b2ee2017-07-11 14:47:06 -0700225~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700226
Tom Finegan84d35992017-07-07 10:38:01 -0700227### Emscripten builds
228
229Building the AV1 codec library with Emscripten is supported. Typically this is
230used to hook into the AOMAnalyzer GUI application. These instructions focus on
231using the inspector with AOMAnalyzer, but all tools can be built with
232Emscripten.
233
234It is assumed here that you have already downloaded and installed the EMSDK,
235installed and activated at least one toolchain, and setup your environment
236appropriately using the emsdk\_env script.
237
2381. Download [AOMAnalyzer](https://people.xiph.org/~mbebenita/analyzer/).
239
2402. Configure the build:
241
242~~~
243 $ cmake path/to/aom \
244 -DENABLE_CCACHE=1 \
245 -DAOM_TARGET_CPU=generic \
246 -DENABLE_DOCS=0 \
247 -DCONFIG_ACCOUNTING=1 \
248 -DCONFIG_INSPECTION=1 \
249 -DCONFIG_MULTITHREAD=0 \
250 -DCONFIG_RUNTIME_CPU_DETECT=0 \
251 -DCONFIG_UNIT_TESTS=0 \
252 -DCONFIG_WEBM_IO=0 \
253 -DCMAKE_TOOLCHAIN_FILE=path/to/emsdk-portable/.../Emscripten.cmake
254~~~
255
2563. Build it: run make if that's your generator of choice:
257
258~~~
259 $ make inspect
260~~~
261
2624. Run the analyzer:
263
264~~~
265 # inspect.js is in the examples sub directory of the directory in which you
266 # executed cmake.
267 $ path/to/AOMAnalyzer path/to/examples/inspect.js path/to/av1/input/file
268~~~
269
Tom Finegan9e57db22017-06-07 07:22:37 -0700270
271## Testing the AV1 codec
272
273### Testing basics
274
Tom Finegan9007d342017-12-14 07:47:13 -0800275There are several methods of testing the AV1 codec. All of these methods require
276the presence of the AV1 source code and a working build of the AV1 library and
277applications.
Tom Finegan9e57db22017-06-07 07:22:37 -0700278
Tom Finegan007b2ee2017-07-11 14:47:06 -0700279#### 1. Unit tests:
Tom Finegan9e57db22017-06-07 07:22:37 -0700280
281The unit tests can be run at build time:
282
Tom Finegan007b2ee2017-07-11 14:47:06 -0700283~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700284 # Before running the make command the LIBAOM_TEST_DATA_PATH environment
285 # variable should be set to avoid downloading the test files to the
286 # cmake build configuration directory.
287 $ cmake path/to/aom
288 # Note: The AV1 CMake build creates many test targets. Running make
289 # with multiple jobs will speed up the test run significantly.
290 $ make runtests
Tom Finegan007b2ee2017-07-11 14:47:06 -0700291~~~
292
293#### 2. Example tests:
Tom Finegan9e57db22017-06-07 07:22:37 -0700294
295The example tests require a bash shell and can be run in the following manner:
296
Tom Finegan007b2ee2017-07-11 14:47:06 -0700297~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700298 # See the note above about LIBAOM_TEST_DATA_PATH above.
299 $ cmake path/to/aom
300 $ make
301 # It's best to build the testdata target using many make jobs.
302 # Running it like this will verify and download (if necessary)
303 # one at a time, which takes a while.
304 $ make testdata
305 $ path/to/aom/test/examples.sh --bin-path examples
Tom Finegan007b2ee2017-07-11 14:47:06 -0700306~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700307
Tom Finegan9007d342017-12-14 07:47:13 -0800308#### 3. Encoder tests:
309
310When making a change to the encoder run encoder tests to confirm that your
311change has a positive or negligible impact on encode quality. When running these
312tests the build configuration should be changed to enable internal encoder
313statistics:
314
315~~~
316 $ cmake path/to/aom -DCONFIG_INTERNAL_STATS=1
317 $ make
318~~~
319
320The repository contains scripts intended to make running these tests as simple
321as possible. The following example demonstrates creating a set of baseline clips
322for comparison to results produced after making your change to libaom:
323
324~~~
325 # This will encode all Y4M files in the current directory using the
326 # settings specified to create the encoder baseline statistical data:
327 $ cd path/to/test/inputs
328 # This command line assumes that run_encodes.sh, its helper script
329 # best_encode.sh, and the aomenc you intend to test are all within a
330 # directory in your PATH.
331 $ run_encodes.sh 200 500 50 baseline
332~~~
333
334After making your change and creating the baseline clips, you'll need to run
335encodes that include your change(s) to confirm that things are working as
336intended:
337
338~~~
339 # This will encode all Y4M files in the current directory using the
340 # settings specified to create the statistical data for your change:
341 $ cd path/to/test/inputs
342 # This command line assumes that run_encodes.sh, its helper script
343 # best_encode.sh, and the aomenc you intend to test are all within a
344 # directory in your PATH.
345 $ run_encodes.sh 200 500 50 mytweak
346~~~
347
348After creating both data sets you can use `test/visual_metrics.py` to generate a
349report that can be viewed in a web browser:
350
351~~~
352 $ visual_metrics.py metrics_template.html "*stt" baseline mytweak \
353 > mytweak.html
354~~~
355
356You can view the report by opening mytweak.html in a web browser.
357
358
Tom Finegan9e57db22017-06-07 07:22:37 -0700359### IDE hosted tests
360
361By default the generated projects files created by CMake will not include the
362runtests and testdata rules when generating for IDEs like Microsoft Visual
363Studio and Xcode. This is done to avoid intolerably long build cycles in the
364IDEs-- IDE behavior is to build all targets when selecting the build project
365options in MSVS and Xcode. To enable the test rules in IDEs the
366`ENABLE_IDE_TEST_HOSTING` variable must be enabled at CMake generation time:
367
Tom Finegan007b2ee2017-07-11 14:47:06 -0700368~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700369 # This example uses Xcode. To get a list of the generators
370 # available, run cmake with the -G argument missing its
371 # value.
372 $ cmake path/to/aom -DENABLE_IDE_TEST_HOSTING=1 -G Xcode
Tom Finegan007b2ee2017-07-11 14:47:06 -0700373~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700374
375### Downloading the test data
376
377The fastest and easiest way to obtain the test data is to use CMake to generate
378a build using the Unix Makefiles generator, and then to build only the testdata
379rule:
380
Tom Finegan007b2ee2017-07-11 14:47:06 -0700381~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700382 $ cmake path/to/aom -G "Unix Makefiles"
383 # 28 is used because there are 28 test files as of this writing.
384 $ make -j28 testdata
Tom Finegan007b2ee2017-07-11 14:47:06 -0700385~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700386
387The above make command will only download and verify the test data.
388
Tom Finegan9007d342017-12-14 07:47:13 -0800389### Additional test data
390
391The test data mentioned above is strictly intended for unit testing.
392
393Additional input data for testing the encoder can be obtained from:
394https://media.xiph.org/video/derf/
395
Tom Finegan007b2ee2017-07-11 14:47:06 -0700396### Sharded testing
397
398The AV1 codec library unit tests are built upon gtest which supports sharding of
399test jobs. Sharded test runs can be achieved in a couple of ways.
400
401#### 1. Running test\_libaom directly:
402
403~~~
404 # Set the environment variable GTEST_TOTAL_SHARDS to 9 to run 10 test shards
405 # (GTEST shard indexing is 0 based).
406 $ export GTEST_TOTAL_SHARDS=9
James Zern515c8692017-08-30 16:32:28 -0700407 $ seq 0 $(( $GTEST_TOTAL_SHARDS - 1 )) \
408 | xargs -n 1 -P 0 -I{} env GTEST_SHARD_INDEX={} ./test_libaom
Tom Finegan007b2ee2017-07-11 14:47:06 -0700409~~~
410
411To create a test shard for each CPU core available on the current system set
412`GTEST_TOTAL_SHARDS` to the number of CPU cores on your system minus one.
413
414#### 2. Running the tests via the CMake build:
415
416~~~
417 # For IDE based builds, ENABLE_IDE_TEST_HOSTING must be enabled. See
418 # the IDE hosted tests section above for more information. If the IDE
419 # supports building targets concurrently tests will be sharded by default.
420
421 # For make and ninja builds the -j parameter controls the number of shards
422 # at test run time. This example will run the tests using 10 shards via
423 # make.
424 $ make -j10 runtests
425~~~
426
427The maximum number of test targets that can run concurrently is determined by
428the number of CPUs on the system where the build is configured as detected by
429CMake. A system with 24 cores can run 24 test shards using a value of 24 with
430the `-j` parameter. When CMake is unable to detect the number of cores 10 shards
431is the default maximum value.
Tom Finegan9e57db22017-06-07 07:22:37 -0700432
433## Coding style
434
Tom Finegan9007d342017-12-14 07:47:13 -0800435We are using the Google C Coding Style defined by the
436[Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
437
Tom Finegan9e57db22017-06-07 07:22:37 -0700438The coding style used by this project is enforced with clang-format using the
Tom Finegan9007d342017-12-14 07:47:13 -0800439configuration contained in the
440[.clang-format](https://chromium.googlesource.com/webm/aom/+/master/.clang-format)
441file in the root of the repository.
442
443You can download clang-format using your system's package manager, or directly
444from [llvm.org](http://llvm.org/releases/download.html). You can also view the
445[documentation](https://clang.llvm.org/docs/ClangFormat.html) on llvm.org.
446Output from clang-format varies by clang-format version, for best results your
447version should match the one used on Jenkins. You can find the clang-format
448version by reading the comment in the `.clang-format` file linked above.
Tom Finegan9e57db22017-06-07 07:22:37 -0700449
450Before pushing changes for review you can format your code with:
451
Tom Finegan007b2ee2017-07-11 14:47:06 -0700452~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700453 # Apply clang-format to modified .c, .h and .cc files
454 $ clang-format -i --style=file \
455 $(git diff --name-only --diff-filter=ACMR '*.[hc]' '*.cc')
Tom Finegan007b2ee2017-07-11 14:47:06 -0700456~~~
Tom Finegan9e57db22017-06-07 07:22:37 -0700457
458Check the .clang-format file for the version used to generate it if there is any
459difference between your local formatting and the review system.
460
Tom Finegan9007d342017-12-14 07:47:13 -0800461Some Git installations have clang-format integration. Here are some examples:
462
463~~~
464 # Apply clang-format to all staged changes:
465 $ git clang-format
466
467 # Clang format all staged and unstaged changes:
468 $ git clang-format -f
469
470 # Clang format all staged and unstaged changes interactively:
471 $ git clang-format -f -p
472~~~
473
474## Submitting patches
475
476We manage the submission of patches using the
477[Gerrit](https://www.gerritcodereview.com/) code review tool. This tool
478implements a workflow on top of the Git version control system to ensure that
479all changes get peer reviewed and tested prior to their distribution.
480
481### Login cookie
482
483Browse to [AOMedia Git index](https://aomedia.googlesource.com/) and login with
484your account (Gmail credentials, for example). Next, follow the
485`Generate Password` Password link at the top of the page. You’ll be given
486instructions for creating a cookie to use with our Git repos.
487
488### Contributor agreement
489
490You will be required to execute a
491[contributor agreement](http://aomedia.org/license) to ensure that the AOMedia
492Project has the right to distribute your changes.
493
494### Testing your code
495
496The testing basics are covered in the [testing section](#testing-the-av1-codec)
497above.
498
499In addition to the local tests, many more (e.g. asan, tsan, valgrind) will run
500through Jenkins instances upon upload to gerrit.
501
502### Commit message hook
503
504Gerrit requires that each submission include a unique Change-Id. You can assign
505one manually using git commit --amend, but it’s easier to automate it with the
506commit-msg hook provided by Gerrit.
507
508Copy commit-msg to the `.git/hooks` directory of your local repo. Here's an
509example:
510
511~~~
512 $ curl -Lo aom/.git/hooks/commit-msg https://chromium-review.googlesource.com/tools/hooks/commit-msg
513
514 # Next, ensure that the downloaded commit-msg script is executable:
515 $ chmod u+x aom/.git/hooks/commit-msg
516~~~
517
518See the Gerrit
519[documentation](https://gerrit-review.googlesource.com/Documentation/user-changeid.html)
520for more information.
521
522### Upload your change
523
524The command line to upload your patch looks like this:
525
526~~~
527 $ git push https://aomedia-review.googlesource.com/aom HEAD:refs/for/master
528~~~
529
530### Incorporating reviewer comments
531
532If you previously uploaded a change to Gerrit and the Approver has asked for
533changes, follow these steps:
534
5351. Edit the files to make the changes the reviewer has requested.
5362. Recommit your edits using the --amend flag, for example:
537
538~~~
539 $ git commit -a --amend
540~~~
541
5423. Use the same git push command as above to upload to Gerrit again for another
543 review cycle.
544
545In general, you should not rebase your changes when doing updates in response to
546review. Doing so can make it harder to follow the evolution of your change in
547the diff view.
548
549### Submitting your change
550
551Once your change has been Approved and Verified, you can “submit” it through the
552Gerrit UI. This will usually automatically rebase your change onto the branch
553specified.
554
555Sometimes this can’t be done automatically. If you run into this problem, you
556must rebase your changes manually:
557
558~~~
559 $ git fetch
560 $ git rebase origin/branchname
561~~~
562
563If there are any conflicts, resolve them as you normally would with Git. When
564you’re done, reupload your change.
565
566### Viewing the status of uploaded changes
567
568To check the status of a change that you uploaded, open
569[Gerrit](https://aomedia-review.googlesource.com/), sign in, and click My >
570Changes.
Tom Finegan9e57db22017-06-07 07:22:37 -0700571
572## Support
573
574This library is an open source project supported by its community. Please
575please email aomediacodec@jointdevelopment.kavi.com for help.
576
577## Bug reports
578
579Bug reports can be filed in the Alliance for Open Media
580[issue tracker](https://bugs.chromium.org/p/aomedia/issues/list).