Bug 1489285: Update libaom. r=dminor
authorThomas Daede <daede003@umn.edu>
Wed, 19 Sep 2018 21:27:06 +0000
changeset 437343 56fc87d34f91c6f853366e54e17ae80b8d02e7df
parent 437342 8a262cd03dfdb1cea13ac3472ac84de66708b952
child 437344 83cf62d8cd251c04e06c05f605f6806c23b55891
push id34678
push userbtara@mozilla.com
push dateThu, 20 Sep 2018 04:11:49 +0000
treeherdermozilla-central@5111ca226d2b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdminor
bugs1489285
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1489285: Update libaom. r=dminor Differential Revision: https://phabricator.services.mozilla.com/D6206
media/libaom/README_MOZILLA
media/libaom/config/generic/config/aom_config.asm
media/libaom/config/generic/config/aom_config.h
media/libaom/config/generic/config/av1_rtcd.h
media/libaom/config/linux/arm/config/aom_config.asm
media/libaom/config/linux/arm/config/aom_config.h
media/libaom/config/linux/arm/config/aom_dsp_rtcd.h
media/libaom/config/linux/arm/config/aom_scale_rtcd.h
media/libaom/config/linux/arm/config/av1_rtcd.h
media/libaom/config/linux/ia32/config/aom_config.asm
media/libaom/config/linux/ia32/config/aom_config.h
media/libaom/config/linux/ia32/config/aom_dsp_rtcd.h
media/libaom/config/linux/ia32/config/av1_rtcd.h
media/libaom/config/linux/x64/config/aom_config.asm
media/libaom/config/linux/x64/config/aom_config.h
media/libaom/config/linux/x64/config/aom_dsp_rtcd.h
media/libaom/config/linux/x64/config/av1_rtcd.h
media/libaom/config/mac/x64/config/aom_config.asm
media/libaom/config/mac/x64/config/aom_config.h
media/libaom/config/mac/x64/config/aom_dsp_rtcd.h
media/libaom/config/mac/x64/config/av1_rtcd.h
media/libaom/config/win/ia32/config/aom_config.asm
media/libaom/config/win/ia32/config/aom_config.h
media/libaom/config/win/ia32/config/aom_dsp_rtcd.h
media/libaom/config/win/ia32/config/av1_rtcd.h
media/libaom/config/win/mingw32/config/aom_config.asm
media/libaom/config/win/mingw32/config/aom_config.h
media/libaom/config/win/mingw32/config/aom_dsp_rtcd.h
media/libaom/config/win/mingw32/config/av1_rtcd.h
media/libaom/config/win/mingw64/config/aom_config.asm
media/libaom/config/win/mingw64/config/aom_config.h
media/libaom/config/win/mingw64/config/aom_dsp_rtcd.h
media/libaom/config/win/mingw64/config/av1_rtcd.h
media/libaom/config/win/x64/config/aom_config.asm
media/libaom/config/win/x64/config/aom_config.h
media/libaom/config/win/x64/config/aom_dsp_rtcd.h
media/libaom/config/win/x64/config/av1_rtcd.h
media/libaom/sources.mozbuild
third_party/aom/CMakeLists.txt
third_party/aom/README.md
third_party/aom/aom/aom.h
third_party/aom/aom/aom_codec.h
third_party/aom/aom/aom_decoder.h
third_party/aom/aom/aom_encoder.h
third_party/aom/aom/aom_frame_buffer.h
third_party/aom/aom/aom_image.h
third_party/aom/aom/aom_integer.h
third_party/aom/aom/aomcx.h
third_party/aom/aom/aomdx.h
third_party/aom/aom/exports_com
third_party/aom/aom/exports_dec
third_party/aom/aom/exports_enc
third_party/aom/aom/exports_test
third_party/aom/aom/internal/aom_codec_internal.h
third_party/aom/aom/src/aom_decoder.c
third_party/aom/aom/src/aom_encoder.c
third_party/aom/aom_dsp/aom_convolve.c
third_party/aom/aom_dsp/aom_convolve.h
third_party/aom/aom_dsp/aom_dsp.cmake
third_party/aom/aom_dsp/aom_dsp_common.h
third_party/aom/aom_dsp/aom_dsp_rtcd_defs.pl
third_party/aom/aom_dsp/aom_filter.h
third_party/aom/aom_dsp/aom_simd.h
third_party/aom/aom_dsp/aom_simd_inline.h
third_party/aom/aom_dsp/arm/blend_a64_mask_neon.c
third_party/aom/aom_dsp/arm/subpel_variance_neon.c
third_party/aom/aom_dsp/binary_codes_reader.c
third_party/aom/aom_dsp/binary_codes_reader.h
third_party/aom/aom_dsp/binary_codes_writer.c
third_party/aom/aom_dsp/binary_codes_writer.h
third_party/aom/aom_dsp/bitreader.h
third_party/aom/aom_dsp/bitreader_buffer.c
third_party/aom/aom_dsp/bitreader_buffer.h
third_party/aom/aom_dsp/bitwriter.h
third_party/aom/aom_dsp/bitwriter_buffer.c
third_party/aom/aom_dsp/bitwriter_buffer.h
third_party/aom/aom_dsp/blend.h
third_party/aom/aom_dsp/buf_ans.h
third_party/aom/aom_dsp/daalaboolreader.c
third_party/aom/aom_dsp/daalaboolreader.h
third_party/aom/aom_dsp/daalaboolwriter.h
third_party/aom/aom_dsp/entcode.h
third_party/aom/aom_dsp/entdec.c
third_party/aom/aom_dsp/entdec.h
third_party/aom/aom_dsp/entenc.c
third_party/aom/aom_dsp/entenc.h
third_party/aom/aom_dsp/fft_common.h
third_party/aom/aom_dsp/grain_synthesis.c
third_party/aom/aom_dsp/grain_synthesis.h
third_party/aom/aom_dsp/grain_table.h
third_party/aom/aom_dsp/intrapred_common.h
third_party/aom/aom_dsp/mips/aom_convolve_msa.h
third_party/aom/aom_dsp/mips/common_dspr2.h
third_party/aom/aom_dsp/mips/convolve2_horiz_dspr2.c
third_party/aom/aom_dsp/mips/convolve2_vert_dspr2.c
third_party/aom/aom_dsp/mips/convolve_common_dspr2.h
third_party/aom/aom_dsp/mips/loopfilter_filters_dspr2.h
third_party/aom/aom_dsp/mips/loopfilter_macros_dspr2.h
third_party/aom/aom_dsp/mips/loopfilter_masks_dspr2.h
third_party/aom/aom_dsp/mips/loopfilter_msa.h
third_party/aom/aom_dsp/mips/macros_msa.h
third_party/aom/aom_dsp/mips/sub_pixel_variance_msa.c
third_party/aom/aom_dsp/noise_model.c
third_party/aom/aom_dsp/noise_model.h
third_party/aom/aom_dsp/noise_util.h
third_party/aom/aom_dsp/postproc.h
third_party/aom/aom_dsp/prob.h
third_party/aom/aom_dsp/psnr.c
third_party/aom/aom_dsp/psnr.h
third_party/aom/aom_dsp/quantize.c
third_party/aom/aom_dsp/quantize.h
third_party/aom/aom_dsp/sad.c
third_party/aom/aom_dsp/simd/v128_intrinsics.h
third_party/aom/aom_dsp/simd/v128_intrinsics_arm.h
third_party/aom/aom_dsp/simd/v128_intrinsics_c.h
third_party/aom/aom_dsp/simd/v128_intrinsics_x86.h
third_party/aom/aom_dsp/simd/v256_intrinsics.h
third_party/aom/aom_dsp/simd/v256_intrinsics_arm.h
third_party/aom/aom_dsp/simd/v256_intrinsics_c.h
third_party/aom/aom_dsp/simd/v256_intrinsics_v128.h
third_party/aom/aom_dsp/simd/v256_intrinsics_x86.h
third_party/aom/aom_dsp/simd/v64_intrinsics.h
third_party/aom/aom_dsp/simd/v64_intrinsics_arm.h
third_party/aom/aom_dsp/simd/v64_intrinsics_c.h
third_party/aom/aom_dsp/simd/v64_intrinsics_x86.h
third_party/aom/aom_dsp/sse.c
third_party/aom/aom_dsp/ssim.c
third_party/aom/aom_dsp/ssim.h
third_party/aom/aom_dsp/txfm_common.h
third_party/aom/aom_dsp/variance.c
third_party/aom/aom_dsp/variance.h
third_party/aom/aom_dsp/x86/aom_asm_stubs.c
third_party/aom/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c
third_party/aom/aom_dsp/x86/aom_subpixel_8t_intrin_ssse3.c
third_party/aom/aom_dsp/x86/blend_a64_mask_avx2.c
third_party/aom/aom_dsp/x86/blend_a64_mask_sse4.c
third_party/aom/aom_dsp/x86/blend_a64_vmask_sse4.c
third_party/aom/aom_dsp/x86/blend_mask_sse4.h
third_party/aom/aom_dsp/x86/blend_sse4.h
third_party/aom/aom_dsp/x86/common_avx2.h
third_party/aom/aom_dsp/x86/convolve.h
third_party/aom/aom_dsp/x86/convolve_avx2.h
third_party/aom/aom_dsp/x86/convolve_common_intrin.h
third_party/aom/aom_dsp/x86/convolve_sse2.h
third_party/aom/aom_dsp/x86/convolve_sse4_1.h
third_party/aom/aom_dsp/x86/fwd_txfm_sse2.h
third_party/aom/aom_dsp/x86/halfpix_variance_impl_sse2.asm
third_party/aom/aom_dsp/x86/halfpix_variance_sse2.c
third_party/aom/aom_dsp/x86/highbd_loopfilter_sse2.c
third_party/aom/aom_dsp/x86/highbd_quantize_intrin_avx2.c
third_party/aom/aom_dsp/x86/highbd_quantize_intrin_sse2.c
third_party/aom/aom_dsp/x86/highbd_variance_avx2.c
third_party/aom/aom_dsp/x86/highbd_variance_sse2.c
third_party/aom/aom_dsp/x86/highbd_variance_sse4.c
third_party/aom/aom_dsp/x86/jnt_variance_ssse3.c
third_party/aom/aom_dsp/x86/loopfilter_avx2.c
third_party/aom/aom_dsp/x86/loopfilter_sse2.c
third_party/aom/aom_dsp/x86/lpf_common_sse2.h
third_party/aom/aom_dsp/x86/masked_sad_intrin_avx2.c
third_party/aom/aom_dsp/x86/masked_sad_intrin_ssse3.h
third_party/aom/aom_dsp/x86/masked_variance_intrin_ssse3.h
third_party/aom/aom_dsp/x86/mem_sse2.h
third_party/aom/aom_dsp/x86/obmc_intrinsic_sse4.h
third_party/aom/aom_dsp/x86/obmc_intrinsic_ssse3.h
third_party/aom/aom_dsp/x86/obmc_variance_avx2.c
third_party/aom/aom_dsp/x86/obmc_variance_sse4.c
third_party/aom/aom_dsp/x86/quantize_avx_x86_64.asm
third_party/aom/aom_dsp/x86/quantize_sse2.c
third_party/aom/aom_dsp/x86/quantize_ssse3_x86_64.asm
third_party/aom/aom_dsp/x86/quantize_x86.h
third_party/aom/aom_dsp/x86/sse_avx2.c
third_party/aom/aom_dsp/x86/sse_sse4.c
third_party/aom/aom_dsp/x86/sum_squares_avx2.c
third_party/aom/aom_dsp/x86/sum_squares_sse2.c
third_party/aom/aom_dsp/x86/sum_squares_sse2.h
third_party/aom/aom_dsp/x86/synonyms.h
third_party/aom/aom_dsp/x86/synonyms_avx2.h
third_party/aom/aom_dsp/x86/transpose_sse2.h
third_party/aom/aom_dsp/x86/txfm_common_avx2.h
third_party/aom/aom_dsp/x86/txfm_common_sse2.h
third_party/aom/aom_dsp/x86/variance_avx2.c
third_party/aom/aom_dsp/x86/variance_sse2.c
third_party/aom/aom_mem/aom_mem.h
third_party/aom/aom_mem/include/aom_mem_intrnl.h
third_party/aom/aom_ports/aom_once.h
third_party/aom/aom_ports/aom_timer.h
third_party/aom/aom_ports/arm.h
third_party/aom/aom_ports/arm_cpudetect.c
third_party/aom/aom_ports/bitops.h
third_party/aom/aom_ports/emmintrin_compat.h
third_party/aom/aom_ports/mem.h
third_party/aom/aom_ports/mem_ops.h
third_party/aom/aom_ports/mem_ops_aligned.h
third_party/aom/aom_ports/msvc.h
third_party/aom/aom_ports/ppc.h
third_party/aom/aom_ports/sanitizer.h
third_party/aom/aom_ports/system_state.h
third_party/aom/aom_ports/x86.h
third_party/aom/aom_scale/aom_scale.h
third_party/aom/aom_scale/generic/yv12config.c
third_party/aom/aom_scale/yv12config.h
third_party/aom/aom_util/aom_thread.h
third_party/aom/aom_util/debug_util.h
third_party/aom/aom_util/endian_inl.h
third_party/aom/apps/aomdec.c
third_party/aom/apps/aomenc.c
third_party/aom/apps/aomenc.h
third_party/aom/av1/av1.cmake
third_party/aom/av1/av1_cx_iface.c
third_party/aom/av1/av1_dx_iface.c
third_party/aom/av1/av1_iface_common.h
third_party/aom/av1/common/alloccommon.h
third_party/aom/av1/common/arm/av1_inv_txfm_neon.c
third_party/aom/av1/common/arm/av1_inv_txfm_neon.h
third_party/aom/av1/common/arm/blend_a64_hmask_neon.c
third_party/aom/av1/common/arm/blend_a64_vmask_neon.c
third_party/aom/av1/common/arm/cfl_neon.c
third_party/aom/av1/common/arm/convolve_neon.c
third_party/aom/av1/common/arm/convolve_neon.h
third_party/aom/av1/common/arm/jnt_convolve_neon.c
third_party/aom/av1/common/arm/mem_neon.h
third_party/aom/av1/common/arm/selfguided_neon.c
third_party/aom/av1/common/arm/transpose_neon.h
third_party/aom/av1/common/arm/warp_plane_neon.c
third_party/aom/av1/common/arm/wiener_convolve_neon.c
third_party/aom/av1/common/av1_inv_txfm1d.c
third_party/aom/av1/common/av1_inv_txfm1d.h
third_party/aom/av1/common/av1_inv_txfm1d_cfg.h
third_party/aom/av1/common/av1_loopfilter.c
third_party/aom/av1/common/av1_loopfilter.h
third_party/aom/av1/common/av1_rtcd_defs.pl
third_party/aom/av1/common/av1_txfm.c
third_party/aom/av1/common/av1_txfm.h
third_party/aom/av1/common/blockd.c
third_party/aom/av1/common/blockd.h
third_party/aom/av1/common/cdef.h
third_party/aom/av1/common/cdef_block.h
third_party/aom/av1/common/cdef_block_simd.h
third_party/aom/av1/common/cfl.h
third_party/aom/av1/common/common.h
third_party/aom/av1/common/common_data.h
third_party/aom/av1/common/convolve.c
third_party/aom/av1/common/convolve.h
third_party/aom/av1/common/entropy.h
third_party/aom/av1/common/entropymode.h
third_party/aom/av1/common/entropymv.c
third_party/aom/av1/common/entropymv.h
third_party/aom/av1/common/enums.h
third_party/aom/av1/common/filter.h
third_party/aom/av1/common/frame_buffers.c
third_party/aom/av1/common/frame_buffers.h
third_party/aom/av1/common/idct.c
third_party/aom/av1/common/idct.h
third_party/aom/av1/common/mv.h
third_party/aom/av1/common/mvref_common.c
third_party/aom/av1/common/mvref_common.h
third_party/aom/av1/common/obmc.h
third_party/aom/av1/common/obu_util.c
third_party/aom/av1/common/obu_util.h
third_party/aom/av1/common/odintrin.h
third_party/aom/av1/common/onyxc_int.h
third_party/aom/av1/common/ppc/cfl_ppc.c
third_party/aom/av1/common/pred_common.c
third_party/aom/av1/common/pred_common.h
third_party/aom/av1/common/quant_common.h
third_party/aom/av1/common/reconinter.c
third_party/aom/av1/common/reconinter.h
third_party/aom/av1/common/reconintra.h
third_party/aom/av1/common/resize.c
third_party/aom/av1/common/resize.h
third_party/aom/av1/common/restoration.c
third_party/aom/av1/common/restoration.h
third_party/aom/av1/common/scale.h
third_party/aom/av1/common/scan.h
third_party/aom/av1/common/seg_common.h
third_party/aom/av1/common/thread_common.c
third_party/aom/av1/common/thread_common.h
third_party/aom/av1/common/tile_common.c
third_party/aom/av1/common/tile_common.h
third_party/aom/av1/common/timing.h
third_party/aom/av1/common/token_cdfs.h
third_party/aom/av1/common/txb_common.h
third_party/aom/av1/common/warped_motion.c
third_party/aom/av1/common/warped_motion.h
third_party/aom/av1/common/x86/av1_convolve_scale_sse4.c
third_party/aom/av1/common/x86/av1_inv_txfm_avx2.c
third_party/aom/av1/common/x86/av1_inv_txfm_avx2.h
third_party/aom/av1/common/x86/av1_inv_txfm_ssse3.c
third_party/aom/av1/common/x86/av1_inv_txfm_ssse3.h
third_party/aom/av1/common/x86/av1_txfm_sse2.h
third_party/aom/av1/common/x86/av1_txfm_sse4.h
third_party/aom/av1/common/x86/cfl_simd.h
third_party/aom/av1/common/x86/convolve_2d_avx2.c
third_party/aom/av1/common/x86/convolve_2d_sse2.c
third_party/aom/av1/common/x86/convolve_sse2.c
third_party/aom/av1/common/x86/highbd_convolve_2d_avx2.c
third_party/aom/av1/common/x86/highbd_convolve_2d_sse4.c
third_party/aom/av1/common/x86/highbd_convolve_2d_ssse3.c
third_party/aom/av1/common/x86/highbd_inv_txfm_avx2.c
third_party/aom/av1/common/x86/highbd_inv_txfm_sse4.c
third_party/aom/av1/common/x86/highbd_jnt_convolve_avx2.c
third_party/aom/av1/common/x86/highbd_txfm_utility_sse4.h
third_party/aom/av1/common/x86/highbd_warp_plane_sse4.c
third_party/aom/av1/common/x86/jnt_convolve_avx2.c
third_party/aom/av1/common/x86/reconinter_avx2.c
third_party/aom/av1/common/x86/selfguided_avx2.c
third_party/aom/av1/common/x86/selfguided_sse4.c
third_party/aom/av1/common/x86/warp_plane_sse4.c
third_party/aom/av1/common/x86/wiener_convolve_avx2.c
third_party/aom/av1/common/x86/wiener_convolve_sse2.c
third_party/aom/av1/decoder/accounting.h
third_party/aom/av1/decoder/decodeframe.c
third_party/aom/av1/decoder/decodeframe.h
third_party/aom/av1/decoder/decodemv.c
third_party/aom/av1/decoder/decodemv.h
third_party/aom/av1/decoder/decoder.c
third_party/aom/av1/decoder/decoder.h
third_party/aom/av1/decoder/decodetxb.h
third_party/aom/av1/decoder/detokenize.h
third_party/aom/av1/decoder/dthread.h
third_party/aom/av1/decoder/inspection.h
third_party/aom/av1/decoder/obu.c
third_party/aom/av1/decoder/obu.h
third_party/aom/av1/encoder/aq_complexity.c
third_party/aom/av1/encoder/aq_complexity.h
third_party/aom/av1/encoder/aq_cyclicrefresh.c
third_party/aom/av1/encoder/aq_cyclicrefresh.h
third_party/aom/av1/encoder/aq_variance.c
third_party/aom/av1/encoder/aq_variance.h
third_party/aom/av1/encoder/av1_fwd_txfm1d.c
third_party/aom/av1/encoder/av1_fwd_txfm1d.h
third_party/aom/av1/encoder/av1_fwd_txfm1d_cfg.h
third_party/aom/av1/encoder/av1_quantize.c
third_party/aom/av1/encoder/av1_quantize.h
third_party/aom/av1/encoder/bitstream.c
third_party/aom/av1/encoder/bitstream.h
third_party/aom/av1/encoder/block.h
third_party/aom/av1/encoder/blockiness.c
third_party/aom/av1/encoder/context_tree.c
third_party/aom/av1/encoder/context_tree.h
third_party/aom/av1/encoder/corner_detect.h
third_party/aom/av1/encoder/corner_match.h
third_party/aom/av1/encoder/cost.h
third_party/aom/av1/encoder/dwt.h
third_party/aom/av1/encoder/encodeframe.c
third_party/aom/av1/encoder/encodeframe.h
third_party/aom/av1/encoder/encodemb.c
third_party/aom/av1/encoder/encodemb.h
third_party/aom/av1/encoder/encodemv.c
third_party/aom/av1/encoder/encodemv.h
third_party/aom/av1/encoder/encoder.c
third_party/aom/av1/encoder/encoder.h
third_party/aom/av1/encoder/encodetxb.c
third_party/aom/av1/encoder/encodetxb.h
third_party/aom/av1/encoder/ethread.c
third_party/aom/av1/encoder/ethread.h
third_party/aom/av1/encoder/extend.h
third_party/aom/av1/encoder/firstpass.c
third_party/aom/av1/encoder/firstpass.h
third_party/aom/av1/encoder/global_motion.c
third_party/aom/av1/encoder/global_motion.h
third_party/aom/av1/encoder/grain_test_vectors.h
third_party/aom/av1/encoder/hash.h
third_party/aom/av1/encoder/hash_motion.c
third_party/aom/av1/encoder/hash_motion.h
third_party/aom/av1/encoder/hybrid_fwd_txfm.c
third_party/aom/av1/encoder/hybrid_fwd_txfm.h
third_party/aom/av1/encoder/lookahead.h
third_party/aom/av1/encoder/mathutils.h
third_party/aom/av1/encoder/mbgraph.c
third_party/aom/av1/encoder/mbgraph.h
third_party/aom/av1/encoder/mcomp.c
third_party/aom/av1/encoder/mcomp.h
third_party/aom/av1/encoder/ml.c
third_party/aom/av1/encoder/ml.h
third_party/aom/av1/encoder/palette.h
third_party/aom/av1/encoder/partition_model_weights.h
third_party/aom/av1/encoder/picklpf.c
third_party/aom/av1/encoder/picklpf.h
third_party/aom/av1/encoder/pickrst.c
third_party/aom/av1/encoder/pickrst.h
third_party/aom/av1/encoder/pustats.h
third_party/aom/av1/encoder/random.h
third_party/aom/av1/encoder/ransac.h
third_party/aom/av1/encoder/rate_distortion_model_params.h
third_party/aom/av1/encoder/ratectrl.c
third_party/aom/av1/encoder/ratectrl.h
third_party/aom/av1/encoder/ratectrl_xiph.c
third_party/aom/av1/encoder/ratectrl_xiph.h
third_party/aom/av1/encoder/rd.c
third_party/aom/av1/encoder/rd.h
third_party/aom/av1/encoder/rdopt.c
third_party/aom/av1/encoder/rdopt.h
third_party/aom/av1/encoder/reconinter_enc.c
third_party/aom/av1/encoder/reconinter_enc.h
third_party/aom/av1/encoder/segmentation.h
third_party/aom/av1/encoder/speed_features.c
third_party/aom/av1/encoder/speed_features.h
third_party/aom/av1/encoder/temporal_filter.c
third_party/aom/av1/encoder/temporal_filter.h
third_party/aom/av1/encoder/tokenize.h
third_party/aom/av1/encoder/tx_prune_model_weights.h
third_party/aom/av1/encoder/x86/av1_fwd_txfm1d_sse4.c
third_party/aom/av1/encoder/x86/av1_fwd_txfm2d_sse4.c
third_party/aom/av1/encoder/x86/av1_fwd_txfm_avx2.h
third_party/aom/av1/encoder/x86/av1_fwd_txfm_sse2.h
third_party/aom/av1/encoder/x86/av1_txfm1d_sse4.h
third_party/aom/av1/encoder/x86/encodetxb_avx2.c
third_party/aom/av1/encoder/x86/encodetxb_sse4.c
third_party/aom/av1/encoder/x86/highbd_fwd_txfm_sse4.c
third_party/aom/av1/encoder/x86/pickrst_avx2.c
third_party/aom/av1/encoder/x86/pickrst_sse4.c
third_party/aom/av1/encoder/x86/wedge_utils_avx2.c
third_party/aom/av1/exports_com
third_party/aom/av1/exports_dec
third_party/aom/av1/exports_test
third_party/aom/build/cmake/aom_config_defaults.cmake
third_party/aom/build/cmake/aom_configure.cmake
third_party/aom/build/cmake/aom_experiment_deps.cmake
third_party/aom/build/cmake/aom_optimization.cmake
third_party/aom/build/cmake/exports.cmake
third_party/aom/build/cmake/exports_sources.cmake
third_party/aom/build/cmake/generate_aom_config_templates.cmake
third_party/aom/build/cmake/generate_exports.cmake
third_party/aom/build/cmake/ios-Info.plist
third_party/aom/build/cmake/iosbuild.sh
third_party/aom/build/cmake/rtcd.pl
third_party/aom/build/cmake/util.cmake
third_party/aom/build/cmake/version.pl
third_party/aom/build/make/ios-Info.plist
third_party/aom/build/make/iosbuild.sh
third_party/aom/build/make/rtcd.pl
third_party/aom/build/make/thumb.pm
third_party/aom/common/args.h
third_party/aom/common/av1_config.c
third_party/aom/common/av1_config.h
third_party/aom/common/ivfdec.h
third_party/aom/common/ivfenc.h
third_party/aom/common/md5_utils.h
third_party/aom/common/obudec.c
third_party/aom/common/obudec.h
third_party/aom/common/rawenc.c
third_party/aom/common/rawenc.h
third_party/aom/common/tools_common.h
third_party/aom/common/video_common.h
third_party/aom/common/video_reader.c
third_party/aom/common/video_reader.h
third_party/aom/common/video_writer.h
third_party/aom/common/warnings.h
third_party/aom/common/webmdec.h
third_party/aom/common/webmenc.h
third_party/aom/common/y4menc.c
third_party/aom/common/y4menc.h
third_party/aom/common/y4minput.c
third_party/aom/common/y4minput.h
third_party/aom/docs.cmake
third_party/aom/examples/aom_cx_set_ref.c
third_party/aom/examples/encoder_util.h
third_party/aom/examples/lightfield_bitstream_parsing.c
third_party/aom/examples/lightfield_decoder.c
third_party/aom/examples/lightfield_encoder.c
third_party/aom/examples/lightfield_tile_list_decoder.c
third_party/aom/examples/noise_model.c
third_party/aom/stats/aomstats.h
third_party/aom/stats/rate_hist.h
third_party/aom/test/acm_random.h
third_party/aom/test/av1_config_test.cc
third_party/aom/test/av1_convolve_2d_test_util.cc
third_party/aom/test/av1_convolve_2d_test_util.h
third_party/aom/test/av1_convolve_scale_test.cc
third_party/aom/test/av1_encoder_parms_get_to_decoder.cc
third_party/aom/test/av1_fwd_txfm2d_test.cc
third_party/aom/test/av1_highbd_iht_test.cc
third_party/aom/test/av1_round_shift_array_test.cc
third_party/aom/test/av1_txfm_test.h
third_party/aom/test/blend_a64_mask_test.cc
third_party/aom/test/blockd_test.cc
third_party/aom/test/boolcoder_test.cc
third_party/aom/test/clear_system_state.h
third_party/aom/test/codec_factory.h
third_party/aom/test/coding_path_sync.cc
third_party/aom/test/comp_avg_pred_test.cc
third_party/aom/test/comp_avg_pred_test.h
third_party/aom/test/comp_mask_variance_test.cc
third_party/aom/test/decode_api_test.cc
third_party/aom/test/decode_test_driver.h
third_party/aom/test/encode_api_test.cc
third_party/aom/test/encode_test_driver.cc
third_party/aom/test/encode_test_driver.h
third_party/aom/test/encodetxb_test.cc
third_party/aom/test/ethread_test.cc
third_party/aom/test/external_frame_buffer_test.cc
third_party/aom/test/fft_test.cc
third_party/aom/test/function_equivalence_test.h
third_party/aom/test/hiprec_convolve_test_util.h
third_party/aom/test/i420_video_source.h
third_party/aom/test/invalid_file_test.cc
third_party/aom/test/ivf_video_source.h
third_party/aom/test/log2_test.cc
third_party/aom/test/md5_helper.h
third_party/aom/test/obmc_variance_test.cc
third_party/aom/test/pickrst_test.cc
third_party/aom/test/quantize_func_test.cc
third_party/aom/test/reconinter_test.cc
third_party/aom/test/register_state_check.h
third_party/aom/test/sum_squares_test.cc
third_party/aom/test/test-data.sha1
third_party/aom/test/test.cmake
third_party/aom/test/test_data_util.cmake
third_party/aom/test/test_vector_test.cc
third_party/aom/test/test_vectors.cc
third_party/aom/test/test_vectors.h
third_party/aom/test/transform_test_base.h
third_party/aom/test/util.h
third_party/aom/test/variance_test.cc
third_party/aom/test/video_source.h
third_party/aom/test/warp_filter_test.cc
third_party/aom/test/warp_filter_test_util.cc
third_party/aom/test/warp_filter_test_util.h
third_party/aom/test/webm_video_source.h
third_party/aom/test/wiener_test.cc
third_party/aom/test/y4m_test.cc
third_party/aom/test/y4m_video_source.h
third_party/aom/test/yuv_video_source.h
third_party/aom/third_party/vector/LICENSE
third_party/aom/third_party/vector/README.libaom
third_party/aom/tools/obu_parser.cc
third_party/aom/tools/obu_parser.h
third_party/aom/tools/txfm_analyzer/txfm_graph.h
--- a/media/libaom/README_MOZILLA
+++ b/media/libaom/README_MOZILLA
@@ -17,9 +17,9 @@ To update to a specific upstream git tag
 The upstream git repository is https://aomedia.googlesource.com/aom
 
 To update to a fork, use
 
   ./mach vendor aom --repo <repository url> [-r <commit>]
 
 The last update was pulled from https://aomedia.googlesource.com/aom/
 
-The git commit ID used was b25610052a1398032320008d69b51d2da94f5928 (Mon Jul 23 18:08:58 2018 +0000).
+The git commit ID used was 1e227d41f0616de9548a673a83a21ef990b62591 (Tue Sep 18 17:30:35 2018 +0000).
--- a/media/libaom/config/generic/config/aom_config.asm
+++ b/media/libaom/config/generic/config/aom_config.asm
@@ -9,47 +9,53 @@
 ; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 ;
 
 ARCH_ARM equ 0
 ARCH_MIPS equ 0
 ARCH_PPC equ 0
 ARCH_X86 equ 0
 ARCH_X86_64 equ 0
+CONFIG_2PASS_PARTITION_SEARCH_LVL equ 1
 CONFIG_ACCOUNTING equ 0
 CONFIG_ANALYZER equ 0
 CONFIG_AV1_DECODER equ 1
 CONFIG_AV1_ENCODER equ 0
 CONFIG_BIG_ENDIAN equ 0
 CONFIG_BITSTREAM_DEBUG equ 0
 CONFIG_COEFFICIENT_RANGE_CHECKING equ 0
-CONFIG_COLLECT_INTER_MODE_RD_STATS equ 1
+CONFIG_COLLECT_INTER_MODE_RD_STATS equ 0
 CONFIG_COLLECT_RD_STATS equ 0
 CONFIG_DEBUG equ 0
-CONFIG_DENOISE equ 0
-CONFIG_DIST_8X8 equ 1
+CONFIG_DENOISE equ 1
+CONFIG_DIST_8X8 equ 0
 CONFIG_ENTROPY_STATS equ 0
 CONFIG_FILEOPTIONS equ 1
+CONFIG_FIX_GF_LENGTH equ 1
 CONFIG_FP_MB_STATS equ 0
 CONFIG_GCC equ 1
 CONFIG_GCOV equ 0
+CONFIG_GLOBAL_MOTION_SEARCH equ 1
 CONFIG_GPROF equ 0
 CONFIG_INSPECTION equ 0
 CONFIG_INTERNAL_STATS equ 0
 CONFIG_INTER_STATS_ONLY equ 0
 CONFIG_LIBYUV equ 0
-CONFIG_LOWBITDEPTH equ 0
+CONFIG_LOWBITDEPTH equ 1
+CONFIG_MAX_DECODE_PROFILE equ 2
 CONFIG_MISMATCH_DEBUG equ 0
-CONFIG_MSVS equ 0
 CONFIG_MULTITHREAD equ 1
+CONFIG_NORMAL_TILE_MODE equ 0
 CONFIG_OS_SUPPORT equ 1
 CONFIG_PIC equ 0
 CONFIG_RD_DEBUG equ 0
+CONFIG_REDUCED_ENCODER_BORDER equ 0
 CONFIG_RUNTIME_CPU_DETECT equ 1
 CONFIG_SHARED equ 0
+CONFIG_SHARP_SETTINGS equ 0
 CONFIG_SIZE_LIMIT equ 0
 CONFIG_SPATIAL_RESAMPLING equ 1
 CONFIG_STATIC equ 1
 CONFIG_WEBM_IO equ 0
 DECODE_HEIGHT_LIMIT equ 0
 DECODE_WIDTH_LIMIT equ 0
 HAVE_AVX equ 0
 HAVE_AVX2 equ 0
--- a/media/libaom/config/generic/config/aom_config.h
+++ b/media/libaom/config/generic/config/aom_config.h
@@ -11,47 +11,53 @@
 #ifndef AOM_CONFIG_H_
 #define AOM_CONFIG_H_
 
 #define ARCH_ARM 0
 #define ARCH_MIPS 0
 #define ARCH_PPC 0
 #define ARCH_X86 0
 #define ARCH_X86_64 0
+#define CONFIG_2PASS_PARTITION_SEARCH_LVL 1
 #define CONFIG_ACCOUNTING 0
 #define CONFIG_ANALYZER 0
 #define CONFIG_AV1_DECODER 1
 #define CONFIG_AV1_ENCODER 0
 #define CONFIG_BIG_ENDIAN 0
 #define CONFIG_BITSTREAM_DEBUG 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
-#define CONFIG_COLLECT_INTER_MODE_RD_STATS 1
+#define CONFIG_COLLECT_INTER_MODE_RD_STATS 0
 #define CONFIG_COLLECT_RD_STATS 0
 #define CONFIG_DEBUG 0
-#define CONFIG_DENOISE 0
-#define CONFIG_DIST_8X8 1
+#define CONFIG_DENOISE 1
+#define CONFIG_DIST_8X8 0
 #define CONFIG_ENTROPY_STATS 0
 #define CONFIG_FILEOPTIONS 1
+#define CONFIG_FIX_GF_LENGTH 1
 #define CONFIG_FP_MB_STATS 0
 #define CONFIG_GCC 1
 #define CONFIG_GCOV 0
+#define CONFIG_GLOBAL_MOTION_SEARCH 1
 #define CONFIG_GPROF 0
 #define CONFIG_INSPECTION 0
 #define CONFIG_INTERNAL_STATS 0
 #define CONFIG_INTER_STATS_ONLY 0
 #define CONFIG_LIBYUV 0
-#define CONFIG_LOWBITDEPTH 0
+#define CONFIG_LOWBITDEPTH 1
+#define CONFIG_MAX_DECODE_PROFILE 2
 #define CONFIG_MISMATCH_DEBUG 0
-#define CONFIG_MSVS 0
 #define CONFIG_MULTITHREAD 1
+#define CONFIG_NORMAL_TILE_MODE 0
 #define CONFIG_OS_SUPPORT 1
 #define CONFIG_PIC 0
 #define CONFIG_RD_DEBUG 0
+#define CONFIG_REDUCED_ENCODER_BORDER 0
 #define CONFIG_RUNTIME_CPU_DETECT 1
 #define CONFIG_SHARED 0
+#define CONFIG_SHARP_SETTINGS 0
 #define CONFIG_SIZE_LIMIT 0
 #define CONFIG_SPATIAL_RESAMPLING 1
 #define CONFIG_STATIC 1
 #define CONFIG_WEBM_IO 0
 #define DECODE_HEIGHT_LIMIT 0
 #define DECODE_WIDTH_LIMIT 0
 #define HAVE_AVX 0
 #define HAVE_AVX2 0
--- a/media/libaom/config/generic/config/av1_rtcd.h
+++ b/media/libaom/config/generic/config/av1_rtcd.h
@@ -1,11 +1,11 @@
 // This file is generated. Do not edit.
-#ifndef AOM_RTCD_H_
-#define AOM_RTCD_H_
+#ifndef AV1_RTCD_H_
+#define AV1_RTCD_H_
 
 #ifdef RTCD_C
 #define RTCD_EXTERN
 #else
 #define RTCD_EXTERN extern
 #endif
 
 /*
@@ -136,16 +136,37 @@ void av1_highbd_dr_prediction_z1_c(uint1
 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
 
 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
 
 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
 
+void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add av1_highbd_inv_txfm_add_c
+
+void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_16x16 av1_highbd_inv_txfm_add_16x16_c
+
+void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_16x8 av1_highbd_inv_txfm_add_16x8_c
+
+void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_32x32 av1_highbd_inv_txfm_add_32x32_c
+
+void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_4x4 av1_highbd_inv_txfm_add_4x4_c
+
+void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_8x16 av1_highbd_inv_txfm_add_8x16_c
+
+void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_8x8 av1_highbd_inv_txfm_add_8x8_c
+
 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
 
 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
 
 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
 #define av1_highbd_jnt_convolve_2d av1_highbd_jnt_convolve_2d_c
@@ -232,19 +253,19 @@ void av1_jnt_convolve_2d_copy_c(const ui
 #define av1_jnt_convolve_2d_copy av1_jnt_convolve_2d_copy_c
 
 void av1_jnt_convolve_x_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 #define av1_jnt_convolve_x av1_jnt_convolve_x_c
 
 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 #define av1_jnt_convolve_y av1_jnt_convolve_y_c
 
-void av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
 #define av1_selfguided_restoration av1_selfguided_restoration_c
 
 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
 #define av1_upsample_intra_edge av1_upsample_intra_edge_c
 
 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
 #define av1_upsample_intra_edge_high av1_upsample_intra_edge_high_c
 
@@ -288,17 +309,17 @@ cfl_predict_hbd_fn get_predict_hbd_fn_c(
 #define get_predict_hbd_fn get_predict_hbd_fn_c
 
 cfl_predict_lbd_fn get_predict_lbd_fn_c(TX_SIZE tx_size);
 #define get_predict_lbd_fn get_predict_lbd_fn_c
 
 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
 #define get_subtract_average_fn get_subtract_average_fn_c
 
-void aom_rtcd(void);
+void av1_rtcd(void);
 
 #include "config/aom_config.h"
 
 #ifdef RTCD_C
 static void setup_rtcd_internal(void)
 {
 }
 #endif
--- a/media/libaom/config/linux/arm/config/aom_config.asm
+++ b/media/libaom/config/linux/arm/config/aom_config.asm
@@ -9,47 +9,53 @@
 ; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 ;
 
 .equ ARCH_ARM, 1
 .equ ARCH_MIPS, 0
 .equ ARCH_PPC, 0
 .equ ARCH_X86, 0
 .equ ARCH_X86_64, 0
+.equ CONFIG_2PASS_PARTITION_SEARCH_LVL, 1
 .equ CONFIG_ACCOUNTING, 0
 .equ CONFIG_ANALYZER, 0
 .equ CONFIG_AV1_DECODER, 1
 .equ CONFIG_AV1_ENCODER, 0
 .equ CONFIG_BIG_ENDIAN, 0
 .equ CONFIG_BITSTREAM_DEBUG, 0
 .equ CONFIG_COEFFICIENT_RANGE_CHECKING, 0
-.equ CONFIG_COLLECT_INTER_MODE_RD_STATS, 1
+.equ CONFIG_COLLECT_INTER_MODE_RD_STATS, 0
 .equ CONFIG_COLLECT_RD_STATS, 0
 .equ CONFIG_DEBUG, 0
-.equ CONFIG_DENOISE, 0
-.equ CONFIG_DIST_8X8, 1
+.equ CONFIG_DENOISE, 1
+.equ CONFIG_DIST_8X8, 0
 .equ CONFIG_ENTROPY_STATS, 0
 .equ CONFIG_FILEOPTIONS, 1
+.equ CONFIG_FIX_GF_LENGTH, 1
 .equ CONFIG_FP_MB_STATS, 0
 .equ CONFIG_GCC, 1
 .equ CONFIG_GCOV, 0
+.equ CONFIG_GLOBAL_MOTION_SEARCH, 1
 .equ CONFIG_GPROF, 0
 .equ CONFIG_INSPECTION, 0
 .equ CONFIG_INTERNAL_STATS, 0
 .equ CONFIG_INTER_STATS_ONLY, 0
 .equ CONFIG_LIBYUV, 0
-.equ CONFIG_LOWBITDEPTH, 0
+.equ CONFIG_LOWBITDEPTH, 1
+.equ CONFIG_MAX_DECODE_PROFILE, 2
 .equ CONFIG_MISMATCH_DEBUG, 0
-.equ CONFIG_MSVS, 0
 .equ CONFIG_MULTITHREAD, 1
+.equ CONFIG_NORMAL_TILE_MODE, 0
 .equ CONFIG_OS_SUPPORT, 1
-.equ CONFIG_PIC, 0
+.equ CONFIG_PIC, 1
 .equ CONFIG_RD_DEBUG, 0
+.equ CONFIG_REDUCED_ENCODER_BORDER, 0
 .equ CONFIG_RUNTIME_CPU_DETECT, 1
 .equ CONFIG_SHARED, 0
+.equ CONFIG_SHARP_SETTINGS, 0
 .equ CONFIG_SIZE_LIMIT, 0
 .equ CONFIG_SPATIAL_RESAMPLING, 1
 .equ CONFIG_STATIC, 1
 .equ CONFIG_WEBM_IO, 0
 .equ DECODE_HEIGHT_LIMIT, 0
 .equ DECODE_WIDTH_LIMIT, 0
 .equ HAVE_AVX, 0
 .equ HAVE_AVX2, 0
--- a/media/libaom/config/linux/arm/config/aom_config.h
+++ b/media/libaom/config/linux/arm/config/aom_config.h
@@ -11,47 +11,53 @@
 #ifndef AOM_CONFIG_H_
 #define AOM_CONFIG_H_
 
 #define ARCH_ARM 1
 #define ARCH_MIPS 0
 #define ARCH_PPC 0
 #define ARCH_X86 0
 #define ARCH_X86_64 0
+#define CONFIG_2PASS_PARTITION_SEARCH_LVL 1
 #define CONFIG_ACCOUNTING 0
 #define CONFIG_ANALYZER 0
 #define CONFIG_AV1_DECODER 1
 #define CONFIG_AV1_ENCODER 0
 #define CONFIG_BIG_ENDIAN 0
 #define CONFIG_BITSTREAM_DEBUG 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
-#define CONFIG_COLLECT_INTER_MODE_RD_STATS 1
+#define CONFIG_COLLECT_INTER_MODE_RD_STATS 0
 #define CONFIG_COLLECT_RD_STATS 0
 #define CONFIG_DEBUG 0
-#define CONFIG_DENOISE 0
-#define CONFIG_DIST_8X8 1
+#define CONFIG_DENOISE 1
+#define CONFIG_DIST_8X8 0
 #define CONFIG_ENTROPY_STATS 0
 #define CONFIG_FILEOPTIONS 1
+#define CONFIG_FIX_GF_LENGTH 1
 #define CONFIG_FP_MB_STATS 0
 #define CONFIG_GCC 1
 #define CONFIG_GCOV 0
+#define CONFIG_GLOBAL_MOTION_SEARCH 1
 #define CONFIG_GPROF 0
 #define CONFIG_INSPECTION 0
 #define CONFIG_INTERNAL_STATS 0
 #define CONFIG_INTER_STATS_ONLY 0
 #define CONFIG_LIBYUV 0
-#define CONFIG_LOWBITDEPTH 0
+#define CONFIG_LOWBITDEPTH 1
+#define CONFIG_MAX_DECODE_PROFILE 2
 #define CONFIG_MISMATCH_DEBUG 0
-#define CONFIG_MSVS 0
 #define CONFIG_MULTITHREAD 1
+#define CONFIG_NORMAL_TILE_MODE 0
 #define CONFIG_OS_SUPPORT 1
-#define CONFIG_PIC 0
+#define CONFIG_PIC 1
 #define CONFIG_RD_DEBUG 0
+#define CONFIG_REDUCED_ENCODER_BORDER 0
 #define CONFIG_RUNTIME_CPU_DETECT 1
 #define CONFIG_SHARED 0
+#define CONFIG_SHARP_SETTINGS 0
 #define CONFIG_SIZE_LIMIT 0
 #define CONFIG_SPATIAL_RESAMPLING 1
 #define CONFIG_STATIC 1
 #define CONFIG_WEBM_IO 0
 #define DECODE_HEIGHT_LIMIT 0
 #define DECODE_WIDTH_LIMIT 0
 #define HAVE_AVX 0
 #define HAVE_AVX2 0
--- a/media/libaom/config/linux/arm/config/aom_dsp_rtcd.h
+++ b/media/libaom/config/linux/arm/config/aom_dsp_rtcd.h
@@ -1407,17 +1407,17 @@ RTCD_EXTERN void (*av1_round_shift_array
 void aom_dsp_rtcd(void);
 
 #include "config/aom_config.h"
 
 #ifdef RTCD_C
 #include "aom_ports/arm.h"
 static void setup_rtcd_internal(void)
 {
-    int flags = arm_cpu_caps();
+    int flags = aom_arm_cpu_caps();
 
     (void)flags;
 
     aom_blend_a64_hmask = aom_blend_a64_hmask_c;
     if (flags & HAS_NEON) aom_blend_a64_hmask = aom_blend_a64_hmask_neon;
     aom_blend_a64_vmask = aom_blend_a64_vmask_c;
     if (flags & HAS_NEON) aom_blend_a64_vmask = aom_blend_a64_vmask_neon;
     aom_dc_128_predictor_16x16 = aom_dc_128_predictor_16x16_c;
--- a/media/libaom/config/linux/arm/config/aom_scale_rtcd.h
+++ b/media/libaom/config/linux/arm/config/aom_scale_rtcd.h
@@ -71,17 +71,17 @@ void aom_yv12_partial_copy_y_c(const str
 void aom_scale_rtcd(void);
 
 #include "config/aom_config.h"
 
 #ifdef RTCD_C
 #include "aom_ports/arm.h"
 static void setup_rtcd_internal(void)
 {
-    int flags = arm_cpu_caps();
+    int flags = aom_arm_cpu_caps();
 
     (void)flags;
 
 }
 #endif
 
 #ifdef __cplusplus
 }  // extern "C"
--- a/media/libaom/config/linux/arm/config/av1_rtcd.h
+++ b/media/libaom/config/linux/arm/config/av1_rtcd.h
@@ -1,11 +1,11 @@
 // This file is generated. Do not edit.
-#ifndef AOM_RTCD_H_
-#define AOM_RTCD_H_
+#ifndef AV1_RTCD_H_
+#define AV1_RTCD_H_
 
 #ifdef RTCD_C
 #define RTCD_EXTERN
 #else
 #define RTCD_EXTERN extern
 #endif
 
 /*
@@ -142,16 +142,37 @@ void av1_highbd_dr_prediction_z1_c(uint1
 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
 
 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
 
 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
 
+void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add av1_highbd_inv_txfm_add_c
+
+void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_16x16 av1_highbd_inv_txfm_add_16x16_c
+
+void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_16x8 av1_highbd_inv_txfm_add_16x8_c
+
+void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_32x32 av1_highbd_inv_txfm_add_32x32_c
+
+void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_4x4 av1_highbd_inv_txfm_add_4x4_c
+
+void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_8x16 av1_highbd_inv_txfm_add_8x16_c
+
+void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+#define av1_highbd_inv_txfm_add_8x8 av1_highbd_inv_txfm_add_8x8_c
+
 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
 
 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
 
 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
 #define av1_highbd_jnt_convolve_2d av1_highbd_jnt_convolve_2d_c
@@ -243,34 +264,35 @@ RTCD_EXTERN void (*av1_jnt_convolve_2d_c
 void av1_jnt_convolve_x_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_x_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_x)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_y)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
-void av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_neon(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-RTCD_EXTERN void (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_neon(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+RTCD_EXTERN int (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
 
 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
 #define av1_upsample_intra_edge av1_upsample_intra_edge_c
 
 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
 #define av1_upsample_intra_edge_high av1_upsample_intra_edge_high_c
 
 void av1_warp_affine_c(const int32_t *mat, const uint8_t *ref, int width, int height, int stride, uint8_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
-#define av1_warp_affine av1_warp_affine_c
+void av1_warp_affine_neon(const int32_t *mat, const uint8_t *ref, int width, int height, int stride, uint8_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
+RTCD_EXTERN void (*av1_warp_affine)(const int32_t *mat, const uint8_t *ref, int width, int height, int stride, uint8_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
 
 void av1_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params);
 void av1_wiener_convolve_add_src_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_wiener_convolve_add_src)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params);
 
 void cdef_filter_block_c(uint8_t *dst8, uint16_t *dst16, int dstride, const uint16_t *in, int pri_strength, int sec_strength, int dir, int pri_damping, int sec_damping, int bsize, int max, int coeff_shift);
 void cdef_filter_block_neon(uint8_t *dst8, uint16_t *dst16, int dstride, const uint16_t *in, int pri_strength, int sec_strength, int dir, int pri_damping, int sec_damping, int bsize, int max, int coeff_shift);
 RTCD_EXTERN void (*cdef_filter_block)(uint8_t *dst8, uint16_t *dst16, int dstride, const uint16_t *in, int pri_strength, int sec_strength, int dir, int pri_damping, int sec_damping, int bsize, int max, int coeff_shift);
@@ -318,25 +340,25 @@ RTCD_EXTERN cfl_predict_hbd_fn (*get_pre
 cfl_predict_lbd_fn get_predict_lbd_fn_c(TX_SIZE tx_size);
 cfl_predict_lbd_fn get_predict_lbd_fn_neon(TX_SIZE tx_size);
 RTCD_EXTERN cfl_predict_lbd_fn (*get_predict_lbd_fn)(TX_SIZE tx_size);
 
 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_neon(TX_SIZE tx_size);
 RTCD_EXTERN cfl_subtract_average_fn (*get_subtract_average_fn)(TX_SIZE tx_size);
 
-void aom_rtcd(void);
+void av1_rtcd(void);
 
 #include "config/aom_config.h"
 
 #ifdef RTCD_C
 #include "aom_ports/arm.h"
 static void setup_rtcd_internal(void)
 {
-    int flags = arm_cpu_caps();
+    int flags = aom_arm_cpu_caps();
 
     (void)flags;
 
     apply_selfguided_restoration = apply_selfguided_restoration_c;
     if (flags & HAS_NEON) apply_selfguided_restoration = apply_selfguided_restoration_neon;
     av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_c;
     if (flags & HAS_NEON) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_neon;
     av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_c;
@@ -354,16 +376,18 @@ static void setup_rtcd_internal(void)
     av1_jnt_convolve_2d_copy = av1_jnt_convolve_2d_copy_c;
     if (flags & HAS_NEON) av1_jnt_convolve_2d_copy = av1_jnt_convolve_2d_copy_neon;
     av1_jnt_convolve_x = av1_jnt_convolve_x_c;
     if (flags & HAS_NEON) av1_jnt_convolve_x = av1_jnt_convolve_x_neon;
     av1_jnt_convolve_y = av1_jnt_convolve_y_c;
     if (flags & HAS_NEON) av1_jnt_convolve_y = av1_jnt_convolve_y_neon;
     av1_selfguided_restoration = av1_selfguided_restoration_c;
     if (flags & HAS_NEON) av1_selfguided_restoration = av1_selfguided_restoration_neon;
+    av1_warp_affine = av1_warp_affine_c;
+    if (flags & HAS_NEON) av1_warp_affine = av1_warp_affine_neon;
     av1_wiener_convolve_add_src = av1_wiener_convolve_add_src_c;
     if (flags & HAS_NEON) av1_wiener_convolve_add_src = av1_wiener_convolve_add_src_neon;
     cdef_filter_block = cdef_filter_block_c;
     if (flags & HAS_NEON) cdef_filter_block = cdef_filter_block_neon;
     cdef_find_dir = cdef_find_dir_c;
     if (flags & HAS_NEON) cdef_find_dir = cdef_find_dir_neon;
     cfl_get_luma_subsampling_420_hbd = cfl_get_luma_subsampling_420_hbd_c;
     if (flags & HAS_NEON) cfl_get_luma_subsampling_420_hbd = cfl_get_luma_subsampling_420_hbd_neon;
--- a/media/libaom/config/linux/ia32/config/aom_config.asm
+++ b/media/libaom/config/linux/ia32/config/aom_config.asm
@@ -9,47 +9,53 @@
 ; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 ;
 
 ARCH_ARM equ 0
 ARCH_MIPS equ 0
 ARCH_PPC equ 0
 ARCH_X86 equ 1
 ARCH_X86_64 equ 0
+CONFIG_2PASS_PARTITION_SEARCH_LVL equ 1
 CONFIG_ACCOUNTING equ 0
 CONFIG_ANALYZER equ 0
 CONFIG_AV1_DECODER equ 1
 CONFIG_AV1_ENCODER equ 0
 CONFIG_BIG_ENDIAN equ 0
 CONFIG_BITSTREAM_DEBUG equ 0
 CONFIG_COEFFICIENT_RANGE_CHECKING equ 0
-CONFIG_COLLECT_INTER_MODE_RD_STATS equ 1
+CONFIG_COLLECT_INTER_MODE_RD_STATS equ 0
 CONFIG_COLLECT_RD_STATS equ 0
 CONFIG_DEBUG equ 0
-CONFIG_DENOISE equ 0
-CONFIG_DIST_8X8 equ 1
+CONFIG_DENOISE equ 1
+CONFIG_DIST_8X8 equ 0
 CONFIG_ENTROPY_STATS equ 0
 CONFIG_FILEOPTIONS equ 1
+CONFIG_FIX_GF_LENGTH equ 1
 CONFIG_FP_MB_STATS equ 0
 CONFIG_GCC equ 1
 CONFIG_GCOV equ 0
+CONFIG_GLOBAL_MOTION_SEARCH equ 1
 CONFIG_GPROF equ 0
 CONFIG_INSPECTION equ 0
 CONFIG_INTERNAL_STATS equ 0
 CONFIG_INTER_STATS_ONLY equ 0
 CONFIG_LIBYUV equ 0
-CONFIG_LOWBITDEPTH equ 0
+CONFIG_LOWBITDEPTH equ 1
+CONFIG_MAX_DECODE_PROFILE equ 2
 CONFIG_MISMATCH_DEBUG equ 0
-CONFIG_MSVS equ 0
 CONFIG_MULTITHREAD equ 1
+CONFIG_NORMAL_TILE_MODE equ 0
 CONFIG_OS_SUPPORT equ 1
 CONFIG_PIC equ 1
 CONFIG_RD_DEBUG equ 0
+CONFIG_REDUCED_ENCODER_BORDER equ 0
 CONFIG_RUNTIME_CPU_DETECT equ 1
 CONFIG_SHARED equ 0
+CONFIG_SHARP_SETTINGS equ 0
 CONFIG_SIZE_LIMIT equ 0
 CONFIG_SPATIAL_RESAMPLING equ 1
 CONFIG_STATIC equ 1
 CONFIG_WEBM_IO equ 0
 DECODE_HEIGHT_LIMIT equ 0
 DECODE_WIDTH_LIMIT equ 0
 HAVE_AVX equ 1
 HAVE_AVX2 equ 1
--- a/media/libaom/config/linux/ia32/config/aom_config.h
+++ b/media/libaom/config/linux/ia32/config/aom_config.h
@@ -11,47 +11,53 @@
 #ifndef AOM_CONFIG_H_
 #define AOM_CONFIG_H_
 
 #define ARCH_ARM 0
 #define ARCH_MIPS 0
 #define ARCH_PPC 0
 #define ARCH_X86 1
 #define ARCH_X86_64 0
+#define CONFIG_2PASS_PARTITION_SEARCH_LVL 1
 #define CONFIG_ACCOUNTING 0
 #define CONFIG_ANALYZER 0
 #define CONFIG_AV1_DECODER 1
 #define CONFIG_AV1_ENCODER 0
 #define CONFIG_BIG_ENDIAN 0
 #define CONFIG_BITSTREAM_DEBUG 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
-#define CONFIG_COLLECT_INTER_MODE_RD_STATS 1
+#define CONFIG_COLLECT_INTER_MODE_RD_STATS 0
 #define CONFIG_COLLECT_RD_STATS 0
 #define CONFIG_DEBUG 0
-#define CONFIG_DENOISE 0
-#define CONFIG_DIST_8X8 1
+#define CONFIG_DENOISE 1
+#define CONFIG_DIST_8X8 0
 #define CONFIG_ENTROPY_STATS 0
 #define CONFIG_FILEOPTIONS 1
+#define CONFIG_FIX_GF_LENGTH 1
 #define CONFIG_FP_MB_STATS 0
 #define CONFIG_GCC 1
 #define CONFIG_GCOV 0
+#define CONFIG_GLOBAL_MOTION_SEARCH 1
 #define CONFIG_GPROF 0
 #define CONFIG_INSPECTION 0
 #define CONFIG_INTERNAL_STATS 0
 #define CONFIG_INTER_STATS_ONLY 0
 #define CONFIG_LIBYUV 0
-#define CONFIG_LOWBITDEPTH 0
+#define CONFIG_LOWBITDEPTH 1
+#define CONFIG_MAX_DECODE_PROFILE 2
 #define CONFIG_MISMATCH_DEBUG 0
-#define CONFIG_MSVS 0
 #define CONFIG_MULTITHREAD 1
+#define CONFIG_NORMAL_TILE_MODE 0
 #define CONFIG_OS_SUPPORT 1
 #define CONFIG_PIC 1
 #define CONFIG_RD_DEBUG 0
+#define CONFIG_REDUCED_ENCODER_BORDER 0
 #define CONFIG_RUNTIME_CPU_DETECT 1
 #define CONFIG_SHARED 0
+#define CONFIG_SHARP_SETTINGS 0
 #define CONFIG_SIZE_LIMIT 0
 #define CONFIG_SPATIAL_RESAMPLING 1
 #define CONFIG_STATIC 1
 #define CONFIG_WEBM_IO 0
 #define DECODE_HEIGHT_LIMIT 0
 #define DECODE_WIDTH_LIMIT 0
 #define HAVE_AVX 1
 #define HAVE_AVX2 1
--- a/media/libaom/config/linux/ia32/config/aom_dsp_rtcd.h
+++ b/media/libaom/config/linux/ia32/config/aom_dsp_rtcd.h
@@ -23,16 +23,17 @@ extern "C" {
 #endif
 
 void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_hmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_hmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
+void aom_blend_a64_mask_avx2(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 RTCD_EXTERN void (*aom_blend_a64_mask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 
 void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_vmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_vmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
 void aom_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
@@ -1225,16 +1226,17 @@ void aom_highbd_v_predictor_8x4_sse2(uin
 RTCD_EXTERN void (*aom_highbd_v_predictor_8x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 
 void aom_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 void aom_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 RTCD_EXTERN void (*aom_highbd_v_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 
 void aom_lowbd_blend_a64_d16_mask_c(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 void aom_lowbd_blend_a64_d16_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
+void aom_lowbd_blend_a64_d16_mask_avx2(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 RTCD_EXTERN void (*aom_lowbd_blend_a64_d16_mask)(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 
 void aom_lpf_horizontal_14_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 void aom_lpf_horizontal_14_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 RTCD_EXTERN void (*aom_lpf_horizontal_14)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 
 void aom_lpf_horizontal_14_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
 void aom_lpf_horizontal_14_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
@@ -1720,16 +1722,17 @@ static void setup_rtcd_internal(void)
     int flags = x86_simd_caps();
 
     (void)flags;
 
     aom_blend_a64_hmask = aom_blend_a64_hmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_hmask = aom_blend_a64_hmask_sse4_1;
     aom_blend_a64_mask = aom_blend_a64_mask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_mask = aom_blend_a64_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_blend_a64_mask = aom_blend_a64_mask_avx2;
     aom_blend_a64_vmask = aom_blend_a64_vmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_vmask = aom_blend_a64_vmask_sse4_1;
     aom_convolve8_horiz = aom_convolve8_horiz_c;
     if (flags & HAS_SSE2) aom_convolve8_horiz = aom_convolve8_horiz_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_horiz = aom_convolve8_horiz_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_horiz = aom_convolve8_horiz_avx2;
     aom_convolve8_vert = aom_convolve8_vert_c;
     if (flags & HAS_SSE2) aom_convolve8_vert = aom_convolve8_vert_sse2;
@@ -2120,16 +2123,17 @@ static void setup_rtcd_internal(void)
     aom_highbd_v_predictor_8x16 = aom_highbd_v_predictor_8x16_c;
     if (flags & HAS_SSE2) aom_highbd_v_predictor_8x16 = aom_highbd_v_predictor_8x16_sse2;
     aom_highbd_v_predictor_8x4 = aom_highbd_v_predictor_8x4_c;
     if (flags & HAS_SSE2) aom_highbd_v_predictor_8x4 = aom_highbd_v_predictor_8x4_sse2;
     aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_c;
     if (flags & HAS_SSE2) aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_sse2;
     aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_c;
     if (flags & HAS_SSE4_1) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_avx2;
     aom_lpf_horizontal_14 = aom_lpf_horizontal_14_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_14 = aom_lpf_horizontal_14_sse2;
     aom_lpf_horizontal_14_dual = aom_lpf_horizontal_14_dual_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_14_dual = aom_lpf_horizontal_14_dual_sse2;
     aom_lpf_horizontal_4 = aom_lpf_horizontal_4_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_4 = aom_lpf_horizontal_4_sse2;
     aom_lpf_horizontal_4_dual = aom_lpf_horizontal_4_dual_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_4_dual = aom_lpf_horizontal_4_dual_sse2;
--- a/media/libaom/config/linux/ia32/config/av1_rtcd.h
+++ b/media/libaom/config/linux/ia32/config/av1_rtcd.h
@@ -1,11 +1,11 @@
 // This file is generated. Do not edit.
-#ifndef AOM_RTCD_H_
-#define AOM_RTCD_H_
+#ifndef AV1_RTCD_H_
+#define AV1_RTCD_H_
 
 #ifdef RTCD_C
 #define RTCD_EXTERN
 #else
 #define RTCD_EXTERN extern
 #endif
 
 /*
@@ -53,20 +53,22 @@ extern "C" {
 
 void apply_selfguided_restoration_c(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_sse4_1(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_avx2(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 RTCD_EXTERN void (*apply_selfguided_restoration)(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 
 void av1_build_compound_diffwtd_mask_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 void av1_build_compound_diffwtd_mask_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
+void av1_build_compound_diffwtd_mask_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 
 void av1_build_compound_diffwtd_mask_d16_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 void av1_build_compound_diffwtd_mask_d16_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
+void av1_build_compound_diffwtd_mask_d16_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_d16)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 
 void av1_build_compound_diffwtd_mask_highbd_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_ssse3(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_highbd)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 
 void av1_convolve_2d_copy_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
@@ -165,16 +167,46 @@ void av1_highbd_dr_prediction_z1_c(uint1
 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
 
 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
 
 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
 
+void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_32x32)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_4x4_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_4x4)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
 
 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
 
 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
 void av1_highbd_jnt_convolve_2d_sse4_1(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
@@ -201,18 +233,17 @@ void av1_highbd_warp_affine_sse4_1(const
 RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t *mat, const uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
 
 void av1_highbd_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 RTCD_EXTERN void (*av1_highbd_wiener_convolve_add_src)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 
 void av1_inv_txfm2d_add_16x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_16x16_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_16x16)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_16x16 av1_inv_txfm2d_add_16x16_c
 
 void av1_inv_txfm2d_add_16x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x32 av1_inv_txfm2d_add_16x32_c
 
 void av1_inv_txfm2d_add_16x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x4 av1_inv_txfm2d_add_16x4_c
 
 void av1_inv_txfm2d_add_16x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -220,18 +251,17 @@ void av1_inv_txfm2d_add_16x64_c(const in
 
 void av1_inv_txfm2d_add_16x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x8 av1_inv_txfm2d_add_16x8_c
 
 void av1_inv_txfm2d_add_32x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x16 av1_inv_txfm2d_add_32x16_c
 
 void av1_inv_txfm2d_add_32x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_32x32_avx2(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_32x32)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_32x32 av1_inv_txfm2d_add_32x32_c
 
 void av1_inv_txfm2d_add_32x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x64 av1_inv_txfm2d_add_32x64_c
 
 void av1_inv_txfm2d_add_32x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x8 av1_inv_txfm2d_add_32x8_c
 
 void av1_inv_txfm2d_add_4x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -246,18 +276,17 @@ void av1_inv_txfm2d_add_4x8_c(const int3
 
 void av1_inv_txfm2d_add_64x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x16 av1_inv_txfm2d_add_64x16_c
 
 void av1_inv_txfm2d_add_64x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x32 av1_inv_txfm2d_add_64x32_c
 
 void av1_inv_txfm2d_add_64x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_64x64_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_64x64)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_64x64 av1_inv_txfm2d_add_64x64_c
 
 void av1_inv_txfm2d_add_8x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x16 av1_inv_txfm2d_add_8x16_c
 
 void av1_inv_txfm2d_add_8x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x32 av1_inv_txfm2d_add_8x32_c
 
 void av1_inv_txfm2d_add_8x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -287,28 +316,28 @@ void av1_jnt_convolve_x_sse2(const uint8
 void av1_jnt_convolve_x_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_x)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_y)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
-void av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-RTCD_EXTERN void (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+RTCD_EXTERN int (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
 
 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
 void av1_upsample_intra_edge_sse4_1(uint8_t *p, int sz);
 RTCD_EXTERN void (*av1_upsample_intra_edge)(uint8_t *p, int sz);
 
 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
 void av1_upsample_intra_edge_high_sse4_1(uint16_t *p, int sz, int bd);
 RTCD_EXTERN void (*av1_upsample_intra_edge_high)(uint16_t *p, int sz, int bd);
@@ -390,33 +419,35 @@ cfl_predict_lbd_fn get_predict_lbd_fn_ss
 cfl_predict_lbd_fn get_predict_lbd_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_predict_lbd_fn (*get_predict_lbd_fn)(TX_SIZE tx_size);
 
 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_sse2(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_subtract_average_fn (*get_subtract_average_fn)(TX_SIZE tx_size);
 
-void aom_rtcd(void);
+void av1_rtcd(void);
 
 #ifdef RTCD_C
 #include "aom_ports/x86.h"
 static void setup_rtcd_internal(void)
 {
     int flags = x86_simd_caps();
 
     (void)flags;
 
     apply_selfguided_restoration = apply_selfguided_restoration_c;
     if (flags & HAS_SSE4_1) apply_selfguided_restoration = apply_selfguided_restoration_sse4_1;
     if (flags & HAS_AVX2) apply_selfguided_restoration = apply_selfguided_restoration_avx2;
     av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_avx2;
     av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_avx2;
     av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_c;
     if (flags & HAS_SSSE3) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_ssse3;
     if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_avx2;
     av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_c;
     if (flags & HAS_SSE2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_sse2;
     if (flags & HAS_AVX2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_avx2;
     av1_convolve_2d_scale = av1_convolve_2d_scale_c;
     if (flags & HAS_SSE4_1) av1_convolve_2d_scale = av1_convolve_2d_scale_sse4_1;
@@ -448,16 +479,32 @@ static void setup_rtcd_internal(void)
     av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_c;
     if (flags & HAS_SSE4_1) av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_sse4_1;
     av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_avx2;
     av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_avx2;
+    av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_avx2;
+    av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_sse4_1;
+    av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_sse4_1;
+    av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_avx2;
+    av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_sse4_1;
+    av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_sse4_1;
+    av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_sse4_1;
     av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_avx2;
     av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_avx2;
     av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_sse4_1;
@@ -465,24 +512,18 @@ static void setup_rtcd_internal(void)
     av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_avx2;
     av1_highbd_warp_affine = av1_highbd_warp_affine_c;
     if (flags & HAS_SSE4_1) av1_highbd_warp_affine = av1_highbd_warp_affine_sse4_1;
     av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_c;
     if (flags & HAS_SSSE3) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_ssse3;
     if (flags & HAS_AVX2) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_avx2;
-    av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_sse4_1;
-    av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_c;
-    if (flags & HAS_AVX2) av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_avx2;
     av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_sse4_1;
-    av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_sse4_1;
     av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_sse4_1;
     av1_inv_txfm_add = av1_inv_txfm_add_c;
     if (flags & HAS_SSSE3) av1_inv_txfm_add = av1_inv_txfm_add_ssse3;
     if (flags & HAS_AVX2) av1_inv_txfm_add = av1_inv_txfm_add_avx2;
     av1_jnt_convolve_2d = av1_jnt_convolve_2d_c;
     if (flags & HAS_SSSE3) av1_jnt_convolve_2d = av1_jnt_convolve_2d_ssse3;
     if (flags & HAS_AVX2) av1_jnt_convolve_2d = av1_jnt_convolve_2d_avx2;
--- a/media/libaom/config/linux/x64/config/aom_config.asm
+++ b/media/libaom/config/linux/x64/config/aom_config.asm
@@ -9,47 +9,53 @@
 ; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 ;
 
 ARCH_ARM equ 0
 ARCH_MIPS equ 0
 ARCH_PPC equ 0
 ARCH_X86 equ 0
 ARCH_X86_64 equ 1
+CONFIG_2PASS_PARTITION_SEARCH_LVL equ 1
 CONFIG_ACCOUNTING equ 0
 CONFIG_ANALYZER equ 0
 CONFIG_AV1_DECODER equ 1
 CONFIG_AV1_ENCODER equ 0
 CONFIG_BIG_ENDIAN equ 0
 CONFIG_BITSTREAM_DEBUG equ 0
 CONFIG_COEFFICIENT_RANGE_CHECKING equ 0
-CONFIG_COLLECT_INTER_MODE_RD_STATS equ 1
+CONFIG_COLLECT_INTER_MODE_RD_STATS equ 0
 CONFIG_COLLECT_RD_STATS equ 0
 CONFIG_DEBUG equ 0
-CONFIG_DENOISE equ 0
-CONFIG_DIST_8X8 equ 1
+CONFIG_DENOISE equ 1
+CONFIG_DIST_8X8 equ 0
 CONFIG_ENTROPY_STATS equ 0
 CONFIG_FILEOPTIONS equ 1
+CONFIG_FIX_GF_LENGTH equ 1
 CONFIG_FP_MB_STATS equ 0
 CONFIG_GCC equ 1
 CONFIG_GCOV equ 0
+CONFIG_GLOBAL_MOTION_SEARCH equ 1
 CONFIG_GPROF equ 0
 CONFIG_INSPECTION equ 0
 CONFIG_INTERNAL_STATS equ 0
 CONFIG_INTER_STATS_ONLY equ 0
 CONFIG_LIBYUV equ 0
-CONFIG_LOWBITDEPTH equ 0
+CONFIG_LOWBITDEPTH equ 1
+CONFIG_MAX_DECODE_PROFILE equ 2
 CONFIG_MISMATCH_DEBUG equ 0
-CONFIG_MSVS equ 0
 CONFIG_MULTITHREAD equ 1
+CONFIG_NORMAL_TILE_MODE equ 0
 CONFIG_OS_SUPPORT equ 1
 CONFIG_PIC equ 0
 CONFIG_RD_DEBUG equ 0
+CONFIG_REDUCED_ENCODER_BORDER equ 0
 CONFIG_RUNTIME_CPU_DETECT equ 1
 CONFIG_SHARED equ 0
+CONFIG_SHARP_SETTINGS equ 0
 CONFIG_SIZE_LIMIT equ 0
 CONFIG_SPATIAL_RESAMPLING equ 1
 CONFIG_STATIC equ 1
 CONFIG_WEBM_IO equ 0
 DECODE_HEIGHT_LIMIT equ 0
 DECODE_WIDTH_LIMIT equ 0
 HAVE_AVX equ 1
 HAVE_AVX2 equ 1
--- a/media/libaom/config/linux/x64/config/aom_config.h
+++ b/media/libaom/config/linux/x64/config/aom_config.h
@@ -11,47 +11,53 @@
 #ifndef AOM_CONFIG_H_
 #define AOM_CONFIG_H_
 
 #define ARCH_ARM 0
 #define ARCH_MIPS 0
 #define ARCH_PPC 0
 #define ARCH_X86 0
 #define ARCH_X86_64 1
+#define CONFIG_2PASS_PARTITION_SEARCH_LVL 1
 #define CONFIG_ACCOUNTING 0
 #define CONFIG_ANALYZER 0
 #define CONFIG_AV1_DECODER 1
 #define CONFIG_AV1_ENCODER 0
 #define CONFIG_BIG_ENDIAN 0
 #define CONFIG_BITSTREAM_DEBUG 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
-#define CONFIG_COLLECT_INTER_MODE_RD_STATS 1
+#define CONFIG_COLLECT_INTER_MODE_RD_STATS 0
 #define CONFIG_COLLECT_RD_STATS 0
 #define CONFIG_DEBUG 0
-#define CONFIG_DENOISE 0
-#define CONFIG_DIST_8X8 1
+#define CONFIG_DENOISE 1
+#define CONFIG_DIST_8X8 0
 #define CONFIG_ENTROPY_STATS 0
 #define CONFIG_FILEOPTIONS 1
+#define CONFIG_FIX_GF_LENGTH 1
 #define CONFIG_FP_MB_STATS 0
 #define CONFIG_GCC 1
 #define CONFIG_GCOV 0
+#define CONFIG_GLOBAL_MOTION_SEARCH 1
 #define CONFIG_GPROF 0
 #define CONFIG_INSPECTION 0
 #define CONFIG_INTERNAL_STATS 0
 #define CONFIG_INTER_STATS_ONLY 0
 #define CONFIG_LIBYUV 0
-#define CONFIG_LOWBITDEPTH 0
+#define CONFIG_LOWBITDEPTH 1
+#define CONFIG_MAX_DECODE_PROFILE 2
 #define CONFIG_MISMATCH_DEBUG 0
-#define CONFIG_MSVS 0
 #define CONFIG_MULTITHREAD 1
+#define CONFIG_NORMAL_TILE_MODE 0
 #define CONFIG_OS_SUPPORT 1
 #define CONFIG_PIC 0
 #define CONFIG_RD_DEBUG 0
+#define CONFIG_REDUCED_ENCODER_BORDER 0
 #define CONFIG_RUNTIME_CPU_DETECT 1
 #define CONFIG_SHARED 0
+#define CONFIG_SHARP_SETTINGS 0
 #define CONFIG_SIZE_LIMIT 0
 #define CONFIG_SPATIAL_RESAMPLING 1
 #define CONFIG_STATIC 1
 #define CONFIG_WEBM_IO 0
 #define DECODE_HEIGHT_LIMIT 0
 #define DECODE_WIDTH_LIMIT 0
 #define HAVE_AVX 1
 #define HAVE_AVX2 1
--- a/media/libaom/config/linux/x64/config/aom_dsp_rtcd.h
+++ b/media/libaom/config/linux/x64/config/aom_dsp_rtcd.h
@@ -23,16 +23,17 @@ extern "C" {
 #endif
 
 void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_hmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_hmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
+void aom_blend_a64_mask_avx2(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 RTCD_EXTERN void (*aom_blend_a64_mask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 
 void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_vmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_vmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
 void aom_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
@@ -1227,16 +1228,17 @@ void aom_highbd_v_predictor_8x4_sse2(uin
 #define aom_highbd_v_predictor_8x4 aom_highbd_v_predictor_8x4_sse2
 
 void aom_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 void aom_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 #define aom_highbd_v_predictor_8x8 aom_highbd_v_predictor_8x8_sse2
 
 void aom_lowbd_blend_a64_d16_mask_c(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 void aom_lowbd_blend_a64_d16_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
+void aom_lowbd_blend_a64_d16_mask_avx2(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 RTCD_EXTERN void (*aom_lowbd_blend_a64_d16_mask)(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 
 void aom_lpf_horizontal_14_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 void aom_lpf_horizontal_14_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 #define aom_lpf_horizontal_14 aom_lpf_horizontal_14_sse2
 
 void aom_lpf_horizontal_14_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
 void aom_lpf_horizontal_14_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
@@ -1722,16 +1724,17 @@ static void setup_rtcd_internal(void)
     int flags = x86_simd_caps();
 
     (void)flags;
 
     aom_blend_a64_hmask = aom_blend_a64_hmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_hmask = aom_blend_a64_hmask_sse4_1;
     aom_blend_a64_mask = aom_blend_a64_mask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_mask = aom_blend_a64_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_blend_a64_mask = aom_blend_a64_mask_avx2;
     aom_blend_a64_vmask = aom_blend_a64_vmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_vmask = aom_blend_a64_vmask_sse4_1;
     aom_convolve8_horiz = aom_convolve8_horiz_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_horiz = aom_convolve8_horiz_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_horiz = aom_convolve8_horiz_avx2;
     aom_convolve8_vert = aom_convolve8_vert_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_vert = aom_convolve8_vert_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_vert = aom_convolve8_vert_avx2;
@@ -1806,16 +1809,17 @@ static void setup_rtcd_internal(void)
     aom_highbd_lpf_vertical_14_dual = aom_highbd_lpf_vertical_14_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_14_dual = aom_highbd_lpf_vertical_14_dual_avx2;
     aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_avx2;
     aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_avx2;
     aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_c;
     if (flags & HAS_SSE4_1) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_avx2;
     aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_ssse3;
     if (flags & HAS_AVX2) aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_avx2;
     aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_ssse3;
     if (flags & HAS_AVX2) aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_avx2;
     aom_paeth_predictor_16x4 = aom_paeth_predictor_16x4_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x4 = aom_paeth_predictor_16x4_ssse3;
--- a/media/libaom/config/linux/x64/config/av1_rtcd.h
+++ b/media/libaom/config/linux/x64/config/av1_rtcd.h
@@ -1,11 +1,11 @@
 // This file is generated. Do not edit.
-#ifndef AOM_RTCD_H_
-#define AOM_RTCD_H_
+#ifndef AV1_RTCD_H_
+#define AV1_RTCD_H_
 
 #ifdef RTCD_C
 #define RTCD_EXTERN
 #else
 #define RTCD_EXTERN extern
 #endif
 
 /*
@@ -53,20 +53,22 @@ extern "C" {
 
 void apply_selfguided_restoration_c(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_sse4_1(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_avx2(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 RTCD_EXTERN void (*apply_selfguided_restoration)(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 
 void av1_build_compound_diffwtd_mask_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 void av1_build_compound_diffwtd_mask_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
+void av1_build_compound_diffwtd_mask_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 
 void av1_build_compound_diffwtd_mask_d16_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 void av1_build_compound_diffwtd_mask_d16_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
+void av1_build_compound_diffwtd_mask_d16_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_d16)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 
 void av1_build_compound_diffwtd_mask_highbd_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_ssse3(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_highbd)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 
 void av1_convolve_2d_copy_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
@@ -168,16 +170,46 @@ void av1_highbd_dr_prediction_z1_c(uint1
 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
 
 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
 
 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
 
+void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_32x32)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_4x4_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_4x4)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
 
 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
 
 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
 void av1_highbd_jnt_convolve_2d_sse4_1(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
@@ -204,18 +236,17 @@ void av1_highbd_warp_affine_sse4_1(const
 RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t *mat, const uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
 
 void av1_highbd_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 RTCD_EXTERN void (*av1_highbd_wiener_convolve_add_src)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 
 void av1_inv_txfm2d_add_16x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_16x16_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_16x16)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_16x16 av1_inv_txfm2d_add_16x16_c
 
 void av1_inv_txfm2d_add_16x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x32 av1_inv_txfm2d_add_16x32_c
 
 void av1_inv_txfm2d_add_16x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x4 av1_inv_txfm2d_add_16x4_c
 
 void av1_inv_txfm2d_add_16x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -223,18 +254,17 @@ void av1_inv_txfm2d_add_16x64_c(const in
 
 void av1_inv_txfm2d_add_16x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x8 av1_inv_txfm2d_add_16x8_c
 
 void av1_inv_txfm2d_add_32x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x16 av1_inv_txfm2d_add_32x16_c
 
 void av1_inv_txfm2d_add_32x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_32x32_avx2(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_32x32)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_32x32 av1_inv_txfm2d_add_32x32_c
 
 void av1_inv_txfm2d_add_32x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x64 av1_inv_txfm2d_add_32x64_c
 
 void av1_inv_txfm2d_add_32x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x8 av1_inv_txfm2d_add_32x8_c
 
 void av1_inv_txfm2d_add_4x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -249,18 +279,17 @@ void av1_inv_txfm2d_add_4x8_c(const int3
 
 void av1_inv_txfm2d_add_64x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x16 av1_inv_txfm2d_add_64x16_c
 
 void av1_inv_txfm2d_add_64x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x32 av1_inv_txfm2d_add_64x32_c
 
 void av1_inv_txfm2d_add_64x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_64x64_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_64x64)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_64x64 av1_inv_txfm2d_add_64x64_c
 
 void av1_inv_txfm2d_add_8x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x16 av1_inv_txfm2d_add_8x16_c
 
 void av1_inv_txfm2d_add_8x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x32 av1_inv_txfm2d_add_8x32_c
 
 void av1_inv_txfm2d_add_8x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -290,28 +319,28 @@ void av1_jnt_convolve_x_sse2(const uint8
 void av1_jnt_convolve_x_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_x)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_y)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
-void av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-RTCD_EXTERN void (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+RTCD_EXTERN int (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
 
 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
 void av1_upsample_intra_edge_sse4_1(uint8_t *p, int sz);
 RTCD_EXTERN void (*av1_upsample_intra_edge)(uint8_t *p, int sz);
 
 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
 void av1_upsample_intra_edge_high_sse4_1(uint16_t *p, int sz, int bd);
 RTCD_EXTERN void (*av1_upsample_intra_edge_high)(uint16_t *p, int sz, int bd);
@@ -393,33 +422,35 @@ cfl_predict_lbd_fn get_predict_lbd_fn_ss
 cfl_predict_lbd_fn get_predict_lbd_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_predict_lbd_fn (*get_predict_lbd_fn)(TX_SIZE tx_size);
 
 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_sse2(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_subtract_average_fn (*get_subtract_average_fn)(TX_SIZE tx_size);
 
-void aom_rtcd(void);
+void av1_rtcd(void);
 
 #ifdef RTCD_C
 #include "aom_ports/x86.h"
 static void setup_rtcd_internal(void)
 {
     int flags = x86_simd_caps();
 
     (void)flags;
 
     apply_selfguided_restoration = apply_selfguided_restoration_c;
     if (flags & HAS_SSE4_1) apply_selfguided_restoration = apply_selfguided_restoration_sse4_1;
     if (flags & HAS_AVX2) apply_selfguided_restoration = apply_selfguided_restoration_avx2;
     av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_avx2;
     av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_avx2;
     av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_c;
     if (flags & HAS_SSSE3) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_ssse3;
     if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_avx2;
     av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_sse2;
     if (flags & HAS_AVX2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_avx2;
     av1_convolve_2d_scale = av1_convolve_2d_scale_c;
     if (flags & HAS_SSE4_1) av1_convolve_2d_scale = av1_convolve_2d_scale_sse4_1;
     av1_convolve_2d_sr = av1_convolve_2d_sr_sse2;
@@ -446,16 +477,32 @@ static void setup_rtcd_internal(void)
     av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_c;
     if (flags & HAS_SSE4_1) av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_sse4_1;
     av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_avx2;
     av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_avx2;
+    av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_avx2;
+    av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_sse4_1;
+    av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_sse4_1;
+    av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_avx2;
+    av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_sse4_1;
+    av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_sse4_1;
+    av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_sse4_1;
     av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_avx2;
     av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_avx2;
     av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_sse4_1;
@@ -463,24 +510,18 @@ static void setup_rtcd_internal(void)
     av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_avx2;
     av1_highbd_warp_affine = av1_highbd_warp_affine_c;
     if (flags & HAS_SSE4_1) av1_highbd_warp_affine = av1_highbd_warp_affine_sse4_1;
     av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_c;
     if (flags & HAS_SSSE3) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_ssse3;
     if (flags & HAS_AVX2) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_avx2;
-    av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_sse4_1;
-    av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_c;
-    if (flags & HAS_AVX2) av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_avx2;
     av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_sse4_1;
-    av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_sse4_1;
     av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_sse4_1;
     av1_inv_txfm_add = av1_inv_txfm_add_c;
     if (flags & HAS_SSSE3) av1_inv_txfm_add = av1_inv_txfm_add_ssse3;
     if (flags & HAS_AVX2) av1_inv_txfm_add = av1_inv_txfm_add_avx2;
     av1_jnt_convolve_2d = av1_jnt_convolve_2d_c;
     if (flags & HAS_SSSE3) av1_jnt_convolve_2d = av1_jnt_convolve_2d_ssse3;
     if (flags & HAS_AVX2) av1_jnt_convolve_2d = av1_jnt_convolve_2d_avx2;
--- a/media/libaom/config/mac/x64/config/aom_config.asm
+++ b/media/libaom/config/mac/x64/config/aom_config.asm
@@ -9,47 +9,53 @@
 ; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 ;
 
 ARCH_ARM equ 0
 ARCH_MIPS equ 0
 ARCH_PPC equ 0
 ARCH_X86 equ 0
 ARCH_X86_64 equ 1
+CONFIG_2PASS_PARTITION_SEARCH_LVL equ 1
 CONFIG_ACCOUNTING equ 0
 CONFIG_ANALYZER equ 0
 CONFIG_AV1_DECODER equ 1
 CONFIG_AV1_ENCODER equ 0
 CONFIG_BIG_ENDIAN equ 0
 CONFIG_BITSTREAM_DEBUG equ 0
 CONFIG_COEFFICIENT_RANGE_CHECKING equ 0
-CONFIG_COLLECT_INTER_MODE_RD_STATS equ 1
+CONFIG_COLLECT_INTER_MODE_RD_STATS equ 0
 CONFIG_COLLECT_RD_STATS equ 0
 CONFIG_DEBUG equ 0
-CONFIG_DENOISE equ 0
-CONFIG_DIST_8X8 equ 1
+CONFIG_DENOISE equ 1
+CONFIG_DIST_8X8 equ 0
 CONFIG_ENTROPY_STATS equ 0
 CONFIG_FILEOPTIONS equ 1
+CONFIG_FIX_GF_LENGTH equ 1
 CONFIG_FP_MB_STATS equ 0
 CONFIG_GCC equ 1
 CONFIG_GCOV equ 0
+CONFIG_GLOBAL_MOTION_SEARCH equ 1
 CONFIG_GPROF equ 0
 CONFIG_INSPECTION equ 0
 CONFIG_INTERNAL_STATS equ 0
 CONFIG_INTER_STATS_ONLY equ 0
 CONFIG_LIBYUV equ 0
-CONFIG_LOWBITDEPTH equ 0
+CONFIG_LOWBITDEPTH equ 1
+CONFIG_MAX_DECODE_PROFILE equ 2
 CONFIG_MISMATCH_DEBUG equ 0
-CONFIG_MSVS equ 0
 CONFIG_MULTITHREAD equ 1
+CONFIG_NORMAL_TILE_MODE equ 0
 CONFIG_OS_SUPPORT equ 1
 CONFIG_PIC equ 0
 CONFIG_RD_DEBUG equ 0
+CONFIG_REDUCED_ENCODER_BORDER equ 0
 CONFIG_RUNTIME_CPU_DETECT equ 1
 CONFIG_SHARED equ 0
+CONFIG_SHARP_SETTINGS equ 0
 CONFIG_SIZE_LIMIT equ 0
 CONFIG_SPATIAL_RESAMPLING equ 1
 CONFIG_STATIC equ 1
 CONFIG_WEBM_IO equ 0
 DECODE_HEIGHT_LIMIT equ 0
 DECODE_WIDTH_LIMIT equ 0
 HAVE_AVX equ 1
 HAVE_AVX2 equ 1
--- a/media/libaom/config/mac/x64/config/aom_config.h
+++ b/media/libaom/config/mac/x64/config/aom_config.h
@@ -11,47 +11,53 @@
 #ifndef AOM_CONFIG_H_
 #define AOM_CONFIG_H_
 
 #define ARCH_ARM 0
 #define ARCH_MIPS 0
 #define ARCH_PPC 0
 #define ARCH_X86 0
 #define ARCH_X86_64 1
+#define CONFIG_2PASS_PARTITION_SEARCH_LVL 1
 #define CONFIG_ACCOUNTING 0
 #define CONFIG_ANALYZER 0
 #define CONFIG_AV1_DECODER 1
 #define CONFIG_AV1_ENCODER 0
 #define CONFIG_BIG_ENDIAN 0
 #define CONFIG_BITSTREAM_DEBUG 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
-#define CONFIG_COLLECT_INTER_MODE_RD_STATS 1
+#define CONFIG_COLLECT_INTER_MODE_RD_STATS 0
 #define CONFIG_COLLECT_RD_STATS 0
 #define CONFIG_DEBUG 0
-#define CONFIG_DENOISE 0
-#define CONFIG_DIST_8X8 1
+#define CONFIG_DENOISE 1
+#define CONFIG_DIST_8X8 0
 #define CONFIG_ENTROPY_STATS 0
 #define CONFIG_FILEOPTIONS 1
+#define CONFIG_FIX_GF_LENGTH 1
 #define CONFIG_FP_MB_STATS 0
 #define CONFIG_GCC 1
 #define CONFIG_GCOV 0
+#define CONFIG_GLOBAL_MOTION_SEARCH 1
 #define CONFIG_GPROF 0
 #define CONFIG_INSPECTION 0
 #define CONFIG_INTERNAL_STATS 0
 #define CONFIG_INTER_STATS_ONLY 0
 #define CONFIG_LIBYUV 0
-#define CONFIG_LOWBITDEPTH 0
+#define CONFIG_LOWBITDEPTH 1
+#define CONFIG_MAX_DECODE_PROFILE 2
 #define CONFIG_MISMATCH_DEBUG 0
-#define CONFIG_MSVS 0
 #define CONFIG_MULTITHREAD 1
+#define CONFIG_NORMAL_TILE_MODE 0
 #define CONFIG_OS_SUPPORT 1
 #define CONFIG_PIC 0
 #define CONFIG_RD_DEBUG 0
+#define CONFIG_REDUCED_ENCODER_BORDER 0
 #define CONFIG_RUNTIME_CPU_DETECT 1
 #define CONFIG_SHARED 0
+#define CONFIG_SHARP_SETTINGS 0
 #define CONFIG_SIZE_LIMIT 0
 #define CONFIG_SPATIAL_RESAMPLING 1
 #define CONFIG_STATIC 1
 #define CONFIG_WEBM_IO 0
 #define DECODE_HEIGHT_LIMIT 0
 #define DECODE_WIDTH_LIMIT 0
 #define HAVE_AVX 1
 #define HAVE_AVX2 1
--- a/media/libaom/config/mac/x64/config/aom_dsp_rtcd.h
+++ b/media/libaom/config/mac/x64/config/aom_dsp_rtcd.h
@@ -23,16 +23,17 @@ extern "C" {
 #endif
 
 void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_hmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_hmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
+void aom_blend_a64_mask_avx2(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 RTCD_EXTERN void (*aom_blend_a64_mask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 
 void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_vmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_vmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
 void aom_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
@@ -1227,16 +1228,17 @@ void aom_highbd_v_predictor_8x4_sse2(uin
 #define aom_highbd_v_predictor_8x4 aom_highbd_v_predictor_8x4_sse2
 
 void aom_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 void aom_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 #define aom_highbd_v_predictor_8x8 aom_highbd_v_predictor_8x8_sse2
 
 void aom_lowbd_blend_a64_d16_mask_c(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 void aom_lowbd_blend_a64_d16_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
+void aom_lowbd_blend_a64_d16_mask_avx2(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 RTCD_EXTERN void (*aom_lowbd_blend_a64_d16_mask)(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 
 void aom_lpf_horizontal_14_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 void aom_lpf_horizontal_14_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 #define aom_lpf_horizontal_14 aom_lpf_horizontal_14_sse2
 
 void aom_lpf_horizontal_14_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
 void aom_lpf_horizontal_14_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
@@ -1722,16 +1724,17 @@ static void setup_rtcd_internal(void)
     int flags = x86_simd_caps();
 
     (void)flags;
 
     aom_blend_a64_hmask = aom_blend_a64_hmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_hmask = aom_blend_a64_hmask_sse4_1;
     aom_blend_a64_mask = aom_blend_a64_mask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_mask = aom_blend_a64_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_blend_a64_mask = aom_blend_a64_mask_avx2;
     aom_blend_a64_vmask = aom_blend_a64_vmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_vmask = aom_blend_a64_vmask_sse4_1;
     aom_convolve8_horiz = aom_convolve8_horiz_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_horiz = aom_convolve8_horiz_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_horiz = aom_convolve8_horiz_avx2;
     aom_convolve8_vert = aom_convolve8_vert_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_vert = aom_convolve8_vert_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_vert = aom_convolve8_vert_avx2;
@@ -1806,16 +1809,17 @@ static void setup_rtcd_internal(void)
     aom_highbd_lpf_vertical_14_dual = aom_highbd_lpf_vertical_14_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_14_dual = aom_highbd_lpf_vertical_14_dual_avx2;
     aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_avx2;
     aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_avx2;
     aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_c;
     if (flags & HAS_SSE4_1) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_avx2;
     aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_ssse3;
     if (flags & HAS_AVX2) aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_avx2;
     aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_ssse3;
     if (flags & HAS_AVX2) aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_avx2;
     aom_paeth_predictor_16x4 = aom_paeth_predictor_16x4_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x4 = aom_paeth_predictor_16x4_ssse3;
--- a/media/libaom/config/mac/x64/config/av1_rtcd.h
+++ b/media/libaom/config/mac/x64/config/av1_rtcd.h
@@ -1,11 +1,11 @@
 // This file is generated. Do not edit.
-#ifndef AOM_RTCD_H_
-#define AOM_RTCD_H_
+#ifndef AV1_RTCD_H_
+#define AV1_RTCD_H_
 
 #ifdef RTCD_C
 #define RTCD_EXTERN
 #else
 #define RTCD_EXTERN extern
 #endif
 
 /*
@@ -53,20 +53,22 @@ extern "C" {
 
 void apply_selfguided_restoration_c(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_sse4_1(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_avx2(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 RTCD_EXTERN void (*apply_selfguided_restoration)(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 
 void av1_build_compound_diffwtd_mask_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 void av1_build_compound_diffwtd_mask_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
+void av1_build_compound_diffwtd_mask_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 
 void av1_build_compound_diffwtd_mask_d16_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 void av1_build_compound_diffwtd_mask_d16_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
+void av1_build_compound_diffwtd_mask_d16_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_d16)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 
 void av1_build_compound_diffwtd_mask_highbd_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_ssse3(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_highbd)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 
 void av1_convolve_2d_copy_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
@@ -168,16 +170,46 @@ void av1_highbd_dr_prediction_z1_c(uint1
 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
 
 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
 
 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
 
+void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_32x32)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_4x4_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_4x4)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
 
 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
 
 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
 void av1_highbd_jnt_convolve_2d_sse4_1(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
@@ -204,18 +236,17 @@ void av1_highbd_warp_affine_sse4_1(const
 RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t *mat, const uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
 
 void av1_highbd_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 RTCD_EXTERN void (*av1_highbd_wiener_convolve_add_src)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 
 void av1_inv_txfm2d_add_16x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_16x16_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_16x16)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_16x16 av1_inv_txfm2d_add_16x16_c
 
 void av1_inv_txfm2d_add_16x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x32 av1_inv_txfm2d_add_16x32_c
 
 void av1_inv_txfm2d_add_16x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x4 av1_inv_txfm2d_add_16x4_c
 
 void av1_inv_txfm2d_add_16x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -223,18 +254,17 @@ void av1_inv_txfm2d_add_16x64_c(const in
 
 void av1_inv_txfm2d_add_16x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x8 av1_inv_txfm2d_add_16x8_c
 
 void av1_inv_txfm2d_add_32x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x16 av1_inv_txfm2d_add_32x16_c
 
 void av1_inv_txfm2d_add_32x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_32x32_avx2(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_32x32)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_32x32 av1_inv_txfm2d_add_32x32_c
 
 void av1_inv_txfm2d_add_32x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x64 av1_inv_txfm2d_add_32x64_c
 
 void av1_inv_txfm2d_add_32x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x8 av1_inv_txfm2d_add_32x8_c
 
 void av1_inv_txfm2d_add_4x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -249,18 +279,17 @@ void av1_inv_txfm2d_add_4x8_c(const int3
 
 void av1_inv_txfm2d_add_64x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x16 av1_inv_txfm2d_add_64x16_c
 
 void av1_inv_txfm2d_add_64x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x32 av1_inv_txfm2d_add_64x32_c
 
 void av1_inv_txfm2d_add_64x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_64x64_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_64x64)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_64x64 av1_inv_txfm2d_add_64x64_c
 
 void av1_inv_txfm2d_add_8x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x16 av1_inv_txfm2d_add_8x16_c
 
 void av1_inv_txfm2d_add_8x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x32 av1_inv_txfm2d_add_8x32_c
 
 void av1_inv_txfm2d_add_8x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -290,28 +319,28 @@ void av1_jnt_convolve_x_sse2(const uint8
 void av1_jnt_convolve_x_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_x)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_y)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
-void av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-RTCD_EXTERN void (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+RTCD_EXTERN int (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
 
 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
 void av1_upsample_intra_edge_sse4_1(uint8_t *p, int sz);
 RTCD_EXTERN void (*av1_upsample_intra_edge)(uint8_t *p, int sz);
 
 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
 void av1_upsample_intra_edge_high_sse4_1(uint16_t *p, int sz, int bd);
 RTCD_EXTERN void (*av1_upsample_intra_edge_high)(uint16_t *p, int sz, int bd);
@@ -393,33 +422,35 @@ cfl_predict_lbd_fn get_predict_lbd_fn_ss
 cfl_predict_lbd_fn get_predict_lbd_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_predict_lbd_fn (*get_predict_lbd_fn)(TX_SIZE tx_size);
 
 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_sse2(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_subtract_average_fn (*get_subtract_average_fn)(TX_SIZE tx_size);
 
-void aom_rtcd(void);
+void av1_rtcd(void);
 
 #ifdef RTCD_C
 #include "aom_ports/x86.h"
 static void setup_rtcd_internal(void)
 {
     int flags = x86_simd_caps();
 
     (void)flags;
 
     apply_selfguided_restoration = apply_selfguided_restoration_c;
     if (flags & HAS_SSE4_1) apply_selfguided_restoration = apply_selfguided_restoration_sse4_1;
     if (flags & HAS_AVX2) apply_selfguided_restoration = apply_selfguided_restoration_avx2;
     av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_avx2;
     av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_avx2;
     av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_c;
     if (flags & HAS_SSSE3) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_ssse3;
     if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_avx2;
     av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_sse2;
     if (flags & HAS_AVX2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_avx2;
     av1_convolve_2d_scale = av1_convolve_2d_scale_c;
     if (flags & HAS_SSE4_1) av1_convolve_2d_scale = av1_convolve_2d_scale_sse4_1;
     av1_convolve_2d_sr = av1_convolve_2d_sr_sse2;
@@ -446,16 +477,32 @@ static void setup_rtcd_internal(void)
     av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_c;
     if (flags & HAS_SSE4_1) av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_sse4_1;
     av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_avx2;
     av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_avx2;
+    av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_avx2;
+    av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_sse4_1;
+    av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_sse4_1;
+    av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_avx2;
+    av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_sse4_1;
+    av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_sse4_1;
+    av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_sse4_1;
     av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_avx2;
     av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_avx2;
     av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_sse4_1;
@@ -463,24 +510,18 @@ static void setup_rtcd_internal(void)
     av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_avx2;
     av1_highbd_warp_affine = av1_highbd_warp_affine_c;
     if (flags & HAS_SSE4_1) av1_highbd_warp_affine = av1_highbd_warp_affine_sse4_1;
     av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_c;
     if (flags & HAS_SSSE3) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_ssse3;
     if (flags & HAS_AVX2) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_avx2;
-    av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_sse4_1;
-    av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_c;
-    if (flags & HAS_AVX2) av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_avx2;
     av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_sse4_1;
-    av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_sse4_1;
     av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_sse4_1;
     av1_inv_txfm_add = av1_inv_txfm_add_c;
     if (flags & HAS_SSSE3) av1_inv_txfm_add = av1_inv_txfm_add_ssse3;
     if (flags & HAS_AVX2) av1_inv_txfm_add = av1_inv_txfm_add_avx2;
     av1_jnt_convolve_2d = av1_jnt_convolve_2d_c;
     if (flags & HAS_SSSE3) av1_jnt_convolve_2d = av1_jnt_convolve_2d_ssse3;
     if (flags & HAS_AVX2) av1_jnt_convolve_2d = av1_jnt_convolve_2d_avx2;
--- a/media/libaom/config/win/ia32/config/aom_config.asm
+++ b/media/libaom/config/win/ia32/config/aom_config.asm
@@ -9,47 +9,53 @@
 ; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 ;
 
 ARCH_ARM equ 0
 ARCH_MIPS equ 0
 ARCH_PPC equ 0
 ARCH_X86 equ 1
 ARCH_X86_64 equ 0
+CONFIG_2PASS_PARTITION_SEARCH_LVL equ 1
 CONFIG_ACCOUNTING equ 0
 CONFIG_ANALYZER equ 0
 CONFIG_AV1_DECODER equ 1
 CONFIG_AV1_ENCODER equ 0
 CONFIG_BIG_ENDIAN equ 0
 CONFIG_BITSTREAM_DEBUG equ 0
 CONFIG_COEFFICIENT_RANGE_CHECKING equ 0
-CONFIG_COLLECT_INTER_MODE_RD_STATS equ 1
+CONFIG_COLLECT_INTER_MODE_RD_STATS equ 0
 CONFIG_COLLECT_RD_STATS equ 0
 CONFIG_DEBUG equ 0
-CONFIG_DENOISE equ 0
-CONFIG_DIST_8X8 equ 1
+CONFIG_DENOISE equ 1
+CONFIG_DIST_8X8 equ 0
 CONFIG_ENTROPY_STATS equ 0
 CONFIG_FILEOPTIONS equ 1
+CONFIG_FIX_GF_LENGTH equ 1
 CONFIG_FP_MB_STATS equ 0
 CONFIG_GCC equ 1
 CONFIG_GCOV equ 0
+CONFIG_GLOBAL_MOTION_SEARCH equ 1
 CONFIG_GPROF equ 0
 CONFIG_INSPECTION equ 0
 CONFIG_INTERNAL_STATS equ 0
 CONFIG_INTER_STATS_ONLY equ 0
 CONFIG_LIBYUV equ 0
-CONFIG_LOWBITDEPTH equ 0
+CONFIG_LOWBITDEPTH equ 1
+CONFIG_MAX_DECODE_PROFILE equ 2
 CONFIG_MISMATCH_DEBUG equ 0
-CONFIG_MSVS equ 1
 CONFIG_MULTITHREAD equ 1
+CONFIG_NORMAL_TILE_MODE equ 0
 CONFIG_OS_SUPPORT equ 1
 CONFIG_PIC equ 0
 CONFIG_RD_DEBUG equ 0
+CONFIG_REDUCED_ENCODER_BORDER equ 0
 CONFIG_RUNTIME_CPU_DETECT equ 1
 CONFIG_SHARED equ 0
+CONFIG_SHARP_SETTINGS equ 0
 CONFIG_SIZE_LIMIT equ 0
 CONFIG_SPATIAL_RESAMPLING equ 1
 CONFIG_STATIC equ 1
 CONFIG_WEBM_IO equ 0
 DECODE_HEIGHT_LIMIT equ 0
 DECODE_WIDTH_LIMIT equ 0
 HAVE_AVX equ 1
 HAVE_AVX2 equ 1
--- a/media/libaom/config/win/ia32/config/aom_config.h
+++ b/media/libaom/config/win/ia32/config/aom_config.h
@@ -11,47 +11,53 @@
 #ifndef AOM_CONFIG_H_
 #define AOM_CONFIG_H_
 
 #define ARCH_ARM 0
 #define ARCH_MIPS 0
 #define ARCH_PPC 0
 #define ARCH_X86 1
 #define ARCH_X86_64 0
+#define CONFIG_2PASS_PARTITION_SEARCH_LVL 1
 #define CONFIG_ACCOUNTING 0
 #define CONFIG_ANALYZER 0
 #define CONFIG_AV1_DECODER 1
 #define CONFIG_AV1_ENCODER 0
 #define CONFIG_BIG_ENDIAN 0
 #define CONFIG_BITSTREAM_DEBUG 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
-#define CONFIG_COLLECT_INTER_MODE_RD_STATS 1
+#define CONFIG_COLLECT_INTER_MODE_RD_STATS 0
 #define CONFIG_COLLECT_RD_STATS 0
 #define CONFIG_DEBUG 0
-#define CONFIG_DENOISE 0
-#define CONFIG_DIST_8X8 1
+#define CONFIG_DENOISE 1
+#define CONFIG_DIST_8X8 0
 #define CONFIG_ENTROPY_STATS 0
 #define CONFIG_FILEOPTIONS 1
+#define CONFIG_FIX_GF_LENGTH 1
 #define CONFIG_FP_MB_STATS 0
 #define CONFIG_GCC 1
 #define CONFIG_GCOV 0
+#define CONFIG_GLOBAL_MOTION_SEARCH 1
 #define CONFIG_GPROF 0
 #define CONFIG_INSPECTION 0
 #define CONFIG_INTERNAL_STATS 0
 #define CONFIG_INTER_STATS_ONLY 0
 #define CONFIG_LIBYUV 0
-#define CONFIG_LOWBITDEPTH 0
+#define CONFIG_LOWBITDEPTH 1
+#define CONFIG_MAX_DECODE_PROFILE 2
 #define CONFIG_MISMATCH_DEBUG 0
-#define CONFIG_MSVS 1
 #define CONFIG_MULTITHREAD 1
+#define CONFIG_NORMAL_TILE_MODE 0
 #define CONFIG_OS_SUPPORT 1
 #define CONFIG_PIC 0
 #define CONFIG_RD_DEBUG 0
+#define CONFIG_REDUCED_ENCODER_BORDER 0
 #define CONFIG_RUNTIME_CPU_DETECT 1
 #define CONFIG_SHARED 0
+#define CONFIG_SHARP_SETTINGS 0
 #define CONFIG_SIZE_LIMIT 0
 #define CONFIG_SPATIAL_RESAMPLING 1
 #define CONFIG_STATIC 1
 #define CONFIG_WEBM_IO 0
 #define DECODE_HEIGHT_LIMIT 0
 #define DECODE_WIDTH_LIMIT 0
 #define HAVE_AVX 1
 #define HAVE_AVX2 1
--- a/media/libaom/config/win/ia32/config/aom_dsp_rtcd.h
+++ b/media/libaom/config/win/ia32/config/aom_dsp_rtcd.h
@@ -23,16 +23,17 @@ extern "C" {
 #endif
 
 void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_hmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_hmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
+void aom_blend_a64_mask_avx2(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 RTCD_EXTERN void (*aom_blend_a64_mask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 
 void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_vmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_vmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
 void aom_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
@@ -1225,16 +1226,17 @@ void aom_highbd_v_predictor_8x4_sse2(uin
 RTCD_EXTERN void (*aom_highbd_v_predictor_8x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 
 void aom_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 void aom_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 RTCD_EXTERN void (*aom_highbd_v_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 
 void aom_lowbd_blend_a64_d16_mask_c(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 void aom_lowbd_blend_a64_d16_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
+void aom_lowbd_blend_a64_d16_mask_avx2(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 RTCD_EXTERN void (*aom_lowbd_blend_a64_d16_mask)(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 
 void aom_lpf_horizontal_14_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 void aom_lpf_horizontal_14_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 RTCD_EXTERN void (*aom_lpf_horizontal_14)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 
 void aom_lpf_horizontal_14_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
 void aom_lpf_horizontal_14_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
@@ -1720,16 +1722,17 @@ static void setup_rtcd_internal(void)
     int flags = x86_simd_caps();
 
     (void)flags;
 
     aom_blend_a64_hmask = aom_blend_a64_hmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_hmask = aom_blend_a64_hmask_sse4_1;
     aom_blend_a64_mask = aom_blend_a64_mask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_mask = aom_blend_a64_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_blend_a64_mask = aom_blend_a64_mask_avx2;
     aom_blend_a64_vmask = aom_blend_a64_vmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_vmask = aom_blend_a64_vmask_sse4_1;
     aom_convolve8_horiz = aom_convolve8_horiz_c;
     if (flags & HAS_SSE2) aom_convolve8_horiz = aom_convolve8_horiz_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_horiz = aom_convolve8_horiz_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_horiz = aom_convolve8_horiz_avx2;
     aom_convolve8_vert = aom_convolve8_vert_c;
     if (flags & HAS_SSE2) aom_convolve8_vert = aom_convolve8_vert_sse2;
@@ -2120,16 +2123,17 @@ static void setup_rtcd_internal(void)
     aom_highbd_v_predictor_8x16 = aom_highbd_v_predictor_8x16_c;
     if (flags & HAS_SSE2) aom_highbd_v_predictor_8x16 = aom_highbd_v_predictor_8x16_sse2;
     aom_highbd_v_predictor_8x4 = aom_highbd_v_predictor_8x4_c;
     if (flags & HAS_SSE2) aom_highbd_v_predictor_8x4 = aom_highbd_v_predictor_8x4_sse2;
     aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_c;
     if (flags & HAS_SSE2) aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_sse2;
     aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_c;
     if (flags & HAS_SSE4_1) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_avx2;
     aom_lpf_horizontal_14 = aom_lpf_horizontal_14_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_14 = aom_lpf_horizontal_14_sse2;
     aom_lpf_horizontal_14_dual = aom_lpf_horizontal_14_dual_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_14_dual = aom_lpf_horizontal_14_dual_sse2;
     aom_lpf_horizontal_4 = aom_lpf_horizontal_4_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_4 = aom_lpf_horizontal_4_sse2;
     aom_lpf_horizontal_4_dual = aom_lpf_horizontal_4_dual_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_4_dual = aom_lpf_horizontal_4_dual_sse2;
--- a/media/libaom/config/win/ia32/config/av1_rtcd.h
+++ b/media/libaom/config/win/ia32/config/av1_rtcd.h
@@ -1,11 +1,11 @@
 // This file is generated. Do not edit.
-#ifndef AOM_RTCD_H_
-#define AOM_RTCD_H_
+#ifndef AV1_RTCD_H_
+#define AV1_RTCD_H_
 
 #ifdef RTCD_C
 #define RTCD_EXTERN
 #else
 #define RTCD_EXTERN extern
 #endif
 
 /*
@@ -53,20 +53,22 @@ extern "C" {
 
 void apply_selfguided_restoration_c(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_sse4_1(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_avx2(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 RTCD_EXTERN void (*apply_selfguided_restoration)(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 
 void av1_build_compound_diffwtd_mask_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 void av1_build_compound_diffwtd_mask_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
+void av1_build_compound_diffwtd_mask_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 
 void av1_build_compound_diffwtd_mask_d16_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 void av1_build_compound_diffwtd_mask_d16_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
+void av1_build_compound_diffwtd_mask_d16_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_d16)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 
 void av1_build_compound_diffwtd_mask_highbd_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_ssse3(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_highbd)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 
 void av1_convolve_2d_copy_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
@@ -165,16 +167,46 @@ void av1_highbd_dr_prediction_z1_c(uint1
 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
 
 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
 
 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
 
+void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_32x32)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_4x4_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_4x4)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
 
 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
 
 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
 void av1_highbd_jnt_convolve_2d_sse4_1(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
@@ -201,18 +233,17 @@ void av1_highbd_warp_affine_sse4_1(const
 RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t *mat, const uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
 
 void av1_highbd_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 RTCD_EXTERN void (*av1_highbd_wiener_convolve_add_src)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 
 void av1_inv_txfm2d_add_16x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_16x16_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_16x16)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_16x16 av1_inv_txfm2d_add_16x16_c
 
 void av1_inv_txfm2d_add_16x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x32 av1_inv_txfm2d_add_16x32_c
 
 void av1_inv_txfm2d_add_16x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x4 av1_inv_txfm2d_add_16x4_c
 
 void av1_inv_txfm2d_add_16x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -220,18 +251,17 @@ void av1_inv_txfm2d_add_16x64_c(const in
 
 void av1_inv_txfm2d_add_16x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x8 av1_inv_txfm2d_add_16x8_c
 
 void av1_inv_txfm2d_add_32x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x16 av1_inv_txfm2d_add_32x16_c
 
 void av1_inv_txfm2d_add_32x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_32x32_avx2(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_32x32)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_32x32 av1_inv_txfm2d_add_32x32_c
 
 void av1_inv_txfm2d_add_32x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x64 av1_inv_txfm2d_add_32x64_c
 
 void av1_inv_txfm2d_add_32x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x8 av1_inv_txfm2d_add_32x8_c
 
 void av1_inv_txfm2d_add_4x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -246,18 +276,17 @@ void av1_inv_txfm2d_add_4x8_c(const int3
 
 void av1_inv_txfm2d_add_64x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x16 av1_inv_txfm2d_add_64x16_c
 
 void av1_inv_txfm2d_add_64x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x32 av1_inv_txfm2d_add_64x32_c
 
 void av1_inv_txfm2d_add_64x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_64x64_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_64x64)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_64x64 av1_inv_txfm2d_add_64x64_c
 
 void av1_inv_txfm2d_add_8x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x16 av1_inv_txfm2d_add_8x16_c
 
 void av1_inv_txfm2d_add_8x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x32 av1_inv_txfm2d_add_8x32_c
 
 void av1_inv_txfm2d_add_8x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -287,28 +316,28 @@ void av1_jnt_convolve_x_sse2(const uint8
 void av1_jnt_convolve_x_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_x)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_y)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
-void av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-RTCD_EXTERN void (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+RTCD_EXTERN int (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
 
 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
 void av1_upsample_intra_edge_sse4_1(uint8_t *p, int sz);
 RTCD_EXTERN void (*av1_upsample_intra_edge)(uint8_t *p, int sz);
 
 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
 void av1_upsample_intra_edge_high_sse4_1(uint16_t *p, int sz, int bd);
 RTCD_EXTERN void (*av1_upsample_intra_edge_high)(uint16_t *p, int sz, int bd);
@@ -390,33 +419,35 @@ cfl_predict_lbd_fn get_predict_lbd_fn_ss
 cfl_predict_lbd_fn get_predict_lbd_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_predict_lbd_fn (*get_predict_lbd_fn)(TX_SIZE tx_size);
 
 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_sse2(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_subtract_average_fn (*get_subtract_average_fn)(TX_SIZE tx_size);
 
-void aom_rtcd(void);
+void av1_rtcd(void);
 
 #ifdef RTCD_C
 #include "aom_ports/x86.h"
 static void setup_rtcd_internal(void)
 {
     int flags = x86_simd_caps();
 
     (void)flags;
 
     apply_selfguided_restoration = apply_selfguided_restoration_c;
     if (flags & HAS_SSE4_1) apply_selfguided_restoration = apply_selfguided_restoration_sse4_1;
     if (flags & HAS_AVX2) apply_selfguided_restoration = apply_selfguided_restoration_avx2;
     av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_avx2;
     av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_avx2;
     av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_c;
     if (flags & HAS_SSSE3) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_ssse3;
     if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_avx2;
     av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_c;
     if (flags & HAS_SSE2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_sse2;
     if (flags & HAS_AVX2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_avx2;
     av1_convolve_2d_scale = av1_convolve_2d_scale_c;
     if (flags & HAS_SSE4_1) av1_convolve_2d_scale = av1_convolve_2d_scale_sse4_1;
@@ -448,16 +479,32 @@ static void setup_rtcd_internal(void)
     av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_c;
     if (flags & HAS_SSE4_1) av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_sse4_1;
     av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_avx2;
     av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_avx2;
+    av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_avx2;
+    av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_sse4_1;
+    av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_sse4_1;
+    av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_avx2;
+    av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_sse4_1;
+    av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_sse4_1;
+    av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_sse4_1;
     av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_avx2;
     av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_avx2;
     av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_sse4_1;
@@ -465,24 +512,18 @@ static void setup_rtcd_internal(void)
     av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_avx2;
     av1_highbd_warp_affine = av1_highbd_warp_affine_c;
     if (flags & HAS_SSE4_1) av1_highbd_warp_affine = av1_highbd_warp_affine_sse4_1;
     av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_c;
     if (flags & HAS_SSSE3) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_ssse3;
     if (flags & HAS_AVX2) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_avx2;
-    av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_sse4_1;
-    av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_c;
-    if (flags & HAS_AVX2) av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_avx2;
     av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_sse4_1;
-    av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_sse4_1;
     av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_sse4_1;
     av1_inv_txfm_add = av1_inv_txfm_add_c;
     if (flags & HAS_SSSE3) av1_inv_txfm_add = av1_inv_txfm_add_ssse3;
     if (flags & HAS_AVX2) av1_inv_txfm_add = av1_inv_txfm_add_avx2;
     av1_jnt_convolve_2d = av1_jnt_convolve_2d_c;
     if (flags & HAS_SSSE3) av1_jnt_convolve_2d = av1_jnt_convolve_2d_ssse3;
     if (flags & HAS_AVX2) av1_jnt_convolve_2d = av1_jnt_convolve_2d_avx2;
--- a/media/libaom/config/win/mingw32/config/aom_config.asm
+++ b/media/libaom/config/win/mingw32/config/aom_config.asm
@@ -9,47 +9,53 @@
 ; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 ;
 
 ARCH_ARM equ 0
 ARCH_MIPS equ 0
 ARCH_PPC equ 0
 ARCH_X86 equ 1
 ARCH_X86_64 equ 0
+CONFIG_2PASS_PARTITION_SEARCH_LVL equ 1
 CONFIG_ACCOUNTING equ 0
 CONFIG_ANALYZER equ 0
 CONFIG_AV1_DECODER equ 1
 CONFIG_AV1_ENCODER equ 0
 CONFIG_BIG_ENDIAN equ 0
 CONFIG_BITSTREAM_DEBUG equ 0
 CONFIG_COEFFICIENT_RANGE_CHECKING equ 0
-CONFIG_COLLECT_INTER_MODE_RD_STATS equ 1
+CONFIG_COLLECT_INTER_MODE_RD_STATS equ 0
 CONFIG_COLLECT_RD_STATS equ 0
 CONFIG_DEBUG equ 0
-CONFIG_DENOISE equ 0
-CONFIG_DIST_8X8 equ 1
+CONFIG_DENOISE equ 1
+CONFIG_DIST_8X8 equ 0
 CONFIG_ENTROPY_STATS equ 0
 CONFIG_FILEOPTIONS equ 1
+CONFIG_FIX_GF_LENGTH equ 1
 CONFIG_FP_MB_STATS equ 0
 CONFIG_GCC equ 1
 CONFIG_GCOV equ 0
+CONFIG_GLOBAL_MOTION_SEARCH equ 1
 CONFIG_GPROF equ 0
 CONFIG_INSPECTION equ 0
 CONFIG_INTERNAL_STATS equ 0
 CONFIG_INTER_STATS_ONLY equ 0
 CONFIG_LIBYUV equ 0
-CONFIG_LOWBITDEPTH equ 0
+CONFIG_LOWBITDEPTH equ 1
+CONFIG_MAX_DECODE_PROFILE equ 2
 CONFIG_MISMATCH_DEBUG equ 0
-CONFIG_MSVS equ 0
 CONFIG_MULTITHREAD equ 1
+CONFIG_NORMAL_TILE_MODE equ 0
 CONFIG_OS_SUPPORT equ 1
 CONFIG_PIC equ 0
 CONFIG_RD_DEBUG equ 0
+CONFIG_REDUCED_ENCODER_BORDER equ 0
 CONFIG_RUNTIME_CPU_DETECT equ 1
 CONFIG_SHARED equ 0
+CONFIG_SHARP_SETTINGS equ 0
 CONFIG_SIZE_LIMIT equ 0
 CONFIG_SPATIAL_RESAMPLING equ 1
 CONFIG_STATIC equ 1
 CONFIG_WEBM_IO equ 0
 DECODE_HEIGHT_LIMIT equ 0
 DECODE_WIDTH_LIMIT equ 0
 HAVE_AVX equ 1
 HAVE_AVX2 equ 1
--- a/media/libaom/config/win/mingw32/config/aom_config.h
+++ b/media/libaom/config/win/mingw32/config/aom_config.h
@@ -11,47 +11,53 @@
 #ifndef AOM_CONFIG_H_
 #define AOM_CONFIG_H_
 
 #define ARCH_ARM 0
 #define ARCH_MIPS 0
 #define ARCH_PPC 0
 #define ARCH_X86 1
 #define ARCH_X86_64 0
+#define CONFIG_2PASS_PARTITION_SEARCH_LVL 1
 #define CONFIG_ACCOUNTING 0
 #define CONFIG_ANALYZER 0
 #define CONFIG_AV1_DECODER 1
 #define CONFIG_AV1_ENCODER 0
 #define CONFIG_BIG_ENDIAN 0
 #define CONFIG_BITSTREAM_DEBUG 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
-#define CONFIG_COLLECT_INTER_MODE_RD_STATS 1
+#define CONFIG_COLLECT_INTER_MODE_RD_STATS 0
 #define CONFIG_COLLECT_RD_STATS 0
 #define CONFIG_DEBUG 0
-#define CONFIG_DENOISE 0
-#define CONFIG_DIST_8X8 1
+#define CONFIG_DENOISE 1
+#define CONFIG_DIST_8X8 0
 #define CONFIG_ENTROPY_STATS 0
 #define CONFIG_FILEOPTIONS 1
+#define CONFIG_FIX_GF_LENGTH 1
 #define CONFIG_FP_MB_STATS 0
 #define CONFIG_GCC 1
 #define CONFIG_GCOV 0
+#define CONFIG_GLOBAL_MOTION_SEARCH 1
 #define CONFIG_GPROF 0
 #define CONFIG_INSPECTION 0
 #define CONFIG_INTERNAL_STATS 0
 #define CONFIG_INTER_STATS_ONLY 0
 #define CONFIG_LIBYUV 0
-#define CONFIG_LOWBITDEPTH 0
+#define CONFIG_LOWBITDEPTH 1
+#define CONFIG_MAX_DECODE_PROFILE 2
 #define CONFIG_MISMATCH_DEBUG 0
-#define CONFIG_MSVS 0
 #define CONFIG_MULTITHREAD 1
+#define CONFIG_NORMAL_TILE_MODE 0
 #define CONFIG_OS_SUPPORT 1
 #define CONFIG_PIC 0
 #define CONFIG_RD_DEBUG 0
+#define CONFIG_REDUCED_ENCODER_BORDER 0
 #define CONFIG_RUNTIME_CPU_DETECT 1
 #define CONFIG_SHARED 0
+#define CONFIG_SHARP_SETTINGS 0
 #define CONFIG_SIZE_LIMIT 0
 #define CONFIG_SPATIAL_RESAMPLING 1
 #define CONFIG_STATIC 1
 #define CONFIG_WEBM_IO 0
 #define DECODE_HEIGHT_LIMIT 0
 #define DECODE_WIDTH_LIMIT 0
 #define HAVE_AVX 1
 #define HAVE_AVX2 1
--- a/media/libaom/config/win/mingw32/config/aom_dsp_rtcd.h
+++ b/media/libaom/config/win/mingw32/config/aom_dsp_rtcd.h
@@ -23,16 +23,17 @@ extern "C" {
 #endif
 
 void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_hmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_hmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
+void aom_blend_a64_mask_avx2(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 RTCD_EXTERN void (*aom_blend_a64_mask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 
 void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_vmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_vmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
 void aom_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
@@ -1225,16 +1226,17 @@ void aom_highbd_v_predictor_8x4_sse2(uin
 RTCD_EXTERN void (*aom_highbd_v_predictor_8x4)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 
 void aom_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 void aom_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 RTCD_EXTERN void (*aom_highbd_v_predictor_8x8)(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 
 void aom_lowbd_blend_a64_d16_mask_c(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 void aom_lowbd_blend_a64_d16_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
+void aom_lowbd_blend_a64_d16_mask_avx2(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 RTCD_EXTERN void (*aom_lowbd_blend_a64_d16_mask)(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 
 void aom_lpf_horizontal_14_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 void aom_lpf_horizontal_14_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 RTCD_EXTERN void (*aom_lpf_horizontal_14)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 
 void aom_lpf_horizontal_14_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
 void aom_lpf_horizontal_14_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
@@ -1720,16 +1722,17 @@ static void setup_rtcd_internal(void)
     int flags = x86_simd_caps();
 
     (void)flags;
 
     aom_blend_a64_hmask = aom_blend_a64_hmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_hmask = aom_blend_a64_hmask_sse4_1;
     aom_blend_a64_mask = aom_blend_a64_mask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_mask = aom_blend_a64_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_blend_a64_mask = aom_blend_a64_mask_avx2;
     aom_blend_a64_vmask = aom_blend_a64_vmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_vmask = aom_blend_a64_vmask_sse4_1;
     aom_convolve8_horiz = aom_convolve8_horiz_c;
     if (flags & HAS_SSE2) aom_convolve8_horiz = aom_convolve8_horiz_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_horiz = aom_convolve8_horiz_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_horiz = aom_convolve8_horiz_avx2;
     aom_convolve8_vert = aom_convolve8_vert_c;
     if (flags & HAS_SSE2) aom_convolve8_vert = aom_convolve8_vert_sse2;
@@ -2120,16 +2123,17 @@ static void setup_rtcd_internal(void)
     aom_highbd_v_predictor_8x16 = aom_highbd_v_predictor_8x16_c;
     if (flags & HAS_SSE2) aom_highbd_v_predictor_8x16 = aom_highbd_v_predictor_8x16_sse2;
     aom_highbd_v_predictor_8x4 = aom_highbd_v_predictor_8x4_c;
     if (flags & HAS_SSE2) aom_highbd_v_predictor_8x4 = aom_highbd_v_predictor_8x4_sse2;
     aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_c;
     if (flags & HAS_SSE2) aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_sse2;
     aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_c;
     if (flags & HAS_SSE4_1) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_avx2;
     aom_lpf_horizontal_14 = aom_lpf_horizontal_14_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_14 = aom_lpf_horizontal_14_sse2;
     aom_lpf_horizontal_14_dual = aom_lpf_horizontal_14_dual_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_14_dual = aom_lpf_horizontal_14_dual_sse2;
     aom_lpf_horizontal_4 = aom_lpf_horizontal_4_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_4 = aom_lpf_horizontal_4_sse2;
     aom_lpf_horizontal_4_dual = aom_lpf_horizontal_4_dual_c;
     if (flags & HAS_SSE2) aom_lpf_horizontal_4_dual = aom_lpf_horizontal_4_dual_sse2;
--- a/media/libaom/config/win/mingw32/config/av1_rtcd.h
+++ b/media/libaom/config/win/mingw32/config/av1_rtcd.h
@@ -1,11 +1,11 @@
 // This file is generated. Do not edit.
-#ifndef AOM_RTCD_H_
-#define AOM_RTCD_H_
+#ifndef AV1_RTCD_H_
+#define AV1_RTCD_H_
 
 #ifdef RTCD_C
 #define RTCD_EXTERN
 #else
 #define RTCD_EXTERN extern
 #endif
 
 /*
@@ -53,20 +53,22 @@ extern "C" {
 
 void apply_selfguided_restoration_c(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_sse4_1(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_avx2(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 RTCD_EXTERN void (*apply_selfguided_restoration)(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 
 void av1_build_compound_diffwtd_mask_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 void av1_build_compound_diffwtd_mask_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
+void av1_build_compound_diffwtd_mask_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 
 void av1_build_compound_diffwtd_mask_d16_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 void av1_build_compound_diffwtd_mask_d16_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
+void av1_build_compound_diffwtd_mask_d16_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_d16)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 
 void av1_build_compound_diffwtd_mask_highbd_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_ssse3(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_highbd)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 
 void av1_convolve_2d_copy_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
@@ -165,16 +167,46 @@ void av1_highbd_dr_prediction_z1_c(uint1
 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
 
 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
 
 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
 
+void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_32x32)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_4x4_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_4x4)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
 
 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
 
 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
 void av1_highbd_jnt_convolve_2d_sse4_1(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
@@ -201,18 +233,17 @@ void av1_highbd_warp_affine_sse4_1(const
 RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t *mat, const uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
 
 void av1_highbd_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 RTCD_EXTERN void (*av1_highbd_wiener_convolve_add_src)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 
 void av1_inv_txfm2d_add_16x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_16x16_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_16x16)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_16x16 av1_inv_txfm2d_add_16x16_c
 
 void av1_inv_txfm2d_add_16x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x32 av1_inv_txfm2d_add_16x32_c
 
 void av1_inv_txfm2d_add_16x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x4 av1_inv_txfm2d_add_16x4_c
 
 void av1_inv_txfm2d_add_16x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -220,18 +251,17 @@ void av1_inv_txfm2d_add_16x64_c(const in
 
 void av1_inv_txfm2d_add_16x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x8 av1_inv_txfm2d_add_16x8_c
 
 void av1_inv_txfm2d_add_32x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x16 av1_inv_txfm2d_add_32x16_c
 
 void av1_inv_txfm2d_add_32x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_32x32_avx2(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_32x32)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_32x32 av1_inv_txfm2d_add_32x32_c
 
 void av1_inv_txfm2d_add_32x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x64 av1_inv_txfm2d_add_32x64_c
 
 void av1_inv_txfm2d_add_32x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x8 av1_inv_txfm2d_add_32x8_c
 
 void av1_inv_txfm2d_add_4x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -246,18 +276,17 @@ void av1_inv_txfm2d_add_4x8_c(const int3
 
 void av1_inv_txfm2d_add_64x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x16 av1_inv_txfm2d_add_64x16_c
 
 void av1_inv_txfm2d_add_64x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x32 av1_inv_txfm2d_add_64x32_c
 
 void av1_inv_txfm2d_add_64x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_64x64_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_64x64)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_64x64 av1_inv_txfm2d_add_64x64_c
 
 void av1_inv_txfm2d_add_8x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x16 av1_inv_txfm2d_add_8x16_c
 
 void av1_inv_txfm2d_add_8x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x32 av1_inv_txfm2d_add_8x32_c
 
 void av1_inv_txfm2d_add_8x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -287,28 +316,28 @@ void av1_jnt_convolve_x_sse2(const uint8
 void av1_jnt_convolve_x_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_x)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_y)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
-void av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-RTCD_EXTERN void (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+RTCD_EXTERN int (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
 
 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
 void av1_upsample_intra_edge_sse4_1(uint8_t *p, int sz);
 RTCD_EXTERN void (*av1_upsample_intra_edge)(uint8_t *p, int sz);
 
 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
 void av1_upsample_intra_edge_high_sse4_1(uint16_t *p, int sz, int bd);
 RTCD_EXTERN void (*av1_upsample_intra_edge_high)(uint16_t *p, int sz, int bd);
@@ -390,33 +419,35 @@ cfl_predict_lbd_fn get_predict_lbd_fn_ss
 cfl_predict_lbd_fn get_predict_lbd_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_predict_lbd_fn (*get_predict_lbd_fn)(TX_SIZE tx_size);
 
 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_sse2(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_subtract_average_fn (*get_subtract_average_fn)(TX_SIZE tx_size);
 
-void aom_rtcd(void);
+void av1_rtcd(void);
 
 #ifdef RTCD_C
 #include "aom_ports/x86.h"
 static void setup_rtcd_internal(void)
 {
     int flags = x86_simd_caps();
 
     (void)flags;
 
     apply_selfguided_restoration = apply_selfguided_restoration_c;
     if (flags & HAS_SSE4_1) apply_selfguided_restoration = apply_selfguided_restoration_sse4_1;
     if (flags & HAS_AVX2) apply_selfguided_restoration = apply_selfguided_restoration_avx2;
     av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_avx2;
     av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_avx2;
     av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_c;
     if (flags & HAS_SSSE3) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_ssse3;
     if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_avx2;
     av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_c;
     if (flags & HAS_SSE2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_sse2;
     if (flags & HAS_AVX2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_avx2;
     av1_convolve_2d_scale = av1_convolve_2d_scale_c;
     if (flags & HAS_SSE4_1) av1_convolve_2d_scale = av1_convolve_2d_scale_sse4_1;
@@ -448,16 +479,32 @@ static void setup_rtcd_internal(void)
     av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_c;
     if (flags & HAS_SSE4_1) av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_sse4_1;
     av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_avx2;
     av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_avx2;
+    av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_avx2;
+    av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_sse4_1;
+    av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_sse4_1;
+    av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_avx2;
+    av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_sse4_1;
+    av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_sse4_1;
+    av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_sse4_1;
     av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_avx2;
     av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_avx2;
     av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_sse4_1;
@@ -465,24 +512,18 @@ static void setup_rtcd_internal(void)
     av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_avx2;
     av1_highbd_warp_affine = av1_highbd_warp_affine_c;
     if (flags & HAS_SSE4_1) av1_highbd_warp_affine = av1_highbd_warp_affine_sse4_1;
     av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_c;
     if (flags & HAS_SSSE3) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_ssse3;
     if (flags & HAS_AVX2) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_avx2;
-    av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_sse4_1;
-    av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_c;
-    if (flags & HAS_AVX2) av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_avx2;
     av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_sse4_1;
-    av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_sse4_1;
     av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_sse4_1;
     av1_inv_txfm_add = av1_inv_txfm_add_c;
     if (flags & HAS_SSSE3) av1_inv_txfm_add = av1_inv_txfm_add_ssse3;
     if (flags & HAS_AVX2) av1_inv_txfm_add = av1_inv_txfm_add_avx2;
     av1_jnt_convolve_2d = av1_jnt_convolve_2d_c;
     if (flags & HAS_SSSE3) av1_jnt_convolve_2d = av1_jnt_convolve_2d_ssse3;
     if (flags & HAS_AVX2) av1_jnt_convolve_2d = av1_jnt_convolve_2d_avx2;
--- a/media/libaom/config/win/mingw64/config/aom_config.asm
+++ b/media/libaom/config/win/mingw64/config/aom_config.asm
@@ -9,47 +9,53 @@
 ; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 ;
 
 ARCH_ARM equ 0
 ARCH_MIPS equ 0
 ARCH_PPC equ 0
 ARCH_X86 equ 0
 ARCH_X86_64 equ 1
+CONFIG_2PASS_PARTITION_SEARCH_LVL equ 1
 CONFIG_ACCOUNTING equ 0
 CONFIG_ANALYZER equ 0
 CONFIG_AV1_DECODER equ 1
 CONFIG_AV1_ENCODER equ 0
 CONFIG_BIG_ENDIAN equ 0
 CONFIG_BITSTREAM_DEBUG equ 0
 CONFIG_COEFFICIENT_RANGE_CHECKING equ 0
-CONFIG_COLLECT_INTER_MODE_RD_STATS equ 1
+CONFIG_COLLECT_INTER_MODE_RD_STATS equ 0
 CONFIG_COLLECT_RD_STATS equ 0
 CONFIG_DEBUG equ 0
-CONFIG_DENOISE equ 0
-CONFIG_DIST_8X8 equ 1
+CONFIG_DENOISE equ 1
+CONFIG_DIST_8X8 equ 0
 CONFIG_ENTROPY_STATS equ 0
 CONFIG_FILEOPTIONS equ 1
+CONFIG_FIX_GF_LENGTH equ 1
 CONFIG_FP_MB_STATS equ 0
 CONFIG_GCC equ 1
 CONFIG_GCOV equ 0
+CONFIG_GLOBAL_MOTION_SEARCH equ 1
 CONFIG_GPROF equ 0
 CONFIG_INSPECTION equ 0
 CONFIG_INTERNAL_STATS equ 0
 CONFIG_INTER_STATS_ONLY equ 0
 CONFIG_LIBYUV equ 0
-CONFIG_LOWBITDEPTH equ 0
+CONFIG_LOWBITDEPTH equ 1
+CONFIG_MAX_DECODE_PROFILE equ 2
 CONFIG_MISMATCH_DEBUG equ 0
-CONFIG_MSVS equ 0
 CONFIG_MULTITHREAD equ 1
+CONFIG_NORMAL_TILE_MODE equ 0
 CONFIG_OS_SUPPORT equ 1
 CONFIG_PIC equ 0
 CONFIG_RD_DEBUG equ 0
+CONFIG_REDUCED_ENCODER_BORDER equ 0
 CONFIG_RUNTIME_CPU_DETECT equ 1
 CONFIG_SHARED equ 0
+CONFIG_SHARP_SETTINGS equ 0
 CONFIG_SIZE_LIMIT equ 0
 CONFIG_SPATIAL_RESAMPLING equ 1
 CONFIG_STATIC equ 1
 CONFIG_WEBM_IO equ 0
 DECODE_HEIGHT_LIMIT equ 0
 DECODE_WIDTH_LIMIT equ 0
 HAVE_AVX equ 1
 HAVE_AVX2 equ 1
--- a/media/libaom/config/win/mingw64/config/aom_config.h
+++ b/media/libaom/config/win/mingw64/config/aom_config.h
@@ -11,47 +11,53 @@
 #ifndef AOM_CONFIG_H_
 #define AOM_CONFIG_H_
 
 #define ARCH_ARM 0
 #define ARCH_MIPS 0
 #define ARCH_PPC 0
 #define ARCH_X86 0
 #define ARCH_X86_64 1
+#define CONFIG_2PASS_PARTITION_SEARCH_LVL 1
 #define CONFIG_ACCOUNTING 0
 #define CONFIG_ANALYZER 0
 #define CONFIG_AV1_DECODER 1
 #define CONFIG_AV1_ENCODER 0
 #define CONFIG_BIG_ENDIAN 0
 #define CONFIG_BITSTREAM_DEBUG 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
-#define CONFIG_COLLECT_INTER_MODE_RD_STATS 1
+#define CONFIG_COLLECT_INTER_MODE_RD_STATS 0
 #define CONFIG_COLLECT_RD_STATS 0
 #define CONFIG_DEBUG 0
-#define CONFIG_DENOISE 0
-#define CONFIG_DIST_8X8 1
+#define CONFIG_DENOISE 1
+#define CONFIG_DIST_8X8 0
 #define CONFIG_ENTROPY_STATS 0
 #define CONFIG_FILEOPTIONS 1
+#define CONFIG_FIX_GF_LENGTH 1
 #define CONFIG_FP_MB_STATS 0
 #define CONFIG_GCC 1
 #define CONFIG_GCOV 0
+#define CONFIG_GLOBAL_MOTION_SEARCH 1
 #define CONFIG_GPROF 0
 #define CONFIG_INSPECTION 0
 #define CONFIG_INTERNAL_STATS 0
 #define CONFIG_INTER_STATS_ONLY 0
 #define CONFIG_LIBYUV 0
-#define CONFIG_LOWBITDEPTH 0
+#define CONFIG_LOWBITDEPTH 1
+#define CONFIG_MAX_DECODE_PROFILE 2
 #define CONFIG_MISMATCH_DEBUG 0
-#define CONFIG_MSVS 0
 #define CONFIG_MULTITHREAD 1
+#define CONFIG_NORMAL_TILE_MODE 0
 #define CONFIG_OS_SUPPORT 1
 #define CONFIG_PIC 0
 #define CONFIG_RD_DEBUG 0
+#define CONFIG_REDUCED_ENCODER_BORDER 0
 #define CONFIG_RUNTIME_CPU_DETECT 1
 #define CONFIG_SHARED 0
+#define CONFIG_SHARP_SETTINGS 0
 #define CONFIG_SIZE_LIMIT 0
 #define CONFIG_SPATIAL_RESAMPLING 1
 #define CONFIG_STATIC 1
 #define CONFIG_WEBM_IO 0
 #define DECODE_HEIGHT_LIMIT 0
 #define DECODE_WIDTH_LIMIT 0
 #define HAVE_AVX 1
 #define HAVE_AVX2 1
--- a/media/libaom/config/win/mingw64/config/aom_dsp_rtcd.h
+++ b/media/libaom/config/win/mingw64/config/aom_dsp_rtcd.h
@@ -23,16 +23,17 @@ extern "C" {
 #endif
 
 void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_hmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_hmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
+void aom_blend_a64_mask_avx2(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 RTCD_EXTERN void (*aom_blend_a64_mask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 
 void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_vmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_vmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
 void aom_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
@@ -1227,16 +1228,17 @@ void aom_highbd_v_predictor_8x4_sse2(uin
 #define aom_highbd_v_predictor_8x4 aom_highbd_v_predictor_8x4_sse2
 
 void aom_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 void aom_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 #define aom_highbd_v_predictor_8x8 aom_highbd_v_predictor_8x8_sse2
 
 void aom_lowbd_blend_a64_d16_mask_c(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 void aom_lowbd_blend_a64_d16_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
+void aom_lowbd_blend_a64_d16_mask_avx2(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 RTCD_EXTERN void (*aom_lowbd_blend_a64_d16_mask)(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 
 void aom_lpf_horizontal_14_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 void aom_lpf_horizontal_14_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 #define aom_lpf_horizontal_14 aom_lpf_horizontal_14_sse2
 
 void aom_lpf_horizontal_14_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
 void aom_lpf_horizontal_14_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
@@ -1722,16 +1724,17 @@ static void setup_rtcd_internal(void)
     int flags = x86_simd_caps();
 
     (void)flags;
 
     aom_blend_a64_hmask = aom_blend_a64_hmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_hmask = aom_blend_a64_hmask_sse4_1;
     aom_blend_a64_mask = aom_blend_a64_mask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_mask = aom_blend_a64_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_blend_a64_mask = aom_blend_a64_mask_avx2;
     aom_blend_a64_vmask = aom_blend_a64_vmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_vmask = aom_blend_a64_vmask_sse4_1;
     aom_convolve8_horiz = aom_convolve8_horiz_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_horiz = aom_convolve8_horiz_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_horiz = aom_convolve8_horiz_avx2;
     aom_convolve8_vert = aom_convolve8_vert_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_vert = aom_convolve8_vert_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_vert = aom_convolve8_vert_avx2;
@@ -1806,16 +1809,17 @@ static void setup_rtcd_internal(void)
     aom_highbd_lpf_vertical_14_dual = aom_highbd_lpf_vertical_14_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_14_dual = aom_highbd_lpf_vertical_14_dual_avx2;
     aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_avx2;
     aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_avx2;
     aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_c;
     if (flags & HAS_SSE4_1) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_avx2;
     aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_ssse3;
     if (flags & HAS_AVX2) aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_avx2;
     aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_ssse3;
     if (flags & HAS_AVX2) aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_avx2;
     aom_paeth_predictor_16x4 = aom_paeth_predictor_16x4_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x4 = aom_paeth_predictor_16x4_ssse3;
--- a/media/libaom/config/win/mingw64/config/av1_rtcd.h
+++ b/media/libaom/config/win/mingw64/config/av1_rtcd.h
@@ -1,11 +1,11 @@
 // This file is generated. Do not edit.
-#ifndef AOM_RTCD_H_
-#define AOM_RTCD_H_
+#ifndef AV1_RTCD_H_
+#define AV1_RTCD_H_
 
 #ifdef RTCD_C
 #define RTCD_EXTERN
 #else
 #define RTCD_EXTERN extern
 #endif
 
 /*
@@ -53,20 +53,22 @@ extern "C" {
 
 void apply_selfguided_restoration_c(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_sse4_1(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_avx2(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 RTCD_EXTERN void (*apply_selfguided_restoration)(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 
 void av1_build_compound_diffwtd_mask_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 void av1_build_compound_diffwtd_mask_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
+void av1_build_compound_diffwtd_mask_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 
 void av1_build_compound_diffwtd_mask_d16_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 void av1_build_compound_diffwtd_mask_d16_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
+void av1_build_compound_diffwtd_mask_d16_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_d16)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 
 void av1_build_compound_diffwtd_mask_highbd_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_ssse3(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_highbd)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 
 void av1_convolve_2d_copy_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
@@ -168,16 +170,46 @@ void av1_highbd_dr_prediction_z1_c(uint1
 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
 
 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
 
 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
 
+void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_32x32)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_4x4_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_4x4)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
 
 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
 
 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
 void av1_highbd_jnt_convolve_2d_sse4_1(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
@@ -204,18 +236,17 @@ void av1_highbd_warp_affine_sse4_1(const
 RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t *mat, const uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
 
 void av1_highbd_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 RTCD_EXTERN void (*av1_highbd_wiener_convolve_add_src)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 
 void av1_inv_txfm2d_add_16x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_16x16_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_16x16)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_16x16 av1_inv_txfm2d_add_16x16_c
 
 void av1_inv_txfm2d_add_16x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x32 av1_inv_txfm2d_add_16x32_c
 
 void av1_inv_txfm2d_add_16x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x4 av1_inv_txfm2d_add_16x4_c
 
 void av1_inv_txfm2d_add_16x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -223,18 +254,17 @@ void av1_inv_txfm2d_add_16x64_c(const in
 
 void av1_inv_txfm2d_add_16x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x8 av1_inv_txfm2d_add_16x8_c
 
 void av1_inv_txfm2d_add_32x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x16 av1_inv_txfm2d_add_32x16_c
 
 void av1_inv_txfm2d_add_32x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_32x32_avx2(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_32x32)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_32x32 av1_inv_txfm2d_add_32x32_c
 
 void av1_inv_txfm2d_add_32x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x64 av1_inv_txfm2d_add_32x64_c
 
 void av1_inv_txfm2d_add_32x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x8 av1_inv_txfm2d_add_32x8_c
 
 void av1_inv_txfm2d_add_4x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -249,18 +279,17 @@ void av1_inv_txfm2d_add_4x8_c(const int3
 
 void av1_inv_txfm2d_add_64x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x16 av1_inv_txfm2d_add_64x16_c
 
 void av1_inv_txfm2d_add_64x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x32 av1_inv_txfm2d_add_64x32_c
 
 void av1_inv_txfm2d_add_64x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_64x64_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_64x64)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_64x64 av1_inv_txfm2d_add_64x64_c
 
 void av1_inv_txfm2d_add_8x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x16 av1_inv_txfm2d_add_8x16_c
 
 void av1_inv_txfm2d_add_8x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x32 av1_inv_txfm2d_add_8x32_c
 
 void av1_inv_txfm2d_add_8x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -290,28 +319,28 @@ void av1_jnt_convolve_x_sse2(const uint8
 void av1_jnt_convolve_x_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_x)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_y)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
-void av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-RTCD_EXTERN void (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+RTCD_EXTERN int (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
 
 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
 void av1_upsample_intra_edge_sse4_1(uint8_t *p, int sz);
 RTCD_EXTERN void (*av1_upsample_intra_edge)(uint8_t *p, int sz);
 
 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
 void av1_upsample_intra_edge_high_sse4_1(uint16_t *p, int sz, int bd);
 RTCD_EXTERN void (*av1_upsample_intra_edge_high)(uint16_t *p, int sz, int bd);
@@ -393,33 +422,35 @@ cfl_predict_lbd_fn get_predict_lbd_fn_ss
 cfl_predict_lbd_fn get_predict_lbd_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_predict_lbd_fn (*get_predict_lbd_fn)(TX_SIZE tx_size);
 
 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_sse2(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_subtract_average_fn (*get_subtract_average_fn)(TX_SIZE tx_size);
 
-void aom_rtcd(void);
+void av1_rtcd(void);
 
 #ifdef RTCD_C
 #include "aom_ports/x86.h"
 static void setup_rtcd_internal(void)
 {
     int flags = x86_simd_caps();
 
     (void)flags;
 
     apply_selfguided_restoration = apply_selfguided_restoration_c;
     if (flags & HAS_SSE4_1) apply_selfguided_restoration = apply_selfguided_restoration_sse4_1;
     if (flags & HAS_AVX2) apply_selfguided_restoration = apply_selfguided_restoration_avx2;
     av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_avx2;
     av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_avx2;
     av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_c;
     if (flags & HAS_SSSE3) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_ssse3;
     if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_avx2;
     av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_sse2;
     if (flags & HAS_AVX2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_avx2;
     av1_convolve_2d_scale = av1_convolve_2d_scale_c;
     if (flags & HAS_SSE4_1) av1_convolve_2d_scale = av1_convolve_2d_scale_sse4_1;
     av1_convolve_2d_sr = av1_convolve_2d_sr_sse2;
@@ -446,16 +477,32 @@ static void setup_rtcd_internal(void)
     av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_c;
     if (flags & HAS_SSE4_1) av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_sse4_1;
     av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_avx2;
     av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_avx2;
+    av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_avx2;
+    av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_sse4_1;
+    av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_sse4_1;
+    av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_avx2;
+    av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_sse4_1;
+    av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_sse4_1;
+    av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_sse4_1;
     av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_avx2;
     av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_avx2;
     av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_sse4_1;
@@ -463,24 +510,18 @@ static void setup_rtcd_internal(void)
     av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_avx2;
     av1_highbd_warp_affine = av1_highbd_warp_affine_c;
     if (flags & HAS_SSE4_1) av1_highbd_warp_affine = av1_highbd_warp_affine_sse4_1;
     av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_c;
     if (flags & HAS_SSSE3) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_ssse3;
     if (flags & HAS_AVX2) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_avx2;
-    av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_sse4_1;
-    av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_c;
-    if (flags & HAS_AVX2) av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_avx2;
     av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_sse4_1;
-    av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_sse4_1;
     av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_sse4_1;
     av1_inv_txfm_add = av1_inv_txfm_add_c;
     if (flags & HAS_SSSE3) av1_inv_txfm_add = av1_inv_txfm_add_ssse3;
     if (flags & HAS_AVX2) av1_inv_txfm_add = av1_inv_txfm_add_avx2;
     av1_jnt_convolve_2d = av1_jnt_convolve_2d_c;
     if (flags & HAS_SSSE3) av1_jnt_convolve_2d = av1_jnt_convolve_2d_ssse3;
     if (flags & HAS_AVX2) av1_jnt_convolve_2d = av1_jnt_convolve_2d_avx2;
--- a/media/libaom/config/win/x64/config/aom_config.asm
+++ b/media/libaom/config/win/x64/config/aom_config.asm
@@ -9,47 +9,53 @@
 ; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 ;
 
 ARCH_ARM equ 0
 ARCH_MIPS equ 0
 ARCH_PPC equ 0
 ARCH_X86 equ 0
 ARCH_X86_64 equ 1
+CONFIG_2PASS_PARTITION_SEARCH_LVL equ 1
 CONFIG_ACCOUNTING equ 0
 CONFIG_ANALYZER equ 0
 CONFIG_AV1_DECODER equ 1
 CONFIG_AV1_ENCODER equ 0
 CONFIG_BIG_ENDIAN equ 0
 CONFIG_BITSTREAM_DEBUG equ 0
 CONFIG_COEFFICIENT_RANGE_CHECKING equ 0
-CONFIG_COLLECT_INTER_MODE_RD_STATS equ 1
+CONFIG_COLLECT_INTER_MODE_RD_STATS equ 0
 CONFIG_COLLECT_RD_STATS equ 0
 CONFIG_DEBUG equ 0
-CONFIG_DENOISE equ 0
-CONFIG_DIST_8X8 equ 1
+CONFIG_DENOISE equ 1
+CONFIG_DIST_8X8 equ 0
 CONFIG_ENTROPY_STATS equ 0
 CONFIG_FILEOPTIONS equ 1
+CONFIG_FIX_GF_LENGTH equ 1
 CONFIG_FP_MB_STATS equ 0
 CONFIG_GCC equ 1
 CONFIG_GCOV equ 0
+CONFIG_GLOBAL_MOTION_SEARCH equ 1
 CONFIG_GPROF equ 0
 CONFIG_INSPECTION equ 0
 CONFIG_INTERNAL_STATS equ 0
 CONFIG_INTER_STATS_ONLY equ 0
 CONFIG_LIBYUV equ 0
-CONFIG_LOWBITDEPTH equ 0
+CONFIG_LOWBITDEPTH equ 1
+CONFIG_MAX_DECODE_PROFILE equ 2
 CONFIG_MISMATCH_DEBUG equ 0
-CONFIG_MSVS equ 1
 CONFIG_MULTITHREAD equ 1
+CONFIG_NORMAL_TILE_MODE equ 0
 CONFIG_OS_SUPPORT equ 1
 CONFIG_PIC equ 0
 CONFIG_RD_DEBUG equ 0
+CONFIG_REDUCED_ENCODER_BORDER equ 0
 CONFIG_RUNTIME_CPU_DETECT equ 1
 CONFIG_SHARED equ 0
+CONFIG_SHARP_SETTINGS equ 0
 CONFIG_SIZE_LIMIT equ 0
 CONFIG_SPATIAL_RESAMPLING equ 1
 CONFIG_STATIC equ 1
 CONFIG_WEBM_IO equ 0
 DECODE_HEIGHT_LIMIT equ 0
 DECODE_WIDTH_LIMIT equ 0
 HAVE_AVX equ 1
 HAVE_AVX2 equ 1
--- a/media/libaom/config/win/x64/config/aom_config.h
+++ b/media/libaom/config/win/x64/config/aom_config.h
@@ -11,47 +11,53 @@
 #ifndef AOM_CONFIG_H_
 #define AOM_CONFIG_H_
 
 #define ARCH_ARM 0
 #define ARCH_MIPS 0
 #define ARCH_PPC 0
 #define ARCH_X86 0
 #define ARCH_X86_64 1
+#define CONFIG_2PASS_PARTITION_SEARCH_LVL 1
 #define CONFIG_ACCOUNTING 0
 #define CONFIG_ANALYZER 0
 #define CONFIG_AV1_DECODER 1
 #define CONFIG_AV1_ENCODER 0
 #define CONFIG_BIG_ENDIAN 0
 #define CONFIG_BITSTREAM_DEBUG 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
-#define CONFIG_COLLECT_INTER_MODE_RD_STATS 1
+#define CONFIG_COLLECT_INTER_MODE_RD_STATS 0
 #define CONFIG_COLLECT_RD_STATS 0
 #define CONFIG_DEBUG 0
-#define CONFIG_DENOISE 0
-#define CONFIG_DIST_8X8 1
+#define CONFIG_DENOISE 1
+#define CONFIG_DIST_8X8 0
 #define CONFIG_ENTROPY_STATS 0
 #define CONFIG_FILEOPTIONS 1
+#define CONFIG_FIX_GF_LENGTH 1
 #define CONFIG_FP_MB_STATS 0
 #define CONFIG_GCC 1
 #define CONFIG_GCOV 0
+#define CONFIG_GLOBAL_MOTION_SEARCH 1
 #define CONFIG_GPROF 0
 #define CONFIG_INSPECTION 0
 #define CONFIG_INTERNAL_STATS 0
 #define CONFIG_INTER_STATS_ONLY 0
 #define CONFIG_LIBYUV 0
-#define CONFIG_LOWBITDEPTH 0
+#define CONFIG_LOWBITDEPTH 1
+#define CONFIG_MAX_DECODE_PROFILE 2
 #define CONFIG_MISMATCH_DEBUG 0
-#define CONFIG_MSVS 1
 #define CONFIG_MULTITHREAD 1
+#define CONFIG_NORMAL_TILE_MODE 0
 #define CONFIG_OS_SUPPORT 1
 #define CONFIG_PIC 0
 #define CONFIG_RD_DEBUG 0
+#define CONFIG_REDUCED_ENCODER_BORDER 0
 #define CONFIG_RUNTIME_CPU_DETECT 1
 #define CONFIG_SHARED 0
+#define CONFIG_SHARP_SETTINGS 0
 #define CONFIG_SIZE_LIMIT 0
 #define CONFIG_SPATIAL_RESAMPLING 1
 #define CONFIG_STATIC 1
 #define CONFIG_WEBM_IO 0
 #define DECODE_HEIGHT_LIMIT 0
 #define DECODE_WIDTH_LIMIT 0
 #define HAVE_AVX 1
 #define HAVE_AVX2 1
--- a/media/libaom/config/win/x64/config/aom_dsp_rtcd.h
+++ b/media/libaom/config/win/x64/config/aom_dsp_rtcd.h
@@ -23,16 +23,17 @@ extern "C" {
 #endif
 
 void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_hmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_hmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
+void aom_blend_a64_mask_avx2(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 RTCD_EXTERN void (*aom_blend_a64_mask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby);
 
 void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 void aom_blend_a64_vmask_sse4_1(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 RTCD_EXTERN void (*aom_blend_a64_vmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h);
 
 void aom_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
 void aom_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
@@ -1227,16 +1228,17 @@ void aom_highbd_v_predictor_8x4_sse2(uin
 #define aom_highbd_v_predictor_8x4 aom_highbd_v_predictor_8x4_sse2
 
 void aom_highbd_v_predictor_8x8_c(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 void aom_highbd_v_predictor_8x8_sse2(uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd);
 #define aom_highbd_v_predictor_8x8 aom_highbd_v_predictor_8x8_sse2
 
 void aom_lowbd_blend_a64_d16_mask_c(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 void aom_lowbd_blend_a64_d16_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
+void aom_lowbd_blend_a64_d16_mask_avx2(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 RTCD_EXTERN void (*aom_lowbd_blend_a64_d16_mask)(uint8_t *dst, uint32_t dst_stride, const CONV_BUF_TYPE *src0, uint32_t src0_stride, const CONV_BUF_TYPE *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int w, int h, int subx, int suby, ConvolveParams *conv_params);
 
 void aom_lpf_horizontal_14_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 void aom_lpf_horizontal_14_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
 #define aom_lpf_horizontal_14 aom_lpf_horizontal_14_sse2
 
 void aom_lpf_horizontal_14_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
 void aom_lpf_horizontal_14_dual_sse2(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
@@ -1722,16 +1724,17 @@ static void setup_rtcd_internal(void)
     int flags = x86_simd_caps();
 
     (void)flags;
 
     aom_blend_a64_hmask = aom_blend_a64_hmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_hmask = aom_blend_a64_hmask_sse4_1;
     aom_blend_a64_mask = aom_blend_a64_mask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_mask = aom_blend_a64_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_blend_a64_mask = aom_blend_a64_mask_avx2;
     aom_blend_a64_vmask = aom_blend_a64_vmask_c;
     if (flags & HAS_SSE4_1) aom_blend_a64_vmask = aom_blend_a64_vmask_sse4_1;
     aom_convolve8_horiz = aom_convolve8_horiz_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_horiz = aom_convolve8_horiz_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_horiz = aom_convolve8_horiz_avx2;
     aom_convolve8_vert = aom_convolve8_vert_sse2;
     if (flags & HAS_SSSE3) aom_convolve8_vert = aom_convolve8_vert_ssse3;
     if (flags & HAS_AVX2) aom_convolve8_vert = aom_convolve8_vert_avx2;
@@ -1806,16 +1809,17 @@ static void setup_rtcd_internal(void)
     aom_highbd_lpf_vertical_14_dual = aom_highbd_lpf_vertical_14_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_14_dual = aom_highbd_lpf_vertical_14_dual_avx2;
     aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_avx2;
     aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_sse2;
     if (flags & HAS_AVX2) aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_avx2;
     aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_c;
     if (flags & HAS_SSE4_1) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_sse4_1;
+    if (flags & HAS_AVX2) aom_lowbd_blend_a64_d16_mask = aom_lowbd_blend_a64_d16_mask_avx2;
     aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_ssse3;
     if (flags & HAS_AVX2) aom_paeth_predictor_16x16 = aom_paeth_predictor_16x16_avx2;
     aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_ssse3;
     if (flags & HAS_AVX2) aom_paeth_predictor_16x32 = aom_paeth_predictor_16x32_avx2;
     aom_paeth_predictor_16x4 = aom_paeth_predictor_16x4_c;
     if (flags & HAS_SSSE3) aom_paeth_predictor_16x4 = aom_paeth_predictor_16x4_ssse3;
--- a/media/libaom/config/win/x64/config/av1_rtcd.h
+++ b/media/libaom/config/win/x64/config/av1_rtcd.h
@@ -1,11 +1,11 @@
 // This file is generated. Do not edit.
-#ifndef AOM_RTCD_H_
-#define AOM_RTCD_H_
+#ifndef AV1_RTCD_H_
+#define AV1_RTCD_H_
 
 #ifdef RTCD_C
 #define RTCD_EXTERN
 #else
 #define RTCD_EXTERN extern
 #endif
 
 /*
@@ -53,20 +53,22 @@ extern "C" {
 
 void apply_selfguided_restoration_c(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_sse4_1(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 void apply_selfguided_restoration_avx2(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 RTCD_EXTERN void (*apply_selfguided_restoration)(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
 
 void av1_build_compound_diffwtd_mask_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 void av1_build_compound_diffwtd_mask_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
+void av1_build_compound_diffwtd_mask_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
 
 void av1_build_compound_diffwtd_mask_d16_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 void av1_build_compound_diffwtd_mask_d16_sse4_1(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
+void av1_build_compound_diffwtd_mask_d16_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_d16)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
 
 void av1_build_compound_diffwtd_mask_highbd_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_ssse3(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 void av1_build_compound_diffwtd_mask_highbd_avx2(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_highbd)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
 
 void av1_convolve_2d_copy_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
@@ -168,16 +170,46 @@ void av1_highbd_dr_prediction_z1_c(uint1
 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
 
 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
 
 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
 
+void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_16x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_16x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_32x32_avx2(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_32x32)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_4x4_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_4x4)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x16_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x16)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
+void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+void av1_highbd_inv_txfm_add_8x8_sse4_1(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+RTCD_EXTERN void (*av1_highbd_inv_txfm_add_8x8)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
+
 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
 
 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
 
 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
 void av1_highbd_jnt_convolve_2d_sse4_1(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
@@ -204,18 +236,17 @@ void av1_highbd_warp_affine_sse4_1(const
 RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t *mat, const uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
 
 void av1_highbd_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 void av1_highbd_wiener_convolve_add_src_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 RTCD_EXTERN void (*av1_highbd_wiener_convolve_add_src)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
 
 void av1_inv_txfm2d_add_16x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_16x16_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_16x16)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_16x16 av1_inv_txfm2d_add_16x16_c
 
 void av1_inv_txfm2d_add_16x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x32 av1_inv_txfm2d_add_16x32_c
 
 void av1_inv_txfm2d_add_16x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x4 av1_inv_txfm2d_add_16x4_c
 
 void av1_inv_txfm2d_add_16x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -223,18 +254,17 @@ void av1_inv_txfm2d_add_16x64_c(const in
 
 void av1_inv_txfm2d_add_16x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_16x8 av1_inv_txfm2d_add_16x8_c
 
 void av1_inv_txfm2d_add_32x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x16 av1_inv_txfm2d_add_32x16_c
 
 void av1_inv_txfm2d_add_32x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_32x32_avx2(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_32x32)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_32x32 av1_inv_txfm2d_add_32x32_c
 
 void av1_inv_txfm2d_add_32x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x64 av1_inv_txfm2d_add_32x64_c
 
 void av1_inv_txfm2d_add_32x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_32x8 av1_inv_txfm2d_add_32x8_c
 
 void av1_inv_txfm2d_add_4x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -249,18 +279,17 @@ void av1_inv_txfm2d_add_4x8_c(const int3
 
 void av1_inv_txfm2d_add_64x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x16 av1_inv_txfm2d_add_64x16_c
 
 void av1_inv_txfm2d_add_64x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_64x32 av1_inv_txfm2d_add_64x32_c
 
 void av1_inv_txfm2d_add_64x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-void av1_inv_txfm2d_add_64x64_sse4_1(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
-RTCD_EXTERN void (*av1_inv_txfm2d_add_64x64)(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
+#define av1_inv_txfm2d_add_64x64 av1_inv_txfm2d_add_64x64_c
 
 void av1_inv_txfm2d_add_8x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x16 av1_inv_txfm2d_add_8x16_c
 
 void av1_inv_txfm2d_add_8x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
 #define av1_inv_txfm2d_add_8x32 av1_inv_txfm2d_add_8x32_c
 
 void av1_inv_txfm2d_add_8x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
@@ -290,28 +319,28 @@ void av1_jnt_convolve_x_sse2(const uint8
 void av1_jnt_convolve_x_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_x)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 void av1_jnt_convolve_y_avx2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 RTCD_EXTERN void (*av1_jnt_convolve_y)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
 
-void av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-void av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
-RTCD_EXTERN void (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
-                                  int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
-                                  int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_sse4_1(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+int av1_selfguided_restoration_avx2(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
+RTCD_EXTERN int (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
+                                 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+                                 int sgr_params_idx, int bit_depth, int highbd);
 
 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
 void av1_upsample_intra_edge_sse4_1(uint8_t *p, int sz);
 RTCD_EXTERN void (*av1_upsample_intra_edge)(uint8_t *p, int sz);
 
 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
 void av1_upsample_intra_edge_high_sse4_1(uint16_t *p, int sz, int bd);
 RTCD_EXTERN void (*av1_upsample_intra_edge_high)(uint16_t *p, int sz, int bd);
@@ -393,33 +422,35 @@ cfl_predict_lbd_fn get_predict_lbd_fn_ss
 cfl_predict_lbd_fn get_predict_lbd_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_predict_lbd_fn (*get_predict_lbd_fn)(TX_SIZE tx_size);
 
 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_sse2(TX_SIZE tx_size);
 cfl_subtract_average_fn get_subtract_average_fn_avx2(TX_SIZE tx_size);
 RTCD_EXTERN cfl_subtract_average_fn (*get_subtract_average_fn)(TX_SIZE tx_size);
 
-void aom_rtcd(void);
+void av1_rtcd(void);
 
 #ifdef RTCD_C
 #include "aom_ports/x86.h"
 static void setup_rtcd_internal(void)
 {
     int flags = x86_simd_caps();
 
     (void)flags;
 
     apply_selfguided_restoration = apply_selfguided_restoration_c;
     if (flags & HAS_SSE4_1) apply_selfguided_restoration = apply_selfguided_restoration_sse4_1;
     if (flags & HAS_AVX2) apply_selfguided_restoration = apply_selfguided_restoration_avx2;
     av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask = av1_build_compound_diffwtd_mask_avx2;
     av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_c;
     if (flags & HAS_SSE4_1) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_sse4_1;
+    if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_avx2;
     av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_c;
     if (flags & HAS_SSSE3) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_ssse3;
     if (flags & HAS_AVX2) av1_build_compound_diffwtd_mask_highbd = av1_build_compound_diffwtd_mask_highbd_avx2;
     av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_sse2;
     if (flags & HAS_AVX2) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_avx2;
     av1_convolve_2d_scale = av1_convolve_2d_scale_c;
     if (flags & HAS_SSE4_1) av1_convolve_2d_scale = av1_convolve_2d_scale_sse4_1;
     av1_convolve_2d_sr = av1_convolve_2d_sr_sse2;
@@ -446,16 +477,32 @@ static void setup_rtcd_internal(void)
     av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_c;
     if (flags & HAS_SSE4_1) av1_highbd_convolve_horiz_rs = av1_highbd_convolve_horiz_rs_sse4_1;
     av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_x_sr = av1_highbd_convolve_x_sr_avx2;
     av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_c;
     if (flags & HAS_SSSE3) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_ssse3;
     if (flags & HAS_AVX2) av1_highbd_convolve_y_sr = av1_highbd_convolve_y_sr_avx2;
+    av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add = av1_highbd_inv_txfm_add_avx2;
+    av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x16 = av1_highbd_inv_txfm_add_16x16_sse4_1;
+    av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_16x8 = av1_highbd_inv_txfm_add_16x8_sse4_1;
+    av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_sse4_1;
+    if (flags & HAS_AVX2) av1_highbd_inv_txfm_add_32x32 = av1_highbd_inv_txfm_add_32x32_avx2;
+    av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_4x4 = av1_highbd_inv_txfm_add_4x4_sse4_1;
+    av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x16 = av1_highbd_inv_txfm_add_8x16_sse4_1;
+    av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_c;
+    if (flags & HAS_SSE4_1) av1_highbd_inv_txfm_add_8x8 = av1_highbd_inv_txfm_add_8x8_sse4_1;
     av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d = av1_highbd_jnt_convolve_2d_avx2;
     av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_2d_copy = av1_highbd_jnt_convolve_2d_copy_avx2;
     av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_x = av1_highbd_jnt_convolve_x_sse4_1;
@@ -463,24 +510,18 @@ static void setup_rtcd_internal(void)
     av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_c;
     if (flags & HAS_SSE4_1) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_sse4_1;
     if (flags & HAS_AVX2) av1_highbd_jnt_convolve_y = av1_highbd_jnt_convolve_y_avx2;
     av1_highbd_warp_affine = av1_highbd_warp_affine_c;
     if (flags & HAS_SSE4_1) av1_highbd_warp_affine = av1_highbd_warp_affine_sse4_1;
     av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_c;
     if (flags & HAS_SSSE3) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_ssse3;
     if (flags & HAS_AVX2) av1_highbd_wiener_convolve_add_src = av1_highbd_wiener_convolve_add_src_avx2;
-    av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_16x16 = av1_inv_txfm2d_add_16x16_sse4_1;
-    av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_c;
-    if (flags & HAS_AVX2) av1_inv_txfm2d_add_32x32 = av1_inv_txfm2d_add_32x32_avx2;
     av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_4x4 = av1_inv_txfm2d_add_4x4_sse4_1;
-    av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_c;
-    if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_64x64 = av1_inv_txfm2d_add_64x64_sse4_1;
     av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_c;
     if (flags & HAS_SSE4_1) av1_inv_txfm2d_add_8x8 = av1_inv_txfm2d_add_8x8_sse4_1;
     av1_inv_txfm_add = av1_inv_txfm_add_c;
     if (flags & HAS_SSSE3) av1_inv_txfm_add = av1_inv_txfm_add_ssse3;
     if (flags & HAS_AVX2) av1_inv_txfm_add = av1_inv_txfm_add_avx2;
     av1_jnt_convolve_2d = av1_jnt_convolve_2d_c;
     if (flags & HAS_SSSE3) av1_jnt_convolve_2d = av1_jnt_convolve_2d_ssse3;
     if (flags & HAS_AVX2) av1_jnt_convolve_2d = av1_jnt_convolve_2d_avx2;
--- a/media/libaom/sources.mozbuild
+++ b/media/libaom/sources.mozbuild
@@ -31,16 +31,17 @@ files = {
     '../../third_party/aom/aom_dsp/aom_dsp_rtcd.c',
     '../../third_party/aom/aom_dsp/arm/blend_a64_mask_neon.c',
     '../../third_party/aom/aom_dsp/arm/fwd_txfm_neon.c',
     '../../third_party/aom/aom_dsp/arm/intrapred_neon.c',
     '../../third_party/aom/aom_dsp/arm/loopfilter_neon.c',
     '../../third_party/aom/aom_dsp/arm/subtract_neon.c',
     '../../third_party/aom/aom_dsp/binary_codes_reader.c',
     '../../third_party/aom/aom_dsp/bitreader_buffer.c',
+    '../../third_party/aom/aom_dsp/bitwriter_buffer.c',
     '../../third_party/aom/aom_dsp/blend_a64_hmask.c',
     '../../third_party/aom/aom_dsp/blend_a64_mask.c',
     '../../third_party/aom/aom_dsp/blend_a64_vmask.c',
     '../../third_party/aom/aom_dsp/daalaboolreader.c',
     '../../third_party/aom/aom_dsp/entcode.c',
     '../../third_party/aom/aom_dsp/entdec.c',
     '../../third_party/aom/aom_dsp/fft.c',
     '../../third_party/aom/aom_dsp/grain_synthesis.c',
@@ -62,16 +63,17 @@ files = {
     '../../third_party/aom/av1/common/arm/av1_txfm_neon.c',
     '../../third_party/aom/av1/common/arm/blend_a64_hmask_neon.c',
     '../../third_party/aom/av1/common/arm/blend_a64_vmask_neon.c',
     '../../third_party/aom/av1/common/arm/cfl_neon.c',
     '../../third_party/aom/av1/common/arm/convolve_neon.c',
     '../../third_party/aom/av1/common/arm/jnt_convolve_neon.c',
     '../../third_party/aom/av1/common/arm/reconinter_neon.c',
     '../../third_party/aom/av1/common/arm/selfguided_neon.c',
+    '../../third_party/aom/av1/common/arm/warp_plane_neon.c',
     '../../third_party/aom/av1/common/arm/wiener_convolve_neon.c',
     '../../third_party/aom/av1/common/av1_inv_txfm1d.c',
     '../../third_party/aom/av1/common/av1_inv_txfm2d.c',
     '../../third_party/aom/av1/common/av1_loopfilter.c',
     '../../third_party/aom/av1/common/av1_rtcd.c',
     '../../third_party/aom/av1/common/av1_txfm.c',
     '../../third_party/aom/av1/common/blockd.c',
     '../../third_party/aom/av1/common/cdef.c',
@@ -81,16 +83,17 @@ files = {
     '../../third_party/aom/av1/common/convolve.c',
     '../../third_party/aom/av1/common/debugmodes.c',
     '../../third_party/aom/av1/common/entropy.c',
     '../../third_party/aom/av1/common/entropymode.c',
     '../../third_party/aom/av1/common/entropymv.c',
     '../../third_party/aom/av1/common/frame_buffers.c',
     '../../third_party/aom/av1/common/idct.c',
     '../../third_party/aom/av1/common/mvref_common.c',
+    '../../third_party/aom/av1/common/obu_util.c',
     '../../third_party/aom/av1/common/odintrin.c',
     '../../third_party/aom/av1/common/pred_common.c',
     '../../third_party/aom/av1/common/quant_common.c',
     '../../third_party/aom/av1/common/reconinter.c',
     '../../third_party/aom/av1/common/reconintra.c',
     '../../third_party/aom/av1/common/resize.c',
     '../../third_party/aom/av1/common/restoration.c',
     '../../third_party/aom/av1/common/scale.c',
@@ -134,16 +137,17 @@ files = {
     '../../third_party/aom/aom/src/aom_decoder.c',
     '../../third_party/aom/aom/src/aom_encoder.c',
     '../../third_party/aom/aom/src/aom_image.c',
     '../../third_party/aom/aom/src/aom_integer.c',
     '../../third_party/aom/aom_dsp/aom_convolve.c',
     '../../third_party/aom/aom_dsp/aom_dsp_rtcd.c',
     '../../third_party/aom/aom_dsp/binary_codes_reader.c',
     '../../third_party/aom/aom_dsp/bitreader_buffer.c',
+    '../../third_party/aom/aom_dsp/bitwriter_buffer.c',
     '../../third_party/aom/aom_dsp/blend_a64_hmask.c',
     '../../third_party/aom/aom_dsp/blend_a64_mask.c',
     '../../third_party/aom/aom_dsp/blend_a64_vmask.c',
     '../../third_party/aom/aom_dsp/daalaboolreader.c',
     '../../third_party/aom/aom_dsp/entcode.c',
     '../../third_party/aom/aom_dsp/entdec.c',
     '../../third_party/aom/aom_dsp/fft.c',
     '../../third_party/aom/aom_dsp/grain_synthesis.c',
@@ -172,16 +176,17 @@ files = {
     '../../third_party/aom/av1/common/convolve.c',
     '../../third_party/aom/av1/common/debugmodes.c',
     '../../third_party/aom/av1/common/entropy.c',
     '../../third_party/aom/av1/common/entropymode.c',
     '../../third_party/aom/av1/common/entropymv.c',
     '../../third_party/aom/av1/common/frame_buffers.c',
     '../../third_party/aom/av1/common/idct.c',
     '../../third_party/aom/av1/common/mvref_common.c',
+    '../../third_party/aom/av1/common/obu_util.c',
     '../../third_party/aom/av1/common/odintrin.c',
     '../../third_party/aom/av1/common/pred_common.c',
     '../../third_party/aom/av1/common/quant_common.c',
     '../../third_party/aom/av1/common/reconinter.c',
     '../../third_party/aom/av1/common/reconintra.c',
     '../../third_party/aom/av1/common/resize.c',
     '../../third_party/aom/av1/common/restoration.c',
     '../../third_party/aom/av1/common/scale.c',
@@ -224,16 +229,17 @@ files = {
     '../../third_party/aom/aom/src/aom_decoder.c',
     '../../third_party/aom/aom/src/aom_encoder.c',
     '../../third_party/aom/aom/src/aom_image.c',
     '../../third_party/aom/aom/src/aom_integer.c',
     '../../third_party/aom/aom_dsp/aom_convolve.c',
     '../../third_party/aom/aom_dsp/aom_dsp_rtcd.c',
     '../../third_party/aom/aom_dsp/binary_codes_reader.c',
     '../../third_party/aom/aom_dsp/bitreader_buffer.c',
+    '../../third_party/aom/aom_dsp/bitwriter_buffer.c',
     '../../third_party/aom/aom_dsp/blend_a64_hmask.c',
     '../../third_party/aom/aom_dsp/blend_a64_mask.c',
     '../../third_party/aom/aom_dsp/blend_a64_vmask.c',
     '../../third_party/aom/aom_dsp/daalaboolreader.c',
     '../../third_party/aom/aom_dsp/entcode.c',
     '../../third_party/aom/aom_dsp/entdec.c',
     '../../third_party/aom/aom_dsp/fft.c',
     '../../third_party/aom/aom_dsp/grain_synthesis.c',
@@ -246,16 +252,17 @@ files = {
     '../../third_party/aom/aom_dsp/x86/aom_high_subpixel_bilinear_sse2.asm',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_8t_intrin_ssse3.c',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_8t_sse2.asm',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_8t_ssse3.asm',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_bilinear_sse2.asm',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_bilinear_ssse3.asm',
     '../../third_party/aom/aom_dsp/x86/blend_a64_hmask_sse4.c',
+    '../../third_party/aom/aom_dsp/x86/blend_a64_mask_avx2.c',
     '../../third_party/aom/aom_dsp/x86/blend_a64_mask_sse4.c',
     '../../third_party/aom/aom_dsp/x86/blend_a64_vmask_sse4.c',
     '../../third_party/aom/aom_dsp/x86/fft_avx2.c',
     '../../third_party/aom/aom_dsp/x86/fft_sse2.c',
     '../../third_party/aom/aom_dsp/x86/highbd_convolve_avx2.c',
     '../../third_party/aom/aom_dsp/x86/highbd_convolve_ssse3.c',
     '../../third_party/aom/aom_dsp/x86/highbd_intrapred_sse2.c',
     '../../third_party/aom/aom_dsp/x86/highbd_intrapred_sse2_asm.asm',
@@ -295,16 +302,17 @@ files = {
     '../../third_party/aom/av1/common/convolve.c',
     '../../third_party/aom/av1/common/debugmodes.c',
     '../../third_party/aom/av1/common/entropy.c',
     '../../third_party/aom/av1/common/entropymode.c',
     '../../third_party/aom/av1/common/entropymv.c',
     '../../third_party/aom/av1/common/frame_buffers.c',
     '../../third_party/aom/av1/common/idct.c',
     '../../third_party/aom/av1/common/mvref_common.c',
+    '../../third_party/aom/av1/common/obu_util.c',
     '../../third_party/aom/av1/common/odintrin.c',
     '../../third_party/aom/av1/common/pred_common.c',
     '../../third_party/aom/av1/common/quant_common.c',
     '../../third_party/aom/av1/common/reconinter.c',
     '../../third_party/aom/av1/common/reconintra.c',
     '../../third_party/aom/av1/common/resize.c',
     '../../third_party/aom/av1/common/restoration.c',
     '../../third_party/aom/av1/common/scale.c',
@@ -384,16 +392,17 @@ files = {
     '../../third_party/aom/aom/src/aom_decoder.c',
     '../../third_party/aom/aom/src/aom_encoder.c',
     '../../third_party/aom/aom/src/aom_image.c',
     '../../third_party/aom/aom/src/aom_integer.c',
     '../../third_party/aom/aom_dsp/aom_convolve.c',
     '../../third_party/aom/aom_dsp/aom_dsp_rtcd.c',
     '../../third_party/aom/aom_dsp/binary_codes_reader.c',
     '../../third_party/aom/aom_dsp/bitreader_buffer.c',
+    '../../third_party/aom/aom_dsp/bitwriter_buffer.c',
     '../../third_party/aom/aom_dsp/blend_a64_hmask.c',
     '../../third_party/aom/aom_dsp/blend_a64_mask.c',
     '../../third_party/aom/aom_dsp/blend_a64_vmask.c',
     '../../third_party/aom/aom_dsp/daalaboolreader.c',
     '../../third_party/aom/aom_dsp/entcode.c',
     '../../third_party/aom/aom_dsp/entdec.c',
     '../../third_party/aom/aom_dsp/fft.c',
     '../../third_party/aom/aom_dsp/grain_synthesis.c',
@@ -406,16 +415,17 @@ files = {
     '../../third_party/aom/aom_dsp/x86/aom_high_subpixel_bilinear_sse2.asm',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_8t_intrin_ssse3.c',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_8t_sse2.asm',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_8t_ssse3.asm',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_bilinear_sse2.asm',
     '../../third_party/aom/aom_dsp/x86/aom_subpixel_bilinear_ssse3.asm',
     '../../third_party/aom/aom_dsp/x86/blend_a64_hmask_sse4.c',
+    '../../third_party/aom/aom_dsp/x86/blend_a64_mask_avx2.c',
     '../../third_party/aom/aom_dsp/x86/blend_a64_mask_sse4.c',
     '../../third_party/aom/aom_dsp/x86/blend_a64_vmask_sse4.c',
     '../../third_party/aom/aom_dsp/x86/fft_avx2.c',
     '../../third_party/aom/aom_dsp/x86/fft_sse2.c',
     '../../third_party/aom/aom_dsp/x86/highbd_convolve_avx2.c',
     '../../third_party/aom/aom_dsp/x86/highbd_convolve_ssse3.c',
     '../../third_party/aom/aom_dsp/x86/highbd_intrapred_sse2.c',
     '../../third_party/aom/aom_dsp/x86/highbd_intrapred_sse2_asm.asm',
@@ -454,16 +464,17 @@ files = {
     '../../third_party/aom/av1/common/convolve.c',
     '../../third_party/aom/av1/common/debugmodes.c',
     '../../third_party/aom/av1/common/entropy.c',
     '../../third_party/aom/av1/common/entropymode.c',
     '../../third_party/aom/av1/common/entropymv.c',
     '../../third_party/aom/av1/common/frame_buffers.c',
     '../../third_party/aom/av1/common/idct.c',
     '../../third_party/aom/av1/common/mvref_common.c',
+    '../../third_party/aom/av1/common/obu_util.c',
     '../../third_party/aom/av1/common/odintrin.c',
     '../../third_party/aom/av1/common/pred_common.c',
     '../../third_party/aom/av1/common/quant_common.c',
     '../../third_party/aom/av1/common/reconinter.c',
     '../../third_party/aom/av1/common/reconintra.c',
     '../../third_party/aom/av1/common/resize.c',
     '../../third_party/aom/av1/common/restoration.c',
     '../../third_party/aom/av1/common/scale.c',
--- a/third_party/aom/CMakeLists.txt
+++ b/third_party/aom/CMakeLists.txt
@@ -13,55 +13,16 @@ cmake_minimum_required(VERSION 3.5)
 if(NOT EMSCRIPTEN)
   if(NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE "Release"
         CACHE "Build type: Debug, Release, RelWithDebInfo or MinSizeRel" STRING
               FORCE)
   endif()
 endif()
 
-option(ENABLE_CCACHE "Enable ccache support." OFF)
-option(ENABLE_DECODE_PERF_TESTS "Enables decoder performance tests" OFF)
-option(ENABLE_DISTCC "Enable distcc support." OFF)
-option(ENABLE_DOCS "Enable documentation generation (doxygen required)." ON)
-option(ENABLE_ENCODE_PERF_TESTS "Enables encoder performance tests" OFF)
-option(ENABLE_EXAMPLES "Enables build of example code." ON)
-option(ENABLE_GOMA "Enable goma support." OFF)
-option(ENABLE_IDE_TEST_HOSTING
-       "Enables running tests within IDEs like Visual Studio and Xcode." OFF)
-option(ENABLE_NASM "Use nasm instead of yasm for x86 assembly." OFF)
-option(ENABLE_TESTDATA "Enables unit test data download targets." ON)
-option(ENABLE_TESTS "Enables unit tests." ON)
-option(ENABLE_TOOLS "Enable applications in tools sub directory." ON)
-option(ENABLE_WERROR "Converts warnings to errors at compile time." OFF)
-
-# ARM assembly/intrinsics flags.
-option(ENABLE_NEON "Enables NEON optimizations on ARM targets." ON)
-
-# MIPS assembly/intrinsics flags.
-option(ENABLE_DSPR2 "Enables DSPR2 optimizations on MIPS targets." OFF)
-option(ENABLE_MSA "Enables MSA optimizations on MIPS targets." OFF)
-
-# VSX intrinsics flags.
-option(ENABLE_VSX "Enables VSX optimizations on PowerPC targets." ON)
-
-# x86/x86_64 assembly/intrinsics flags.
-option(ENABLE_MMX "Enables MMX optimizations on x86/x86_64 targets." ON)
-option(ENABLE_SSE "Enables SSE optimizations on x86/x86_64 targets." ON)
-option(ENABLE_SSE2 "Enables SSE2 optimizations on x86/x86_64 targets." ON)
-option(ENABLE_SSE3 "Enables SSE3 optimizations on x86/x86_64 targets." ON)
-option(ENABLE_SSSE3 "Enables SSSE3 optimizations on x86/x86_64 targets." ON)
-option(ENABLE_SSE4_1 "Enables SSE4_1 optimizations on x86/x86_64 targets." ON)
-option(ENABLE_SSE4_2 "Enables SSE4_2 optimizations on x86/x86_64 targets." ON)
-option(ENABLE_AVX "Enables AVX optimizations on x86/x86_64 targets." ON)
-option(ENABLE_AVX2 "Enables AVX2 optimizations on x86/x86_64 targets." ON)
-
-# $BUILD_SHARED_LIBS is a CMake built-in-- it's listed here for visibility.
-option(BUILD_SHARED_LIBS "CMake should generate a shared library build." OFF)
-
 project(AOM C CXX)
 
 set(AOM_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
 set(AOM_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}")
 set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include"
     CACHE PATH "Installation path of includes")
 set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib"
     CACHE PATH "Installation path of libraries")
@@ -90,17 +51,17 @@ list(APPEND AOM_RTCD_SOURCES
             "${AOM_CONFIG_DIR}/config/aom_scale_rtcd.h"
             "${AOM_CONFIG_DIR}/config/av1_rtcd.h"
             "${AOM_ROOT}/aom_dsp/aom_dsp_rtcd_defs.pl"
             "${AOM_ROOT}/aom_dsp/aom_dsp_rtcd.c"
             "${AOM_ROOT}/aom_scale/aom_scale_rtcd.pl"
             "${AOM_ROOT}/aom_scale/aom_scale_rtcd.c"
             "${AOM_ROOT}/av1/common/av1_rtcd_defs.pl"
             "${AOM_ROOT}/av1/common/av1_rtcd.c"
-            "${AOM_ROOT}/build/make/rtcd.pl")
+            "${AOM_ROOT}/build/cmake/rtcd.pl")
 
 list(APPEND AOM_LIBWEBM_SOURCES
             "${AOM_ROOT}/third_party/libwebm/common/hdr_util.cc"
             "${AOM_ROOT}/third_party/libwebm/common/hdr_util.h"
             "${AOM_ROOT}/third_party/libwebm/common/webmids.h"
             "${AOM_ROOT}/third_party/libwebm/mkvmuxer/mkvmuxer.cc"
             "${AOM_ROOT}/third_party/libwebm/mkvmuxer/mkvmuxer.h"
             "${AOM_ROOT}/third_party/libwebm/mkvmuxer/mkvmuxertypes.h"
@@ -156,22 +117,29 @@ list(APPEND AOM_SOURCES
             "${AOM_ROOT}/aom/aomdx.h"
             "${AOM_ROOT}/aom/internal/aom_codec_internal.h"
             "${AOM_ROOT}/aom/src/aom_codec.c"
             "${AOM_ROOT}/aom/src/aom_decoder.c"
             "${AOM_ROOT}/aom/src/aom_encoder.c"
             "${AOM_ROOT}/aom/src/aom_image.c"
             "${AOM_ROOT}/aom/src/aom_integer.c")
 
-list(APPEND AOM_COMMON_APP_UTIL_SOURCES "${AOM_ROOT}/common/args.c"
-            "${AOM_ROOT}/common/args.h" "${AOM_ROOT}/common/md5_utils.c"
+list(APPEND AOM_COMMON_APP_UTIL_SOURCES
+            "${AOM_ROOT}/common/args.c"
+            "${AOM_ROOT}/common/args.h"
+            "${AOM_ROOT}/common/av1_config.c"
+            "${AOM_ROOT}/common/av1_config.h"
+            "${AOM_ROOT}/common/md5_utils.c"
             "${AOM_ROOT}/common/md5_utils.h"
             "${AOM_ROOT}/common/tools_common.c"
             "${AOM_ROOT}/common/tools_common.h"
-            "${AOM_ROOT}/common/video_common.h" "${AOM_ROOT}/common/y4menc.c"
+            "${AOM_ROOT}/common/video_common.h"
+            "${AOM_ROOT}/common/rawenc.c"
+            "${AOM_ROOT}/common/rawenc.h"
+            "${AOM_ROOT}/common/y4menc.c"
             "${AOM_ROOT}/common/y4menc.h")
 
 list(APPEND AOM_DECODER_APP_UTIL_SOURCES "${AOM_ROOT}/common/ivfdec.c"
             "${AOM_ROOT}/common/ivfdec.h" "${AOM_ROOT}/common/obudec.c"
             "${AOM_ROOT}/common/obudec.h" "${AOM_ROOT}/common/video_reader.c"
             "${AOM_ROOT}/common/video_reader.h")
 
 list(APPEND AOM_ENCODER_APP_UTIL_SOURCES
@@ -250,20 +218,20 @@ add_rtcd_build_step("${AOM_ROOT}/aom_sca
                     "${AOM_ROOT}/aom_scale/aom_scale_rtcd.c" "aom_scale_rtcd")
 add_rtcd_build_step("${AOM_ROOT}/av1/common/av1_rtcd_defs.pl"
                     "${AOM_CONFIG_DIR}/config/av1_rtcd.h"
                     "${AOM_ROOT}/av1/common/av1_rtcd.c" "av1_rtcd")
 
 add_library(aom_rtcd OBJECT ${AOM_RTCD_SOURCES})
 add_dependencies(aom_rtcd aom_version)
 
-if (ENABLE_EXAMPLES)
-add_library(aom_encoder_stats OBJECT ${AOM_ENCODER_STATS_SOURCES})
-endif ()
-
+if(ENABLE_EXAMPLES)
+  add_library(aom_encoder_stats OBJECT ${AOM_ENCODER_STATS_SOURCES})
+  set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_encoder_stats)
+endif()
 add_library(aom ${AOM_SOURCES} $<TARGET_OBJECTS:aom_rtcd>)
 
 if(NOT MSVC AND NOT APPLE)
   target_link_libraries(aom ${AOM_LIB_LINK_TYPE} m)
 endif()
 
 # List of object and static library targets.
 set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_rtcd aom_encoder_stats aom_mem
@@ -283,18 +251,18 @@ foreach(aom_lib ${AOM_LIB_TARGETS})
     add_dependencies(${aom_lib} aom_rtcd)
   endif()
 endforeach()
 
 # Generate C/C++ stub files containing the function usage_exit(). Users of the
 # aom_common_app_util library must define this function. This is a convenience
 # to allow omission of the function from applications that might want to use
 # other pieces of the util support without defining usage_exit().
-file(WRITE "${AOM_CONFIG_DIR}/usage_exit.c" "void usage_exit(void) {}")
-file(WRITE "${AOM_CONFIG_DIR}/usage_exit.cc"
+file(WRITE "${AOM_GEN_SRC_DIR}/usage_exit.c" "void usage_exit(void) {}")
+file(WRITE "${AOM_GEN_SRC_DIR}/usage_exit.cc"
            "extern \"C\" void usage_exit(void) {}")
 
 #
 # Application and application support targets.
 #
 if(ENABLE_EXAMPLES OR ENABLE_TESTS OR ENABLE_TOOLS)
   add_library(aom_common_app_util OBJECT ${AOM_COMMON_APP_UTIL_SOURCES})
   if(CONFIG_AV1_DECODER)
@@ -344,16 +312,18 @@ if(CONFIG_AV1_DECODER AND ENABLE_EXAMPLE
                    $<TARGET_OBJECTS:aom_common_app_util>
                    $<TARGET_OBJECTS:aom_decoder_app_util>)
     list(APPEND AOM_DECODER_EXAMPLE_TARGETS inspect)
 
     if(EMSCRIPTEN)
       add_preproc_definition(_POSIX_SOURCE)
       append_link_flag_to_target("inspect" "-s TOTAL_MEMORY=402653184")
       append_link_flag_to_target("inspect" "-s MODULARIZE=1")
+      append_link_flag_to_target(
+        "inspect" "-s \'EXTRA_EXPORTED_RUNTIME_METHODS=[\"UTF8ToString\"]\'")
       append_link_flag_to_target("inspect"
                                  "-s EXPORT_NAME=\"\'DecoderModule\'\"")
       append_link_flag_to_target("inspect" "--memory-init-file 0")
 
       if("${CMAKE_BUILD_TYPE}" STREQUAL "")
 
         # Default to -O3 when no build type is specified.
         append_compiler_flag("-O3")
@@ -402,17 +372,17 @@ if(CONFIG_AV1_ENCODER)
   endif()
 
   if(ENABLE_TOOLS)
     if(CONFIG_ENTROPY_STATS AND NOT BUILD_SHARED_LIBS)
 
       # TODO(tomfinegan): Sort out why a simple link command with
       # aom_entropy_optimizer.c won't work on macos, but dragging in all the
       # helper machinery allows the link to succeed.
-      add_executable(aom_entropy_optimizer "${AOM_CONFIG_DIR}/usage_exit.c"
+      add_executable(aom_entropy_optimizer "${AOM_GEN_SRC_DIR}/usage_exit.c"
                      "${AOM_ROOT}/tools/aom_entropy_optimizer.c"
                      $<TARGET_OBJECTS:aom_common_app_util>
                      $<TARGET_OBJECTS:aom_encoder_app_util>)
 
       # Maintain a list of encoder tool targets.
       list(APPEND AOM_ENCODER_TOOL_TARGETS aom_entropy_optimizer)
     endif()
   endif()
@@ -429,17 +399,17 @@ if(ENABLE_EXAMPLES)
   # $AOM_DIST_DIR/bin when building the dist target.
   list(APPEND AOM_EXAMPLE_TARGETS ${AOM_DECODER_EXAMPLE_TARGETS}
               ${AOM_ENCODER_EXAMPLE_TARGETS})
 endif()
 
 if(ENABLE_TOOLS)
   if(CONFIG_AV1_DECODER)
     require_cxx_flag_nomsvc("-std=c++11" NO)
-    add_executable(dump_obu "${AOM_CONFIG_DIR}/usage_exit.cc"
+    add_executable(dump_obu "${AOM_GEN_SRC_DIR}/usage_exit.cc"
                    "${AOM_ROOT}/tools/dump_obu.cc"
                    "${AOM_ROOT}/tools/obu_parser.cc"
                    "${AOM_ROOT}/tools/obu_parser.h"
                    $<TARGET_OBJECTS:aom_common_app_util>
                    $<TARGET_OBJECTS:aom_decoder_app_util>)
 
     list(APPEND AOM_TOOL_TARGETS dump_obu)
     list(APPEND AOM_APP_TARGETS dump_obu)
@@ -550,19 +520,17 @@ endif()
 if(ENABLE_TESTS)
 
   # Create test_libaom target and the targets it depends on.
   setup_aom_test_targets()
 endif()
 
 if(HAVE_PTHREAD_H AND CONFIG_MULTITHREAD)
   find_package(Threads)
-  foreach(app_target ${AOM_APP_TARGETS})
-    target_link_libraries(${app_target} ${AOM_LIB_LINK_TYPE} Threads::Threads)
-  endforeach()
+  target_link_libraries(aom ${AOM_LIB_LINK_TYPE} Threads::Threads)
 endif()
 
 if(XCODE)
 
   # TODO(tomfinegan): Make sure target has no C++ files before doing this as
   # it's not necessary in that case.
   if(CONFIG_LIBYUV OR CONFIG_WEBM_IO)
 
--- a/third_party/aom/README.md
+++ b/third_party/aom/README.md
@@ -409,16 +409,26 @@ rule:
 The above make command will only download and verify the test data.
 
 ### Adding a new test data file
 
 First, add the new test data file to the `aom-test-data` bucket of the
 `aomedia-testing` project on Google Cloud Platform. You may need to ask someone
 with the necessary access permissions to do this for you.
 
+NOTE: When a new test data file is added to the `aom-test-data` bucket, its
+"Public access" is initially "Not public". We need to change its
+"Public access" to "Public" by using the following
+[`gsutil`](https://cloud.google.com/storage/docs/gsutil_install) command:
+~~~
+    $ gsutil acl ch -g all:R gs://aom-test-data/test-data-file-name
+~~~
+This command grants the `AllUsers` group READ access to the file named
+"test-data-file-name" in the `aom-test-data` bucket.
+
 Once the new test data file has been added to `aom-test-data`, create a CL to
 add the name of the new test data file to `test/test_data_util.cmake` and add
 the SHA1 checksum of the new test data file to `test/test-data.sha1`. (The SHA1
 checksum of a file can be calculated by running the `sha1sum` command on the
 file.)
 
 ### Additional test data
 
--- a/third_party/aom/aom/aom.h
+++ b/third_party/aom/aom/aom.h
@@ -23,18 +23,18 @@
  *  - In loop deblocking filter
  *  - Context-based entropy coding
  *
  * @{
  */
 /*!\file
  * \brief Provides controls common to both the AOM encoder and decoder.
  */
-#ifndef AOM_AOM_H_
-#define AOM_AOM_H_
+#ifndef AOM_AOM_AOM_H_
+#define AOM_AOM_AOM_H_
 
 #include "aom/aom_codec.h"
 #include "aom/aom_image.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
@@ -139,9 +139,9 @@ AOM_CTRL_USE_TYPE(AV1_COPY_NEW_FRAME_IMA
 
 /*!\endcond */
 /*! @} - end defgroup aom */
 
 #ifdef __cplusplus
 }  // extern "C"
 #endif
 
-#endif  // AOM_AOM_H_
+#endif  // AOM_AOM_AOM_H_
--- a/third_party/aom/aom/aom_codec.h
+++ b/third_party/aom/aom/aom_codec.h
@@ -28,21 +28,21 @@
  *     my_app.c:
  *       extern aom_codec_iface_t my_codec;
  *       {
  *           aom_codec_ctx_t algo;
  *           res = aom_codec_init(&algo, &my_codec);
  *       }
  *     </pre>
  *
- * Once initialized, the instance is manged using other functions from
+ * Once initialized, the instance is managed using other functions from
  * the aom_codec_* family.
  */
-#ifndef AOM_AOM_CODEC_H_
-#define AOM_AOM_CODEC_H_
+#ifndef AOM_AOM_AOM_CODEC_H_
+#define AOM_AOM_AOM_CODEC_H_
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #include "aom/aom_image.h"
 #include "aom/aom_integer.h"
 
@@ -254,22 +254,16 @@ typedef enum aom_superblock_size {
  * include
  * the major.minor.patch component of the version number. Note that this encoded
  * value should be accessed through the macros provided, as the encoding may
  * change
  * in the future.
  *
  */
 int aom_codec_version(void);
-#define AOM_VERSION_MAJOR(v) \
-  ((v >> 16) & 0xff) /**< extract major from packed version */
-#define AOM_VERSION_MINOR(v) \
-  ((v >> 8) & 0xff) /**< extract minor from packed version */
-#define AOM_VERSION_PATCH(v) \
-  ((v >> 0) & 0xff) /**< extract patch from packed version */
 
 /*!\brief Return the version major number */
 #define aom_codec_version_major() ((aom_codec_version() >> 16) & 0xff)
 
 /*!\brief Return the version minor number */
 #define aom_codec_version_minor() ((aom_codec_version() >> 8) & 0xff)
 
 /*!\brief Return the version patch number */
@@ -521,9 +515,9 @@ typedef struct cfg_options {
    */
   unsigned int ext_partition;
 } cfg_options_t;
 
 /*!@} - end defgroup codec*/
 #ifdef __cplusplus
 }
 #endif
-#endif  // AOM_AOM_CODEC_H_
+#endif  // AOM_AOM_AOM_CODEC_H_
--- a/third_party/aom/aom/aom_decoder.h
+++ b/third_party/aom/aom/aom_decoder.h
@@ -3,18 +3,18 @@
  *
  * This source code is subject to the terms of the BSD 2 Clause License and
  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
  * was not distributed with this source code in the LICENSE file, you can
  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_AOM_DECODER_H_
-#define AOM_AOM_DECODER_H_
+#ifndef AOM_AOM_AOM_DECODER_H_
+#define AOM_AOM_AOM_DECODER_H_
 
 /*!\defgroup decoder Decoder Algorithm Interface
  * \ingroup codec
  * This abstraction allows applications using this decoder to easily support
  * multiple video formats with minimal code duplication. This section describes
  * the interface common to all decoders.
  * @{
  */
@@ -356,9 +356,9 @@ aom_codec_err_t aom_codec_set_frame_buff
     aom_release_frame_buffer_cb_fn_t cb_release, void *cb_priv);
 
 /*!@} - end defgroup cap_external_frame_buffer */
 
 /*!@} - end defgroup decoder*/
 #ifdef __cplusplus
 }
 #endif
-#endif  // AOM_AOM_DECODER_H_
+#endif  // AOM_AOM_AOM_DECODER_H_
--- a/third_party/aom/aom/aom_encoder.h
+++ b/third_party/aom/aom/aom_encoder.h
@@ -3,18 +3,18 @@
  *
  * This source code is subject to the terms of the BSD 2 Clause License and
  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
  * was not distributed with this source code in the LICENSE file, you can
  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_AOM_ENCODER_H_
-#define AOM_AOM_ENCODER_H_
+#ifndef AOM_AOM_AOM_ENCODER_H_
+#define AOM_AOM_AOM_ENCODER_H_
 
 /*!\defgroup encoder Encoder Algorithm Interface
  * \ingroup codec
  * This abstraction allows applications using this encoder to easily support
  * multiple video formats with minimal code duplication. This section describes
  * the interface common to all encoders.
  * @{
  */
@@ -49,37 +49,29 @@ extern "C" {
  *  ::aom_codec_iface_t interface structure. Capabilities are extra
  *  interfaces or functionality, and are not required to be supported
  *  by an encoder.
  *
  *  The available flags are specified by AOM_CODEC_CAP_* defines.
  */
 #define AOM_CODEC_CAP_PSNR 0x10000 /**< Can issue PSNR packets */
 
-/*! Can output one partition at a time. Each partition is returned in its
- *  own AOM_CODEC_CX_FRAME_PKT, with the FRAME_IS_FRAGMENT flag set for
- *  every partition but the last. In this mode all frames are always
- *  returned partition by partition.
- */
-#define AOM_CODEC_CAP_OUTPUT_PARTITION 0x20000
-
 /*! Can support input images at greater than 8 bitdepth.
  */
 #define AOM_CODEC_CAP_HIGHBITDEPTH 0x40000
 
 /*! \brief Initialization-time Feature Enabling
  *
  *  Certain codec features must be known at initialization time, to allow
  *  for proper memory allocation.
  *
  *  The available flags are specified by AOM_CODEC_USE_* defines.
  */
 #define AOM_CODEC_USE_PSNR 0x10000 /**< Calculate PSNR on each frame */
 /*!\brief Make the encoder output one  partition at a time. */
-#define AOM_CODEC_USE_OUTPUT_PARTITION 0x20000
 #define AOM_CODEC_USE_HIGHBITDEPTH 0x40000 /**< Use high bitdepth */
 
 /*!\brief Generic fixed size buffer structure
  *
  * This structure is able to hold a reference to any fixed size buffer.
  */
 typedef struct aom_fixed_buf {
   void *buf;       /**< Pointer to the data */
@@ -114,21 +106,16 @@ typedef uint32_t aom_codec_frame_flags_t
  *
  * These flags define which error resilient features to enable in the
  * encoder. The flags are specified through the
  * aom_codec_enc_cfg::g_error_resilient variable.
  */
 typedef uint32_t aom_codec_er_flags_t;
 /*!\brief Improve resiliency against losses of whole frames */
 #define AOM_ERROR_RESILIENT_DEFAULT 0x1
-/*!\brief The frame partitions are independently decodable by the bool decoder,
- * meaning that partitions can be decoded even though earlier partitions have
- * been lost. Note that intra prediction is still done over the partition
- * boundary. */
-#define AOM_ERROR_RESILIENT_PARTITIONS 0x2
 
 /*!\brief Encoder output packet variants
  *
  * This enumeration lists the different kinds of data packets that can be
  * returned by calls to aom_codec_get_cx_data(). Algorithms \ref MAY
  * extend this list to provide additional functionality.
  */
 enum aom_codec_cx_pkt_kind {
@@ -844,23 +831,35 @@ aom_codec_err_t aom_codec_enc_config_def
  *     A parameter was NULL, or the usage value was not recognized.
  */
 aom_codec_err_t aom_codec_enc_config_set(aom_codec_ctx_t *ctx,
                                          const aom_codec_enc_cfg_t *cfg);
 
 /*!\brief Get global stream headers
  *
  * Retrieves a stream level global header packet, if supported by the codec.
+ * Calls to this function should be deferred until all configuration information
+ * has been passed to libaom. Otherwise the global header data may be
+ * invalidated by additional configuration changes.
+ *
+ * The AV1 implementation of this function returns an OBU. The OBU returned is
+ * in Low Overhead Bitstream Format. Specifically, the obu_has_size_field bit is
+ * set, and the buffer contains the obu_size field for the returned OBU.
  *
  * \param[in]    ctx     Pointer to this instance's context
  *
  * \retval NULL
- *     Encoder does not support global header
+ *     Encoder does not support global header, or an error occurred while
+ *     generating the global header.
+ *
  * \retval Non-NULL
- *     Pointer to buffer containing global header packet
+ *     Pointer to buffer containing global header packet. The caller owns the
+ *     memory associated with this buffer, and must free the 'buf' member of the
+ *     aom_fixed_buf_t as well as the aom_fixed_buf_t pointer. Memory returned
+ *     must be freed via call to free().
  */
 aom_fixed_buf_t *aom_codec_get_global_headers(aom_codec_ctx_t *ctx);
 
 /*!\brief Encode a frame
  *
  * Encodes a video frame at the given "presentation time." The presentation
  * time stamp (PTS) \ref MUST be strictly increasing.
  *
@@ -974,9 +973,9 @@ const aom_codec_cx_pkt_t *aom_codec_get_
  *
  */
 const aom_image_t *aom_codec_get_preview_frame(aom_codec_ctx_t *ctx);
 
 /*!@} - end defgroup encoder*/
 #ifdef __cplusplus
 }
 #endif
-#endif  // AOM_AOM_ENCODER_H_
+#endif  // AOM_AOM_AOM_ENCODER_H_
--- a/third_party/aom/aom/aom_frame_buffer.h
+++ b/third_party/aom/aom/aom_frame_buffer.h
@@ -4,18 +4,18 @@
  * This source code is subject to the terms of the BSD 2 Clause License and
  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
  * was not distributed with this source code in the LICENSE file, you can
  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_AOM_FRAME_BUFFER_H_
-#define AOM_AOM_FRAME_BUFFER_H_
+#ifndef AOM_AOM_AOM_FRAME_BUFFER_H_
+#define AOM_AOM_AOM_FRAME_BUFFER_H_
 
 /*!\file
  * \brief Describes the decoder external frame buffer interface.
  */
 
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -76,9 +76,9 @@ typedef int (*aom_get_frame_buffer_cb_fn
  */
 typedef int (*aom_release_frame_buffer_cb_fn_t)(void *priv,
                                                 aom_codec_frame_buffer_t *fb);
 
 #ifdef __cplusplus
 }  // extern "C"
 #endif
 
-#endif  // AOM_AOM_FRAME_BUFFER_H_
+#endif  // AOM_AOM_AOM_FRAME_BUFFER_H_
--- a/third_party/aom/aom/aom_image.h
+++ b/third_party/aom/aom/aom_image.h
@@ -8,18 +8,18 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
 /*!\file
  * \brief Describes the aom image descriptor and associated operations
  *
  */
-#ifndef AOM_AOM_IMAGE_H_
-#define AOM_AOM_IMAGE_H_
+#ifndef AOM_AOM_AOM_IMAGE_H_
+#define AOM_AOM_AOM_IMAGE_H_
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #include "aom/aom_integer.h"
 
 /*!\brief Current ABI version number
@@ -323,9 +323,9 @@ int aom_img_plane_width(const aom_image_
  * \param[in]    plane     Plane index
  */
 int aom_img_plane_height(const aom_image_t *img, int plane);
 
 #ifdef __cplusplus
 }  // extern "C"
 #endif
 
-#endif  // AOM_AOM_IMAGE_H_
+#endif  // AOM_AOM_AOM_IMAGE_H_
--- a/third_party/aom/aom/aom_integer.h
+++ b/third_party/aom/aom/aom_integer.h
@@ -3,18 +3,18 @@
  *
  * This source code is subject to the terms of the BSD 2 Clause License and
  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
  * was not distributed with this source code in the LICENSE file, you can
  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_AOM_INTEGER_H_
-#define AOM_AOM_INTEGER_H_
+#ifndef AOM_AOM_AOM_INTEGER_H_
+#define AOM_AOM_AOM_INTEGER_H_