Full Code of jpsdr/x264 for AI

master 0480cb05fa18 cached
270 files
5.6 MB
1.5M tokens
1927 symbols
1 requests
Download .txt
Showing preview only (5,953K chars total). Download the full file or copy to clipboard to get everything.
Repository: jpsdr/x264
Branch: master
Commit: 0480cb05fa18
Files: 270
Total size: 5.6 MB

Directory structure:
gitextract_fz8ha9kx/

├── .gitignore
├── .gitlab-ci.yml
├── AUTHORS
├── COPYING
├── Makefile
├── autocomplete.c
├── common/
│   ├── aarch64/
│   │   ├── asm-offsets.c
│   │   ├── asm-offsets.h
│   │   ├── asm.S
│   │   ├── bitstream-a.S
│   │   ├── bitstream.h
│   │   ├── cabac-a.S
│   │   ├── dct-a-common.S
│   │   ├── dct-a-sve.S
│   │   ├── dct-a-sve2.S
│   │   ├── dct-a.S
│   │   ├── dct.h
│   │   ├── deblock-a-common.S
│   │   ├── deblock-a-sve.S
│   │   ├── deblock-a.S
│   │   ├── deblock.h
│   │   ├── mc-a-common.S
│   │   ├── mc-a-sve.S
│   │   ├── mc-a.S
│   │   ├── mc-c.c
│   │   ├── mc.h
│   │   ├── pixel-a-common.S
│   │   ├── pixel-a-sve.S
│   │   ├── pixel-a.S
│   │   ├── pixel.h
│   │   ├── predict-a.S
│   │   ├── predict-c.c
│   │   ├── predict.h
│   │   ├── quant-a.S
│   │   └── quant.h
│   ├── arm/
│   │   ├── asm.S
│   │   ├── bitstream-a.S
│   │   ├── bitstream.h
│   │   ├── cpu-a.S
│   │   ├── dct-a.S
│   │   ├── dct.h
│   │   ├── deblock-a.S
│   │   ├── deblock.h
│   │   ├── mc-a.S
│   │   ├── mc-c.c
│   │   ├── mc.h
│   │   ├── pixel-a.S
│   │   ├── pixel.h
│   │   ├── predict-a.S
│   │   ├── predict-c.c
│   │   ├── predict.h
│   │   ├── quant-a.S
│   │   └── quant.h
│   ├── base.c
│   ├── base.h
│   ├── bitstream.c
│   ├── bitstream.h
│   ├── cabac.c
│   ├── cabac.h
│   ├── common.c
│   ├── common.h
│   ├── cpu.c
│   ├── cpu.h
│   ├── dct.c
│   ├── dct.h
│   ├── deblock.c
│   ├── frame.c
│   ├── frame.h
│   ├── loongarch/
│   │   ├── dct-a.S
│   │   ├── dct.h
│   │   ├── deblock-a.S
│   │   ├── deblock.h
│   │   ├── loongson_asm.S
│   │   ├── loongson_util.S
│   │   ├── mc-a.S
│   │   ├── mc-c.c
│   │   ├── mc.h
│   │   ├── pixel-a.S
│   │   ├── pixel-c.c
│   │   ├── pixel.h
│   │   ├── predict-a.S
│   │   ├── predict-c.c
│   │   ├── predict.h
│   │   ├── quant-a.S
│   │   ├── quant.h
│   │   └── sad-a.S
│   ├── macroblock.c
│   ├── macroblock.h
│   ├── mc.c
│   ├── mc.h
│   ├── mips/
│   │   ├── dct-c.c
│   │   ├── dct.h
│   │   ├── deblock-c.c
│   │   ├── deblock.h
│   │   ├── macros.h
│   │   ├── mc-c.c
│   │   ├── mc.h
│   │   ├── pixel-c.c
│   │   ├── pixel.h
│   │   ├── predict-c.c
│   │   ├── predict.h
│   │   ├── quant-c.c
│   │   └── quant.h
│   ├── mvpred.c
│   ├── opencl/
│   │   ├── bidir.cl
│   │   ├── downscale.cl
│   │   ├── intra.cl
│   │   ├── motionsearch.cl
│   │   ├── subpel.cl
│   │   ├── weightp.cl
│   │   └── x264-cl.h
│   ├── opencl.c
│   ├── opencl.h
│   ├── osdep.c
│   ├── osdep.h
│   ├── pixel.c
│   ├── pixel.h
│   ├── ppc/
│   │   ├── dct.c
│   │   ├── dct.h
│   │   ├── deblock.c
│   │   ├── deblock.h
│   │   ├── mc.c
│   │   ├── mc.h
│   │   ├── pixel.c
│   │   ├── pixel.h
│   │   ├── ppccommon.h
│   │   ├── predict.c
│   │   ├── predict.h
│   │   ├── quant.c
│   │   └── quant.h
│   ├── predict.c
│   ├── predict.h
│   ├── quant.c
│   ├── quant.h
│   ├── rectangle.c
│   ├── rectangle.h
│   ├── set.c
│   ├── set.h
│   ├── tables.c
│   ├── tables.h
│   ├── threadpool.c
│   ├── threadpool.h
│   ├── vlc.c
│   ├── win32thread.c
│   ├── win32thread.h
│   └── x86/
│       ├── bitstream-a.asm
│       ├── bitstream.h
│       ├── cabac-a.asm
│       ├── const-a.asm
│       ├── cpu-a.asm
│       ├── dct-32.asm
│       ├── dct-64.asm
│       ├── dct-a.asm
│       ├── dct.h
│       ├── deblock-a.asm
│       ├── deblock.h
│       ├── mc-a.asm
│       ├── mc-a2.asm
│       ├── mc-c.c
│       ├── mc.h
│       ├── pixel-32.asm
│       ├── pixel-a.asm
│       ├── pixel.h
│       ├── predict-a.asm
│       ├── predict-c.c
│       ├── predict.h
│       ├── quant-a.asm
│       ├── quant.h
│       ├── sad-a.asm
│       ├── sad16-a.asm
│       ├── trellis-64.asm
│       ├── util.h
│       ├── x86inc.asm
│       └── x86util.asm
├── config.guess
├── config.sub
├── configure
├── doc/
│   ├── ratecontrol.txt
│   ├── regression_test.txt
│   ├── standards.txt
│   ├── threads.txt
│   └── vui.txt
├── encoder/
│   ├── analyse.c
│   ├── analyse.h
│   ├── api.c
│   ├── cabac.c
│   ├── cavlc.c
│   ├── encoder.c
│   ├── lookahead.c
│   ├── macroblock.c
│   ├── macroblock.h
│   ├── me.c
│   ├── me.h
│   ├── ratecontrol.c
│   ├── ratecontrol.h
│   ├── rdo.c
│   ├── set.c
│   ├── set.h
│   ├── slicetype-cl.c
│   ├── slicetype-cl.h
│   └── slicetype.c
├── example.c
├── extras/
│   ├── avisynth_c.h
│   ├── cl.h
│   ├── cl_platform.h
│   ├── getopt.c
│   ├── getopt.h
│   ├── intel_dispatcher.h
│   ├── inttypes.h
│   └── stdint.h
├── filters/
│   ├── filters.c
│   ├── filters.h
│   └── video/
│       ├── cache.c
│       ├── crop.c
│       ├── depth.c
│       ├── fix_vfr_pts.c
│       ├── internal.c
│       ├── internal.h
│       ├── resize.c
│       ├── select_every.c
│       ├── source.c
│       ├── video.c
│       └── video.h
├── input/
│   ├── avs.c
│   ├── ffms.c
│   ├── input.c
│   ├── input.h
│   ├── lavf.c
│   ├── raw.c
│   ├── thread.c
│   ├── timecode.c
│   └── y4m.c
├── output/
│   ├── flv.c
│   ├── flv_bytestream.c
│   ├── flv_bytestream.h
│   ├── matroska.c
│   ├── matroska_ebml.c
│   ├── matroska_ebml.h
│   ├── mp4.c
│   ├── mp4_lsmash.c
│   ├── output.h
│   └── raw.c
├── tools/
│   ├── bash-autocomplete.sh
│   ├── checkasm-a.asm
│   ├── checkasm-aarch64.S
│   ├── checkasm-arm.S
│   ├── checkasm-loongarch.S
│   ├── checkasm.c
│   ├── cltostr.sh
│   ├── countquant_x264.pl
│   ├── digress/
│   │   ├── __init__.py
│   │   ├── cli.py
│   │   ├── comparers.py
│   │   ├── constants.py
│   │   ├── errors.py
│   │   ├── scm/
│   │   │   ├── __init__.py
│   │   │   ├── dummy.py
│   │   │   └── git.py
│   │   └── testing.py
│   ├── gas-preprocessor.pl
│   ├── msvsdepend.sh
│   ├── q_matrix_jvt.cfg
│   └── test_x264.py
├── version.sh
├── x264.c
├── x264.h
├── x264cli.h
├── x264dll.c
├── x264res.manifest
└── x264res.rc

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
*~
*.a
*.d
*.diff
*.orig
*.rej
*.dll*
*.exe
*.def
*.lib
*.pdb
*.mo
*.o
*.patch
*.pc
*.pot
*.so*
*.dylib
.*.swp
.depend
.DS_Store
TAGS
config.h
config.mak
config.log
x264_config.h
x264
checkasm

*.264
*.h264
*.2pass
*.ffindex
*.avs
*.mkv
*.flv
*.mp4
*.y4m
*.yuv
*.log
*.mbtree
*.temp
*.pyc
*.pgd
*.pgc

.digress_x264
dataDec.txt
log.dec
common/oclobj.h
x264_lookahead.clbin


================================================
FILE: .gitlab-ci.yml
================================================
stages:
    - build
    - test
    - release

.variables-debian-amd64: &variables-debian-amd64
    _TRIPLET: ""
    _PLATFORMSUFFIX: ""
    _WRAPPER: ""

.variables-debian-aarch64: &variables-debian-aarch64
    _TRIPLET: ""
    _PLATFORMSUFFIX: ""
    _WRAPPER: ""

.variables-win32: &variables-win32
    _TRIPLET: "i686-w64-mingw32"
    _ARCH: "i686"
    _OS: "mingw32"
    _PLATFORMSUFFIX: ".exe"
    _WRAPPER: "wine"

.variables-win64: &variables-win64
    _TRIPLET: "x86_64-w64-mingw32"
    _ARCH: "x86_64"
    _OS: "mingw32"
    _PLATFORMSUFFIX: ".exe"
    _WRAPPER: "wine"

.variables-win-armv7: &variables-win-armv7
    _TRIPLET: "armv7-w64-mingw32"
    _PLATFORMSUFFIX: ".exe"
    _WRAPPER: ""

.variables-win-aarch64: &variables-win-aarch64
    _TRIPLET: "aarch64-w64-mingw32"
    _PLATFORMSUFFIX: ".exe"
    _WRAPPER: ""

.variables-macos-x86_64: &variables-macos-x86_64
    _TRIPLET: "x86_64-apple-darwin19"
    _ARCH: "x86_64"
    _OS: "darwin"
    _PLATFORMSUFFIX: ""
    _WRAPPER: ""
    _XCFLAGS: "-arch x86_64"
    _XLDFLAGS: "-arch x86_64"
    _BIN_PATH: /Users/videolanci/sandbox/bin

.variables-macos-arm64: &variables-macos-arm64
    _TRIPLET: "aarch64-apple-darwin19"
    _ARCH: "aarch64"
    _OS: "darwin"
    _PLATFORMSUFFIX: ""
    _WRAPPER: ""
    _XCFLAGS: "-arch arm64"
    _XLDFLAGS: "-arch arm64"
    _BIN_PATH: /Users/videolanci/sandbox/bin

.variables-android-arm: &variables-android-arm
    _TRIPLET: "arm-linux-androideabi"
    _CLANG_TRIPLET: "armv7a-linux-androideabi"
    _ANDROID_VERSION: "21"
    _PLATFORMSUFFIX: ""
    _WRAPPER: ""

.variables-android-aarch64: &variables-android-aarch64
    _TRIPLET: "aarch64-linux-android"
    _CLANG_TRIPLET: "aarch64-linux-android"
    _ANDROID_VERSION: "21"
    _PLATFORMSUFFIX: ""
    _WRAPPER: ""

.build:
    stage: build
    script: |
        set -x
        LOCAL_INSTALL_DIR=`pwd`/local_install
        export PKG_CONFIG_LIBDIR=${LOCAL_INSTALL_DIR}/lib/pkgconfig
        git clone --depth 1 --branch master https://git.ffmpeg.org/ffmpeg.git ffmpeg
        cd ffmpeg
        ./configure --prefix="${LOCAL_INSTALL_DIR}" --enable-pic --disable-debug --disable-programs --disable-doc --disable-avdevice --disable-avfilter --disable-network --disable-encoders --disable-muxers --extra-ldflags="-static"
        make -j$(getconf _NPROCESSORS_ONLN)
        make -j$(getconf _NPROCESSORS_ONLN) install
        cd ..
        git clone --depth 1 --branch master https://github.com/l-smash/l-smash.git lsmash
        cd lsmash
        ./configure --prefix="${LOCAL_INSTALL_DIR}" --extra-ldflags="-static"
        make -j$(getconf _NPROCESSORS_ONLN)
        make -j$(getconf _NPROCESSORS_ONLN) install
        cd ..
        ./configure --enable-pic --enable-strip --extra-ldflags="-static"
        make -j$(getconf _NPROCESSORS_ONLN) x264 checkasm
    artifacts:
        name: "$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
        paths:
            - x264${_PLATFORMSUFFIX}
            - checkasm8${_PLATFORMSUFFIX}
            - checkasm10${_PLATFORMSUFFIX}
            - config.log
        expire_in: 1 week

build-debian-amd64:
    extends: .build
    image: registry.videolan.org/vlc-debian-unstable:20240212151604
    tags:
        - docker
        - amd64
    variables: *variables-debian-amd64

build-debian-aarch64:
    extends: .build
    image: registry.videolan.org/x264-debian-unstable-aarch64:20211206141032
    tags:
        - docker
        - aarch64
    variables: *variables-debian-aarch64

.build-win:
    extends: build-debian-amd64
    image: registry.videolan.org/vlc-debian-llvm-msvcrt:20240212151604
    script: |
        set -x
        LOCAL_INSTALL_DIR=`pwd`/${_TRIPLET}
        export PKGCONFIG=pkg-config
        export PKG_CONFIG_LIBDIR=${LOCAL_INSTALL_DIR}/lib/pkgconfig
        git clone --depth 1 --branch master https://git.ffmpeg.org/ffmpeg.git ffmpeg
        cd ffmpeg
        ./configure --prefix="${LOCAL_INSTALL_DIR}" --enable-cross-compile --arch="${_ARCH}" --target-os="${_OS}" --cross-prefix="${_TRIPLET}-" --enable-pic --disable-debug --disable-programs --disable-doc --disable-avdevice --disable-avfilter --disable-network --disable-encoders --disable-muxers
        make -j$(getconf _NPROCESSORS_ONLN)
        make -j$(getconf _NPROCESSORS_ONLN) install
        cd ..
        git clone --depth 1 --branch master https://github.com/l-smash/l-smash.git lsmash
        cd lsmash
        ./configure --prefix="${LOCAL_INSTALL_DIR}" --target-os="${_TRIPLET}" --cross-prefix="${_TRIPLET}-"
        make -j$(getconf _NPROCESSORS_ONLN)
        make -j$(getconf _NPROCESSORS_ONLN) install
        cd ..
        ./configure --host="${_TRIPLET}" --cross-prefix="${_TRIPLET}-" --enable-pic --enable-strip
        make -j$(getconf _NPROCESSORS_ONLN) x264 checkasm

build-win32:
    extends: .build-win
    variables: *variables-win32

build-win64:
    extends: .build-win
    variables: *variables-win64

.build-llvm-mingw:
    extends: .build
    image: registry.videolan.org/vlc-debian-llvm-ucrt:20240212151604
    tags:
        - docker
        - amd64
    script: |
        set -x
        PKGCONFIG=pkg-config ./configure --host="${_TRIPLET}" --cross-prefix="${_TRIPLET}-" --enable-pic --enable-strip
        make -j$(getconf _NPROCESSORS_ONLN) x264 checkasm

build-llvm-mingw-armv7:
    extends: .build-llvm-mingw
    variables: *variables-win-armv7

build-llvm-mingw-aarch64:
    extends: .build-llvm-mingw
    variables: *variables-win-aarch64

.build-macos:
    extends: .build
    script: |
        set -x
        export PATH="${_BIN_PATH}:$PATH"
        LOCAL_INSTALL_DIR=`pwd`/${_TRIPLET}
        export PKG_CONFIG_LIBDIR=${LOCAL_INSTALL_DIR}/lib/pkgconfig
        git clone --depth 1 --branch master https://git.ffmpeg.org/ffmpeg.git ffmpeg
        cd ffmpeg
        ./configure --prefix="${LOCAL_INSTALL_DIR}" --enable-cross-compile --arch="${_ARCH}" --target-os="${_OS}" --extra-cflags="${_XCFLAGS}" --extra-ldflags="${_XLDFLAGS}" --enable-pic --disable-debug --disable-programs --disable-doc --disable-avdevice --disable-avfilter --disable-network --disable-encoders --disable-muxers
        make -j$(getconf _NPROCESSORS_ONLN)
        make -j$(getconf _NPROCESSORS_ONLN) install
        cd ..
        git clone --depth 1 --branch master https://github.com/l-smash/l-smash.git lsmash
        cd lsmash
        ./configure --prefix="${LOCAL_INSTALL_DIR}" --target-os="${_TRIPLET}" --extra-cflags="${_XCFLAGS}" --extra-ldflags="${_XLDFLAGS}"
        make -j$(getconf _NPROCESSORS_ONLN)
        make -j$(getconf _NPROCESSORS_ONLN) install
        cd ..
        ./configure --host="${_TRIPLET}" --enable-pic --enable-strip
        make -j$(getconf _NPROCESSORS_ONLN) x264 checkasm

build-macos-x86_64:
    extends: .build-macos
    tags:
        - amd64
        - monterey
    variables: *variables-macos-x86_64

build-macos-arm64:
    extends: .build-macos
    tags:
        - amd64
        - monterey
    variables: *variables-macos-arm64

.build-android:
    extends: .build
    image: registry.videolan.org/vlc-debian-android:20241118101328
    tags:
        - docker
        - amd64
    script: |
        set -x
        CC=${_CLANG_TRIPLET}${_ANDROID_VERSION}-clang AR=llvm-ar RANLIB=llvm-ranlib STRIP=llvm-strip PKGCONFIG=pkg-config ./configure --host="${_TRIPLET}" --enable-pic --enable-strip
        make -j$(getconf _NPROCESSORS_ONLN) x264 checkasm

build-android-arm:
    extends: .build-android
    variables: *variables-android-arm

build-android-aarch64:
    extends: .build-android
    variables: *variables-android-aarch64

.test: &test
    stage: test
    script: |
        set -x
        ${_WRAPPER} ./checkasm8${_PLATFORMSUFFIX}
        ${_WRAPPER} ./checkasm10${_PLATFORMSUFFIX}
    artifacts:
        expire_in: 10 minutes

test-debian-amd64:
    <<: *test
    extends: build-debian-amd64
    dependencies:
        - build-debian-amd64
    variables: *variables-debian-amd64

test-debian-aarch64:
    <<: *test
    extends: build-debian-aarch64
    dependencies:
        - build-debian-aarch64
    variables: *variables-debian-aarch64

test-win32:
    <<: *test
    extends: build-win32
    dependencies:
        - build-win32
    variables: *variables-win32

test-win64:
    <<: *test
    extends: build-win64
    dependencies:
        - build-win64
    variables: *variables-win64

test-macos-x86_64:
    <<: *test
    extends: build-macos-x86_64
    dependencies:
        - build-macos-x86_64
    variables: *variables-macos-x86_64

test-aarch64-qemu:
    <<: *test
    extends: build-debian-amd64
    image: registry.videolan.org/x264-debian-unstable:20231113190916
    dependencies:
        - build-debian-aarch64
    variables: *variables-debian-amd64
    script: |
        set -x
        for size in 128 256 512 1024 2048; do
            for tool in checkasm8 checkasm10; do
                qemu-aarch64 -cpu max,sve-default-vector-length=256,sve$size=on -L /usr/aarch64-linux-gnu ./$tool
            done
        done

.release: &release
    stage: release
    script: |
        set -x
        _VERSION=$(./version.sh | grep _VERSION -| cut -d\  -f4-| sed 's, ,-,g' | sed 's,",,')
        mv x264${_PLATFORMSUFFIX} x264-${_VERSION}${_PLATFORMSUFFIX}
    when: manual
    only:
        - master@videolan/x264
        - stable@videolan/x264
    artifacts:
        name: "$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
        paths:
            - x264-*${_PLATFORMSUFFIX}
        expire_in: '10 minutes'

release-debian-amd64:
    <<: *release
    extends: build-debian-amd64
    dependencies:
        - build-debian-amd64
    variables: *variables-debian-amd64

release-debian-aarch64:
    <<: *release
    extends: build-debian-aarch64
    dependencies:
        - build-debian-aarch64
    variables: *variables-debian-aarch64

release-win32:
    <<: *release
    extends: build-win32
    dependencies:
        - build-win32
    variables: *variables-win32

release-win64:
    <<: *release
    extends: build-win64
    dependencies:
        - build-win64
    variables: *variables-win64

release-macos-x86_64:
    <<: *release
    extends: build-macos-x86_64
    dependencies:
        - build-macos-x86_64
    variables: *variables-macos-x86_64

release-macos-arm64:
    <<: *release
    extends: build-macos-arm64
    dependencies:
        - build-macos-arm64
    variables: *variables-macos-arm64


================================================
FILE: AUTHORS
================================================
# Contributors to x264
#
# The format of this file was inspired by the Linux kernel CREDITS file.
# Authors are listed alphabetically.
#
# The fields are: name (N), email (E), web-address (W), CVS account login (C),
# PGP key ID and fingerprint (P), description (D), and snail-mail address (S).

N: Alex Izvorski
E: aizvorski AT gmail DOT com
D: x86 asm (sse2)

N: Alex Wright
E: alexw0885 AT gmail DOT com
D: Motion estimation (subpel and mixed refs)
D: B-RDO

N: bobololo
D: Avisynth input
D: MP4 muxing

N: Christian Heine
E: sennindemokrit AT gmx DOT net
D: x86 asm

N: David Wolstencroft
D: Altivec optimizations

N: Eric Petit
E: eric.petit AT lapsus DOT org
C: titer
D: Altivec asm
D: BeOS and MacOS X ports.
S: France

N: Fiona Glaser
E: fiona AT x264 DOT com
D: Maintainer
D: All areas of encoder analysis and algorithms
D: Motion estimation, rate control, macroblock & frame decisions, RDO, etc
D: x86 asm
S: USA

N: Gabriel Bouvigne
E: bouvigne AT mp3-tech DOT org
D: 2pass VBV

N: Guillaume Poirier
E: gpoirier CHEZ mplayerhq POINT hu
D: Altivec optimizations
S: Brittany, France

N: Henrik Gramner
E: henrik AT gramner DOT com
D: 4:2:2 chroma subsampling, x86 asm, Windows improvements, bugfixes
S: Sweden

N: Laurent Aimar
E: fenrir AT videolan DOT org
C: fenrir
D: Initial import, former maintainer
D: x86 asm (mmx/mmx2)
S: France

N: Loren Merritt
E: pengvado AT akuvian DOT org
C: pengvado
D: Maintainer
D: All areas of encoder analysis and algorithms
D: Motion estimation, rate control, macroblock & frame decisions, RDO, etc
D: Multithreading
D: x86 asm
S: USA

N: Mans Rullgard
E: mru AT mansr DOT com
C: mru
D: Rate control
S: Southampton, UK

N: Michael Niedermayer
E: michaelni AT gmx DOT at
D: Rate control

N: Mike Matsnev
E: mike AT po DOT cs DOT msu DOT su
D: Matroska muxing

N: Min Chen
E: chenm001 AT 163 DOT com
C: chenm001
D: Win32/VC 6.0 port
D: gcc asm to nasm conversion
S: China

N: Radek Czyz
E: radoslaw AT syskin DOT cjb DOT net
D: Cached motion compensation



================================================
FILE: COPYING
================================================
		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

		    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

			    NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

		     END OF TERMS AND CONDITIONS

	    How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year  name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.


================================================
FILE: Makefile
================================================
# Makefile

include config.mak

vpath %.c $(SRCPATH)
vpath %.h $(SRCPATH)
vpath %.S $(SRCPATH)
vpath %.asm $(SRCPATH)
vpath %.rc $(SRCPATH)
vpath %.manifest $(SRCPATH)

CFLAGS += $(CFLAGSPROF)
LDFLAGS += $(LDFLAGSPROF)

GENERATED =

all: default
default:

SRCS = common/osdep.c common/base.c common/cpu.c common/tables.c \
       encoder/api.c

SRCS_X = common/mc.c common/predict.c common/pixel.c common/macroblock.c \
         common/frame.c common/dct.c common/cabac.c \
         common/common.c common/rectangle.c \
         common/set.c common/quant.c common/deblock.c common/vlc.c \
         common/mvpred.c common/bitstream.c \
         encoder/analyse.c encoder/me.c encoder/ratecontrol.c \
         encoder/set.c encoder/macroblock.c encoder/cabac.c \
         encoder/cavlc.c encoder/encoder.c encoder/lookahead.c

SRCS_8 =

SRCCLI = x264.c autocomplete.c input/input.c input/timecode.c input/raw.c \
         input/y4m.c output/raw.c output/matroska.c output/matroska_ebml.c \
         output/flv.c output/flv_bytestream.c filters/filters.c \
         filters/video/video.c filters/video/source.c filters/video/internal.c \
         filters/video/resize.c filters/video/fix_vfr_pts.c \
         filters/video/select_every.c filters/video/crop.c

SRCCLI_X = filters/video/cache.c filters/video/depth.c

SRCSO =

SRCCHK_X = tools/checkasm.c

SRCEXAMPLE = example.c

OBJS =
OBJASM =
OBJSO =
OBJCLI =
OBJCHK =
OBJCHK_8 =
OBJCHK_10 =
OBJEXAMPLE =

CONFIG := $(shell cat config.h)

# Optional module sources
ifneq ($(findstring HAVE_AVS 1, $(CONFIG)),)
SRCCLI += input/avs.c
endif

ifneq ($(findstring HAVE_THREAD 1, $(CONFIG)),)
SRCS_X   += common/threadpool.c
SRCCLI_X += input/thread.c
endif

ifneq ($(findstring HAVE_WIN32THREAD 1, $(CONFIG)),)
SRCS += common/win32thread.c
endif

ifneq ($(findstring HAVE_LAVF 1, $(CONFIG)),)
SRCCLI += input/lavf.c
endif

ifneq ($(findstring HAVE_FFMS 1, $(CONFIG)),)
SRCCLI += input/ffms.c
endif

ifneq ($(findstring HAVE_GPAC 1, $(CONFIG)),)
SRCCLI += output/mp4.c
endif

ifneq ($(findstring HAVE_LSMASH 1, $(CONFIG)),)
SRCCLI += output/mp4_lsmash.c
endif

ifneq ($(AS),)

# MMX/SSE optims
SRCASM_X =
ifeq ($(SYS_ARCH),X86)
ARCH_X86 = yes
SRCASM_X += common/x86/dct-32.asm \
            common/x86/pixel-32.asm
endif
ifeq ($(SYS_ARCH),X86_64)
ARCH_X86 = yes
SRCASM_X += common/x86/dct-64.asm \
            common/x86/trellis-64.asm
endif

ifdef ARCH_X86
SRCASM_X += common/x86/bitstream-a.asm \
            common/x86/const-a.asm \
            common/x86/cabac-a.asm \
            common/x86/dct-a.asm \
            common/x86/deblock-a.asm \
            common/x86/mc-a.asm \
            common/x86/mc-a2.asm \
            common/x86/pixel-a.asm \
            common/x86/predict-a.asm \
            common/x86/quant-a.asm
SRCS_X   += common/x86/mc-c.c \
            common/x86/predict-c.c

OBJASM += common/x86/cpu-a.o
ifneq ($(findstring HAVE_BITDEPTH8 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.asm=%-8.o) common/x86/sad-a-8.o
endif
ifneq ($(findstring HAVE_BITDEPTH10 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.asm=%-10.o) common/x86/sad16-a-10.o
endif

OBJCHK += tools/checkasm-a.o
endif

# AltiVec optims
ifeq ($(SYS_ARCH),PPC)
SRCS_X += common/ppc/dct.c \
          common/ppc/deblock.c \
          common/ppc/mc.c \
          common/ppc/pixel.c \
          common/ppc/predict.c \
          common/ppc/quant.c
endif

# NEON optims
ifeq ($(SYS_ARCH),ARM)
SRCASM_X  = common/arm/bitstream-a.S \
            common/arm/dct-a.S \
            common/arm/deblock-a.S \
            common/arm/mc-a.S \
            common/arm/pixel-a.S \
            common/arm/predict-a.S \
            common/arm/quant-a.S
SRCS_X   += common/arm/mc-c.c \
            common/arm/predict-c.c

OBJASM += common/arm/cpu-a.o
ifneq ($(findstring HAVE_BITDEPTH8 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-8.o)
endif
ifneq ($(findstring HAVE_BITDEPTH10 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-10.o)
endif

OBJCHK += tools/checkasm-arm.o
endif

# AArch64 NEON and SVE/SVE2 optims
ifeq ($(SYS_ARCH),AARCH64)
SRCASM_X  = common/aarch64/bitstream-a.S \
            common/aarch64/cabac-a.S \
            common/aarch64/dct-a.S \
            common/aarch64/deblock-a.S \
            common/aarch64/mc-a.S \
            common/aarch64/pixel-a.S \
            common/aarch64/predict-a.S \
            common/aarch64/quant-a.S
ifneq ($(findstring HAVE_SVE 1, $(CONFIG)),)
SRCASM_X += common/aarch64/dct-a-sve.S \
            common/aarch64/deblock-a-sve.S \
            common/aarch64/mc-a-sve.S \
            common/aarch64/pixel-a-sve.S
endif
ifneq ($(findstring HAVE_SVE2 1, $(CONFIG)),)
SRCASM_X += common/aarch64/dct-a-sve2.S
endif
SRCS_X   += common/aarch64/asm-offsets.c \
            common/aarch64/mc-c.c \
            common/aarch64/predict-c.c

OBJASM +=
ifneq ($(findstring HAVE_BITDEPTH8 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-8.o)
endif
ifneq ($(findstring HAVE_BITDEPTH10 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-10.o)
endif

OBJCHK += tools/checkasm-aarch64.o
endif

# RISCV64 RVV optims
ifeq ($(SYS_ARCH),RISCV64)
ifneq ($(findstring HAVE_RVV 1, $(CONFIG)),)
SRCASM_X =

SRCS_X  +=

OBJASM +=
ifneq ($(findstring HAVE_BITDEPTH8 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-8.o)
endif
ifneq ($(findstring HAVE_BITDEPTH10 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-10.o)
endif

OBJCHK +=
endif
endif

# MSA optims
ifeq ($(SYS_ARCH),MIPS)
ifneq ($(findstring HAVE_MSA 1, $(CONFIG)),)
SRCS_X += common/mips/dct-c.c \
          common/mips/deblock-c.c \
          common/mips/mc-c.c \
          common/mips/pixel-c.c \
          common/mips/predict-c.c \
          common/mips/quant-c.c
endif
endif

# LOONGARCH optimization
ifeq ($(SYS_ARCH),LOONGARCH)
ifneq ($(findstring HAVE_LSX 1, $(CONFIG)),)
SRCASM_X += common/loongarch/deblock-a.S \
            common/loongarch/sad-a.S \
            common/loongarch/predict-a.S \
            common/loongarch/quant-a.S \
            common/loongarch/mc-a.S \
            common/loongarch/dct-a.S \
            common/loongarch/pixel-a.S

SRCS_X += common/loongarch/predict-c.c \
          common/loongarch/mc-c.c \
          common/loongarch/pixel-c.c

OBJASM +=
ifneq ($(findstring HAVE_BITDEPTH8 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-8.o)
endif
ifneq ($(findstring HAVE_BITDEPTH10 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-10.o)
endif

OBJCHK += tools/checkasm-loongarch.o
endif
endif

endif

ifneq ($(HAVE_GETOPT_LONG),1)
SRCCLI += extras/getopt.c
endif

ifeq ($(SYS),WINDOWS)
OBJCLI += $(if $(RC), x264res.o)
ifneq ($(SONAME),)
SRCSO  += x264dll.c
OBJSO  += $(if $(RC), x264res.dll.o)
endif
endif

ifeq ($(HAVE_OPENCL),yes)
common/oclobj.h: common/opencl/x264-cl.h $(wildcard $(SRCPATH)/common/opencl/*.cl)
	cat $^ | $(SRCPATH)/tools/cltostr.sh $@
GENERATED += common/oclobj.h
SRCS_8 += common/opencl.c encoder/slicetype-cl.c
endif

OBJS   += $(SRCS:%.c=%.o)
OBJCLI += $(SRCCLI:%.c=%.o)
OBJSO  += $(SRCSO:%.c=%.o)
OBJEXAMPLE += $(SRCEXAMPLE:%.c=%.o)

ifneq ($(findstring HAVE_BITDEPTH8 1, $(CONFIG)),)
OBJS      += $(SRCS_X:%.c=%-8.o) $(SRCS_8:%.c=%-8.o)
OBJCLI    += $(SRCCLI_X:%.c=%-8.o)
OBJCHK_8  += $(SRCCHK_X:%.c=%-8.o)
checkasm: checkasm8$(EXE)
endif
ifneq ($(findstring HAVE_BITDEPTH10 1, $(CONFIG)),)
OBJS      += $(SRCS_X:%.c=%-10.o)
OBJCLI    += $(SRCCLI_X:%.c=%-10.o)
OBJCHK_10 += $(SRCCHK_X:%.c=%-10.o)
checkasm: checkasm10$(EXE)
endif

.PHONY: all default fprofiled clean distclean install install-* uninstall cli lib-* checkasm etags

cli: x264$(EXE)
lib-static: $(LIBX264)
lib-shared: $(SONAME)

$(LIBX264): $(OBJS) $(OBJASM)
	rm -f $(LIBX264)
	$(AR)$@ $(OBJS) $(OBJASM)
	$(if $(RANLIB), $(RANLIB) $@)

$(SONAME): $(OBJS) $(OBJASM) $(OBJSO)
	$(LD)$@ $(OBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS)

$(IMPLIBNAME): $(SONAME)

ifneq ($(EXE),)
.PHONY: x264 checkasm8 checkasm10 example
x264: x264$(EXE)
checkasm8: checkasm8$(EXE)
checkasm10: checkasm10$(EXE)
example: example$(EXE)
endif

x264$(EXE): $(OBJCLI) $(CLI_LIBX264)
	$(LD)$@ $(OBJCLI) $(CLI_LIBX264) $(LDFLAGSCLI) $(LDFLAGS)

checkasm8$(EXE): $(OBJCHK) $(OBJCHK_8) $(LIBX264)
	$(LD)$@ $(OBJCHK) $(OBJCHK_8) $(LIBX264) $(LDFLAGS)

checkasm10$(EXE): $(OBJCHK) $(OBJCHK_10) $(LIBX264)
	$(LD)$@ $(OBJCHK) $(OBJCHK_10) $(LIBX264) $(LDFLAGS)

example$(EXE): $(OBJEXAMPLE) $(LIBX264)
	$(LD)$@ $(OBJEXAMPLE) $(LIBX264) $(LDFLAGS)

$(OBJS) $(OBJSO): CFLAGS += $(CFLAGSSO)
$(OBJCLI): CFLAGS += $(CFLAGSCLI)

ALLOBJS = $(OBJS) $(OBJASM) $(OBJSO) $(OBJCLI) $(OBJCHK) $(OBJCHK_8) $(OBJCHK_10) $(OBJEXAMPLE)
$(ALLOBJS): $(GENERATED)

%.o: %.c
	$(DEPCMD)
	$(CC) $(CFLAGS) -c $< $(CC_O) $(DEPFLAGS)

%-8.o: %.c
	$(DEPCMD)
	$(CC) $(CFLAGS) -c $< $(CC_O) $(DEPFLAGS) -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8

%-10.o: %.c
	$(DEPCMD)
	$(CC) $(CFLAGS) -c $< $(CC_O) $(DEPFLAGS) -DHIGH_BIT_DEPTH=1 -DBIT_DEPTH=10

%.o: %.asm common/x86/x86inc.asm common/x86/x86util.asm
	$(AS) $(ASFLAGS) -o $@ $< -MD $(@:.o=.d)
	-@ $(if $(STRIP), $(STRIP) -x $@) # delete local/anonymous symbols, so they don't show up in oprofile

%-8.o: %.asm common/x86/x86inc.asm common/x86/x86util.asm
	$(AS) $(ASFLAGS) -o $@ $< -MD $(@:.o=.d) -DBIT_DEPTH=8 -Dprivate_prefix=x264_8
	-@ $(if $(STRIP), $(STRIP) -x $@)

%-10.o: %.asm common/x86/x86inc.asm common/x86/x86util.asm
	$(AS) $(ASFLAGS) -o $@ $< -MD $(@:.o=.d) -DBIT_DEPTH=10 -Dprivate_prefix=x264_10
	-@ $(if $(STRIP), $(STRIP) -x $@)

%.o: %.S
	$(DEPCMD)
	$(AS) $(ASFLAGS) -o $@ $< $(DEPFLAGS)
	-@ $(if $(STRIP), $(STRIP) -x $@) # delete local/anonymous symbols, so they don't show up in oprofile

%-8.o: %.S
	$(DEPCMD)
	$(AS) $(ASFLAGS) -o $@ $< $(DEPFLAGS) -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
	-@ $(if $(STRIP), $(STRIP) -x $@)

%-10.o: %.S
	$(DEPCMD)
	$(AS) $(ASFLAGS) -o $@ $< $(DEPFLAGS) -DHIGH_BIT_DEPTH=1 -DBIT_DEPTH=10
	-@ $(if $(STRIP), $(STRIP) -x $@)

%.dll.o: %.rc x264.h
	$(RC) $(RCFLAGS)$@ -DDLL $<

%.o: %.rc x264.h x264res.manifest
	$(RC) $(RCFLAGS)$@ $<

config.mak:
	./configure

# This is kept as a no-op
depend:
	@echo "make depend" is handled implicitly now

-include $(wildcard $(ALLOBJS:.o=.d))

# Dummy rule to avoid failing, if the dependency files specify dependencies on
# a removed .h file.
%.h:
	@:

OBJPROF = $(OBJS) $(OBJSO) $(OBJCLI)
# These should cover most of the important codepaths
OPT0 = --crf 30 -b1 -m1 -r1 --me dia --no-cabac --direct temporal --ssim --no-weightb
OPT1 = --crf 16 -b2 -m3 -r3 --me hex --no-8x8dct --direct spatial --no-dct-decimate -t0  --slice-max-mbs 50
OPT2 = --crf 26 -b4 -m5 -r2 --me hex --cqm jvt --nr 100 --psnr --no-mixed-refs --b-adapt 2 --slice-max-size 1500
OPT3 = --crf 18 -b3 -m9 -r5 --me umh -t1 -A all --b-pyramid normal --direct auto --no-fast-pskip --no-mbtree
OPT4 = --crf 22 -b3 -m7 -r4 --me esa -t2 -A all --psy-rd 1.0:1.0 --slices 4
OPT5 = --frames 50 --crf 24 -b3 -m10 -r3 --me tesa -t2
OPT6 = --frames 50 -q0 -m9 -r2 --me hex -Aall
OPT7 = --frames 50 -q0 -m2 -r1 --me hex --no-cabac

ifeq (,$(VIDS))
fprofiled:
	@echo 'usage: make fprofiled VIDS="infile1 infile2 ..."'
	@echo 'where infiles are anything that x264 understands,'
	@echo 'i.e. YUV with resolution in the filename, y4m, or avisynth.'
else
fprofiled: clean
	$(MAKE) x264$(EXE) CFLAGSPROF="$(PROF_GEN_CC)" LDFLAGSPROF="$(PROF_GEN_LD)"
	$(foreach V, $(VIDS), $(foreach I, 0 1 2 3 4 5 6 7, ./x264$(EXE) $(OPT$I) --threads 1 $(V) -o $(DEVNULL) ;))
ifeq ($(COMPILER),CL)
# Because Visual Studio timestamps the object files within the PGD, it fails to build if they change - only the executable should be deleted
	rm -f x264$(EXE)
else
	rm -f $(OBJPROF)
endif
	$(MAKE) CFLAGSPROF="$(PROF_USE_CC)" LDFLAGSPROF="$(PROF_USE_LD)"
	rm -f $(OBJPROF:%.o=%.gcda) $(OBJPROF:%.o=%.gcno) *.dyn pgopti.dpi pgopti.dpi.lock *.pgd *.pgc
endif

clean:
	rm -f $(OBJS) $(OBJASM) $(OBJCLI) $(OBJSO) $(GENERATED) TAGS
	rm -f $(SONAME) *.a *.lib *.exp *.pdb x264$(EXE) x264_lookahead.clbin
	rm -f checkasm8$(EXE) checkasm10$(EXE) $(OBJCHK) $(OBJCHK_8) $(OBJCHK_10)
	rm -f example$(EXE) $(OBJEXAMPLE)
	rm -f $(OBJPROF:%.o=%.gcda) $(OBJPROF:%.o=%.gcno) *.dyn pgopti.dpi pgopti.dpi.lock *.pgd *.pgc
	rm -f $(ALLOBJS:%.o=%.d)

distclean: clean
	rm -f config.mak x264_config.h config.h config.log x264.pc x264.def
	rm -rf conftest*

install-cli: cli
	$(INSTALL) -d $(DESTDIR)$(bindir)
	$(INSTALL) x264$(EXE) $(DESTDIR)$(bindir)

install-lib-dev:
	$(INSTALL) -d $(DESTDIR)$(includedir)
	$(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
	$(INSTALL) -m 644 $(SRCPATH)/x264.h x264_config.h $(DESTDIR)$(includedir)
	$(INSTALL) -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig

install-lib-static: lib-static install-lib-dev
	$(INSTALL) -d $(DESTDIR)$(libdir)
	$(INSTALL) -m 644 $(LIBX264) $(DESTDIR)$(libdir)
	$(if $(RANLIB), $(RANLIB) $(DESTDIR)$(libdir)/$(LIBX264))

install-lib-shared: lib-shared install-lib-dev
	$(INSTALL) -d $(DESTDIR)$(libdir)
ifneq ($(IMPLIBNAME),)
	$(INSTALL) -d $(DESTDIR)$(bindir)
	$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(bindir)
	$(INSTALL) -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir)
else ifneq ($(SONAME),)
	ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
	$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(libdir)
endif

install-bashcompletion:
ifneq ($(BASHCOMPLETIONSDIR),)
	$(INSTALL) -d $(DESTDIR)$(BASHCOMPLETIONSDIR)
	$(INSTALL) -m 644 $(SRCPATH)/tools/bash-autocomplete.sh $(DESTDIR)$(BASHCOMPLETIONSDIR)/x264
endif

uninstall:
	rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(includedir)/x264_config.h $(DESTDIR)$(libdir)/libx264.a
	rm -f $(DESTDIR)$(bindir)/x264$(EXE) $(DESTDIR)$(libdir)/pkgconfig/x264.pc
ifneq ($(IMPLIBNAME),)
	rm -f $(DESTDIR)$(bindir)/$(SONAME) $(DESTDIR)$(libdir)/$(IMPLIBNAME)
else ifneq ($(SONAME),)
	rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
endif
ifneq ($(BASHCOMPLETIONSDIR),)
	rm -f $(DESTDIR)$(BASHCOMPLETIONSDIR)/x264
endif

etags TAGS:
	etags $(SRCS) $(SRCS_X) $(SRCS_8)


================================================
FILE: autocomplete.c
================================================
/*****************************************************************************
 * autocomplete: x264cli shell autocomplete
 *****************************************************************************
 * Copyright (C) 2018-2025 x264 project
 *
 * Authors: Henrik Gramner <henrik@gramner.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "x264cli.h"
#include "input/input.h"

#if HAVE_LAVF
#undef DECLARE_ALIGNED
#include <libavformat/avformat.h>
#include <libavutil/pixdesc.h>
#endif

static const char * const level_names[] =
{
    "1", "1.1", "1.2", "1.3", "1b",
    "2", "2.1", "2.2",
    "3", "3.1", "3.2",
    "4", "4.1", "4.2",
    "5", "5.1", "5.2",
    "6", "6.1", "6.2",
    NULL
};

/* Options requiring a value for which we provide suggestions. */
static const char * const opts_suggest[] =
{
    "--alternative-transfer",
    "--aq-mode",
    "--asm",
    "--avcintra-class",
    "--avcintra-flavor",
    "--b-adapt",
    "--b-pyramid",
    "--colormatrix",
    "--colorprim",
    "--cqm",
    "--demuxer",
    "--direct",
    "--frame-packing",
    "--input-csp",
    "--input-fmt",
    "--input-range",
    "--level",
    "--log-level",
    "--me",
    "--muxer",
    "--nal-hrd",
    "--output-csp",
    "--overscan",
    "--pass", "-p",
    "--preset",
    "--profile",
    "--pulldown",
    "--range",
    "--subme", "-m",
    "--transfer",
    "--trellis", "-t",
    "--tune",
    "--videoformat",
    "--weightp",
    NULL
};

/* Options requiring a value for which we don't provide suggestions. */
static const char * const opts_nosuggest[] =
{
    "--b-bias",
    "--bframes", "-b",
    "--deblock", "-f",
    "--bitrate", "-B",
    "--chroma-qp-offset",
    "--chromaloc",
    "--cplxblur",
    "--cqm4",
    "--cqm4i",
    "--cqm4ic",
    "--cqm4iy",
    "--cqm4p",
    "--cqm4pc",
    "--cqm4py",
    "--cqm8",
    "--cqm8i",
    "--cqm8p",
    "--crf",
    "--crf-max",
    "--crop-rect",
    "--deadzone-inter",
    "--deadzone-intra",
    "--fps",
    "--frames",
    "--input-depth",
    "--input-res",
    "--ipratio",
    "--keyint", "-I",
    "--lookahead-threads",
    "--mastering-display",
    "--cll",
    "--merange",
    "--min-keyint", "-i",
    "--mvrange",
    "--mvrange-thread",
    "--nr",
    "--opencl-device",
    "--output-depth",
    "--partitions", "-A",
    "--pbratio",
    "--psy-rd",
    "--qblur",
    "--qcomp",
    "--qp", "-q",
    "--qpmax",
    "--qpmin",
    "--qpstep",
    "--ratetol",
    "--ref", "-r",
    "--rc-lookahead",
    "--sar",
    "--scenecut",
    "--seek",
    "--slices",
    "--slices-max",
    "--slice-max-size",
    "--slice-max-mbs",
    "--slice-min-mbs",
    "--sps-id",
    "--sync-lookahead",
    "--threads",
    "--timebase",
    "--vbv-bufsize",
    "--vbv-init",
    "--vbv-maxrate",
    "--video-filter", "--vf",
    "--zones",
    NULL
};

/* Options requiring a filename. */
static const char * const opts_filename[] =
{
    "--cqmfile",
    "--dump-yuv",
    "--index",
    "--opencl-clbin",
    "--output", "-o",
    "--qpfile",
    "--stats",
    "--tcfile-in",
    "--tcfile-out",
    NULL
};

/* Options without an associated value. */
static const char * const opts_standalone[] =
{
    "--8x8dct",
    "--aud",
    "--bff",
    "--bluray-compat",
    "--cabac",
    "--constrained-intra",
    "--cpu-independent",
    "--dts-compress",
    "--fake-interlaced",
    "--fast-pskip",
    "--filler",
    "--force-cfr",
    "--mbtree",
    "--mixed-refs",
    "--no-8x8dct",
    "--no-asm",
    "--no-cabac",
    "--no-chroma-me",
    "--no-dct-decimate",
    "--no-deblock",
    "--no-fast-pskip",
    "--no-mbtree",
    "--no-mixed-refs",
    "--no-progress",
    "--no-psy",
    "--no-scenecut",
    "--no-weightb",
    "--non-deterministic",
    "--open-gop",
    "--opencl",
    "--pic-struct",
    "--psnr",
    "--quiet",
    "--sliced-threads",
    "--slow-firstpass",
    "--ssim",
    "--stitchable",
    "--tff",
    "--thread-input",
    "--verbose", "-v",
    "--weightb",
    NULL
};

/* Options which shouldn't be suggested in combination with other options. */
static const char * const opts_special[] =
{
    "--fullhelp",
    "--help", "-h",
    "--longhelp",
    "--version",
    NULL
};

static int list_contains( const char * const *list, const char *s )
{
    if( *s )
        for( ; *list; list++ )
            if( !strcmp( *list, s ) )
                return 1;
    return 0;
}

static void suggest( const char *s, const char *cur, int cur_len )
{
    if( s && *s && !strncmp( s, cur, cur_len ) )
        printf( "%s ", s );
}

static void suggest_lower( const char *s, const char *cur, int cur_len )
{
    if( s && *s && !strncasecmp( s, cur, cur_len ) )
    {
        for( ; *s; s++ )
            putchar( *s < 'A' || *s > 'Z' ? *s : *s | 0x20 );
        putchar( ' ' );
    }
}

static void suggest_num_range( int start, int end, const char *cur, int cur_len )
{
    char buf[16];
    for( int i = start; i <= end; i++ )
    {
        snprintf( buf, sizeof( buf ), "%d", i );
        suggest( buf, cur, cur_len );
    }
}

#if HAVE_LAVF
/* Suggest each token in a string separated by delimiters. */
static void suggest_token( const char *s, int delim, const char *cur, int cur_len )
{
    if( s && *s )
    {
        for( const char *tok_end; (tok_end = strchr( s, delim )); s = tok_end + 1 )
        {
            int tok_len = tok_end - s;
            if( tok_len && tok_len >= cur_len && !strncmp( s, cur, cur_len ) )
                printf( "%.*s ", tok_len, s );
        }
        suggest( s, cur, cur_len );
    }
}
#endif

#define OPT( opt ) else if( !strcmp( prev, opt ) )
#define OPT2( opt1, opt2 ) else if( !strcmp( prev, opt1 ) || !strcmp( prev, opt2 ) )
#define OPT_TYPE( type ) list_contains( opts_##type, prev )

#define suggest( s ) suggest( s, cur, cur_len )
#define suggest_lower( s ) suggest_lower( s, cur, cur_len )
#define suggest_list( list ) for( const char * const *s = list; *s; s++ ) suggest( *s )
#define suggest_num_range( start, end ) suggest_num_range( start, end, cur, cur_len )
#define suggest_token( s, delim ) suggest_token( s, delim, cur, cur_len )

int x264_cli_autocomplete( const char *prev, const char *cur )
{
    int cur_len = strlen( cur );
    if( 0 );
    OPT( "--alternative-transfer" )
        suggest_list( x264_transfer_names );
    OPT( "--aq-mode" )
        suggest_num_range( 0, 3 );
    OPT( "--asm" )
        for( const x264_cpu_name_t *cpu = x264_cpu_names; cpu->flags; cpu++ )
            suggest_lower( cpu->name );
    OPT( "--avcintra-class" )
        suggest_list( x264_avcintra_class_names );
    OPT( "--avcintra-flavor" )
        suggest_list( x264_avcintra_flavor_names );
    OPT( "--b-adapt" )
        suggest_num_range( 0, 2 );
    OPT( "--b-pyramid" )
        suggest_list( x264_b_pyramid_names );
    OPT( "--colormatrix" )
        suggest_list( x264_colmatrix_names );
    OPT( "--colorprim" )
        suggest_list( x264_colorprim_names );
    OPT( "--cqm" )
        suggest_list( x264_cqm_names );
    OPT( "--demuxer" )
        suggest_list( x264_demuxer_names );
    OPT( "--direct" )
        suggest_list( x264_direct_pred_names );
    OPT( "--frame-packing" )
        suggest_num_range( 0, 7 );
    OPT( "--input-csp" )
    {
        for( int i = X264_CSP_NONE+1; i < X264_CSP_CLI_MAX; i++ )
            suggest( x264_cli_csps[i].name );
#if HAVE_LAVF
        for( const AVPixFmtDescriptor *d = NULL; (d = av_pix_fmt_desc_next( d )); )
            suggest( d->name );
#endif
    }
    OPT( "--input-fmt" )
    {
#if HAVE_LAVF
        void *i = NULL;
        for( const AVInputFormat *f; (f = av_demuxer_iterate( &i )); )
            suggest_token( f->name, ',' );
#endif
    }
    OPT( "--input-range" )
        suggest_list( x264_range_names );
    OPT( "--level" )
        suggest_list( level_names );
    OPT( "--log-level" )
        suggest_list( x264_log_level_names );
    OPT( "--me" )
        suggest_list( x264_motion_est_names );
    OPT( "--muxer" )
        suggest_list( x264_muxer_names );
    OPT( "--nal-hrd" )
        suggest_list( x264_nal_hrd_names );
    OPT( "--output-csp" )
        suggest_list( x264_output_csp_names );
    OPT( "--output-depth" )
    {
#if HAVE_BITDEPTH8
        suggest( "8" );
#endif
#if HAVE_BITDEPTH10
        suggest( "10" );
#endif
    }
    OPT( "--overscan" )
        suggest_list( x264_overscan_names );
    OPT2( "--partitions", "-A" )
        suggest_list( x264_partition_names );
    OPT2( "--pass", "-p" )
        suggest_num_range( 1, 3 );
    OPT( "--preset" )
        suggest_list( x264_preset_names );
    OPT( "--profile" )
        suggest_list( x264_valid_profile_names );
    OPT( "--pulldown" )
        suggest_list( x264_pulldown_names );
    OPT( "--range" )
        suggest_list( x264_range_names );
    OPT2( "--subme", "-m" )
        suggest_num_range( 0, 11 );
    OPT( "--transfer" )
        suggest_list( x264_transfer_names );
    OPT2( "--trellis", "-t" )
        suggest_num_range( 0, 2 );
    OPT( "--tune" )
        suggest_list( x264_tune_names );
    OPT( "--videoformat" )
        suggest_list( x264_vidformat_names );
    OPT( "--weightp" )
        suggest_num_range( 0, 2 );
    else if( !OPT_TYPE( nosuggest ) && !OPT_TYPE( special ) )
    {
        if( OPT_TYPE( filename ) || strncmp( cur, "--", 2 ) )
            return 1; /* Fall back to default shell filename autocomplete. */

        /* Suggest options. */
        suggest_list( opts_suggest );
        suggest_list( opts_nosuggest );
        suggest_list( opts_filename );
        suggest_list( opts_standalone );

        /* Only suggest special options if no other options have been specified. */
        if( !*prev )
            suggest_list( opts_special );
    }

    putchar( '\n' );
    return 0;
}


================================================
FILE: common/aarch64/asm-offsets.c
================================================
/*****************************************************************************
 * asm-offsets.c: check asm offsets for aarch64
 *****************************************************************************
 * Copyright (C) 2014-2025 x264 project
 *
 * Authors: Janne Grunau <janne-x264@jannau.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "common/common.h"
#include "asm-offsets.h"

#define STATIC_ASSERT(name, x) int assert_##name[2 * !!(x) - 1]

#define X264_CHECK_OFFSET(s, m, o) struct check_##s##_##m \
{ \
    STATIC_ASSERT(offset_##m, offsetof(s, m) == o); \
}

#define X264_CHECK_REL_OFFSET(s, a, type, b) struct check_##s##_##a##_##b \
{ \
    STATIC_ASSERT(rel_offset_##a##_##b, offsetof(s, a) + sizeof(type) == offsetof(s, b)); \
}


X264_CHECK_OFFSET(x264_cabac_t, i_low,               CABAC_I_LOW);
X264_CHECK_OFFSET(x264_cabac_t, i_range,             CABAC_I_RANGE);
X264_CHECK_OFFSET(x264_cabac_t, i_queue,             CABAC_I_QUEUE);
X264_CHECK_OFFSET(x264_cabac_t, i_bytes_outstanding, CABAC_I_BYTES_OUTSTANDING);
X264_CHECK_OFFSET(x264_cabac_t, p_start,             CABAC_P_START);
X264_CHECK_OFFSET(x264_cabac_t, p,                   CABAC_P);
X264_CHECK_OFFSET(x264_cabac_t, p_end,               CABAC_P_END);
X264_CHECK_OFFSET(x264_cabac_t, f8_bits_encoded,     CABAC_F8_BITS_ENCODED);
X264_CHECK_OFFSET(x264_cabac_t, state,               CABAC_STATE);

// the aarch64 asm makes following additional assumptions about the x264_cabac_t
// memory layout

X264_CHECK_REL_OFFSET(x264_cabac_t, i_low,    int, i_range);
X264_CHECK_REL_OFFSET(x264_cabac_t, i_queue,  int, i_bytes_outstanding);


================================================
FILE: common/aarch64/asm-offsets.h
================================================
/*****************************************************************************
 * asm-offsets.h: asm offsets for aarch64
 *****************************************************************************
 * Copyright (C) 2014-2025 x264 project
 *
 * Authors: Janne Grunau <janne-x264@jannau.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#ifndef X264_AARCH64_ASM_OFFSETS_H
#define X264_AARCH64_ASM_OFFSETS_H

#define CABAC_I_LOW                 0x00
#define CABAC_I_RANGE               0x04
#define CABAC_I_QUEUE               0x08
#define CABAC_I_BYTES_OUTSTANDING   0x0c
#define CABAC_P_START               0x10
#define CABAC_P                     0x18
#define CABAC_P_END                 0x20
#define CABAC_F8_BITS_ENCODED       0x30
#define CABAC_STATE                 0x34

#endif


================================================
FILE: common/aarch64/asm.S
================================================
/*****************************************************************************
 * asm.S: AArch64 utility macros
 *****************************************************************************
 * Copyright (C) 2008-2025 x264 project
 *
 * Authors: Mans Rullgard <mans@mansr.com>
 *          David Conrad <lessen42@gmail.com>
 *          Janne Grunau <janne-x264@jannau.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "config.h"

#define GLUE(a, b) a ## b
#define JOIN(a, b) GLUE(a, b)

#ifdef PREFIX
#   define BASE _x264_
#   define SYM_PREFIX _
#else
#   define BASE x264_
#   define SYM_PREFIX
#endif

#ifdef BIT_DEPTH
#   define EXTERN_ASM JOIN(JOIN(BASE, BIT_DEPTH), _)
#else
#   define EXTERN_ASM BASE
#endif

#define X(s) JOIN(EXTERN_ASM, s)
#define X264(s) JOIN(BASE, s)
#define EXT(s) JOIN(SYM_PREFIX, s)

#ifdef __ELF__
#   define ELF
#else
#   define ELF  #
#endif

#ifdef __MACH__
#   define MACH
#else
#   define MACH #
#endif

#if HAVE_AS_FUNC
#   define FUNC
#else
#   define FUNC #
#endif

        .arch AS_ARCH_LEVEL
#if HAVE_AS_ARCHEXT_DOTPROD_DIRECTIVE
#define ENABLE_DOTPROD  .arch_extension dotprod
#define DISABLE_DOTPROD .arch_extension nodotprod
#else
#define ENABLE_DOTPROD
#define DISABLE_DOTPROD
#endif
#if HAVE_AS_ARCHEXT_I8MM_DIRECTIVE
#define ENABLE_I8MM  .arch_extension i8mm
#define DISABLE_I8MM .arch_extension noi8mm
#else
#define ENABLE_I8MM
#define DISABLE_I8MM
#endif
#if HAVE_AS_ARCHEXT_SVE_DIRECTIVE
#define ENABLE_SVE  .arch_extension sve
#define DISABLE_SVE .arch_extension nosve
#else
#define ENABLE_SVE
#define DISABLE_SVE
#endif
#if HAVE_AS_ARCHEXT_SVE2_DIRECTIVE
#define ENABLE_SVE2  .arch_extension sve2
#define DISABLE_SVE2 .arch_extension nosve2
#else
#define ENABLE_SVE2
#define DISABLE_SVE2
#endif

/* If we do support the .arch_extension directives, disable support for all
 * the extensions that we may use, in case they were implicitly enabled by
 * the .arch level. This makes it clear if we try to assemble an instruction
 * from an unintended extension set; we only allow assmbling such instructions
 * within regions where we explicitly enable those extensions. */
DISABLE_DOTPROD
DISABLE_I8MM
DISABLE_SVE
DISABLE_SVE2

.macro  function name, export=0, align=2
    .macro endfunc
.if \export
ELF     .size   EXTERN_ASM\name, . - EXTERN_ASM\name
.else
ELF     .size   \name, . - \name
.endif
FUNC    .endfunc
        .purgem endfunc
    .endm
        .text
        .align          \align
    .if \export
        .global EXTERN_ASM\name
ELF     .type   EXTERN_ASM\name, %function
FUNC    .func   EXTERN_ASM\name
EXTERN_ASM\name:
    .else
ELF     .type   \name, %function
FUNC    .func   \name
\name:
    .endif
.endm

.macro  const   name, align=2
    .macro endconst
ELF     .size   \name, . - \name
        .purgem endconst
    .endm
ELF     .section        .rodata
MACH    .const_data
        .align          \align
\name:
.endm

.macro  movrel rd, val, offset=0
#if defined(__APPLE__)
  .if \offset < 0
        adrp            \rd, \val@PAGE
        add             \rd, \rd, \val@PAGEOFF
        sub             \rd, \rd, -(\offset)
  .else
        adrp            \rd, \val+(\offset)@PAGE
        add             \rd, \rd, \val+(\offset)@PAGEOFF
  .endif
#elif defined(PIC) && defined(_WIN32)
  .if \offset < 0
        adrp            \rd, \val
        add             \rd, \rd, :lo12:\val
        sub             \rd, \rd, -(\offset)
  .else
        adrp            \rd, \val+(\offset)
        add             \rd, \rd, :lo12:\val+(\offset)
  .endif
#elif defined(PIC)
        adrp            \rd, \val+(\offset)
        add             \rd, \rd, :lo12:\val+(\offset)
#else
        ldr             \rd, =\val+\offset
#endif
.endm

#define FDEC_STRIDE 32
#define FENC_STRIDE 16


.macro SUMSUB_AB   sum, sub, a, b
    add         \sum,  \a,  \b
    sub         \sub,  \a,  \b
.endm

.macro unzip t1, t2, s1, s2
    uzp1        \t1,  \s1,  \s2
    uzp2        \t2,  \s1,  \s2
.endm

.macro transpose t1, t2, s1, s2
    trn1        \t1,  \s1,  \s2
    trn2        \t2,  \s1,  \s2
.endm

.macro transpose4x4.h v0, v1, v2, v3, t0, t1, t2, t3
    transpose   \t0\().2s,  \t2\().2s,  \v0\().2s,  \v2\().2s
    transpose   \t1\().2s,  \t3\().2s,  \v1\().2s,  \v3\().2s
    transpose   \v0\().4h,  \v1\().4h,  \t0\().4h,  \t1\().4h
    transpose   \v2\().4h,  \v3\().4h,  \t2\().4h,  \t3\().4h
.endm

.macro transpose4x8.h v0, v1, v2, v3, t0, t1, t2, t3
    transpose   \t0\().4s,  \t2\().4s,  \v0\().4s,  \v2\().4s
    transpose   \t1\().4s,  \t3\().4s,  \v1\().4s,  \v3\().4s
    transpose   \v0\().8h,  \v1\().8h,  \t0\().8h,  \t1\().8h
    transpose   \v2\().8h,  \v3\().8h,  \t2\().8h,  \t3\().8h
.endm


.macro transpose8x8.h r0, r1, r2, r3, r4, r5, r6, r7, r8, r9
    trn1        \r8\().8h,  \r0\().8h,  \r1\().8h
    trn2        \r9\().8h,  \r0\().8h,  \r1\().8h
    trn1        \r1\().8h,  \r2\().8h,  \r3\().8h
    trn2        \r3\().8h,  \r2\().8h,  \r3\().8h
    trn1        \r0\().8h,  \r4\().8h,  \r5\().8h
    trn2        \r5\().8h,  \r4\().8h,  \r5\().8h
    trn1        \r2\().8h,  \r6\().8h,  \r7\().8h
    trn2        \r7\().8h,  \r6\().8h,  \r7\().8h

    trn1        \r4\().4s,  \r0\().4s,  \r2\().4s
    trn2        \r2\().4s,  \r0\().4s,  \r2\().4s
    trn1        \r6\().4s,  \r5\().4s,  \r7\().4s
    trn2        \r7\().4s,  \r5\().4s,  \r7\().4s
    trn1        \r5\().4s,  \r9\().4s,  \r3\().4s
    trn2        \r9\().4s,  \r9\().4s,  \r3\().4s
    trn1        \r3\().4s,  \r8\().4s,  \r1\().4s
    trn2        \r8\().4s,  \r8\().4s,  \r1\().4s

    trn1        \r0\().2d,  \r3\().2d,  \r4\().2d
    trn2        \r4\().2d,  \r3\().2d,  \r4\().2d

    trn1        \r1\().2d,  \r5\().2d,  \r6\().2d
    trn2        \r5\().2d,  \r5\().2d,  \r6\().2d

    trn2        \r6\().2d,  \r8\().2d,  \r2\().2d
    trn1        \r2\().2d,  \r8\().2d,  \r2\().2d

    trn1        \r3\().2d,  \r9\().2d,  \r7\().2d
    trn2        \r7\().2d,  \r9\().2d,  \r7\().2d
.endm

.macro  transpose_8x16.b r0, r1, r2, r3, r4, r5, r6, r7, t0, t1
    trn1        \t0\().16b, \r0\().16b, \r1\().16b
    trn2        \t1\().16b, \r0\().16b, \r1\().16b
    trn1        \r1\().16b, \r2\().16b, \r3\().16b
    trn2        \r3\().16b, \r2\().16b, \r3\().16b
    trn1        \r0\().16b, \r4\().16b, \r5\().16b
    trn2        \r5\().16b, \r4\().16b, \r5\().16b
    trn1        \r2\().16b, \r6\().16b, \r7\().16b
    trn2        \r7\().16b, \r6\().16b, \r7\().16b

    trn1        \r4\().8h,  \r0\().8h,  \r2\().8h
    trn2        \r2\().8h,  \r0\().8h,  \r2\().8h
    trn1        \r6\().8h,  \r5\().8h,  \r7\().8h
    trn2        \r7\().8h,  \r5\().8h,  \r7\().8h
    trn1        \r5\().8h,  \t1\().8h,  \r3\().8h
    trn2        \t1\().8h,  \t1\().8h,  \r3\().8h
    trn1        \r3\().8h,  \t0\().8h,  \r1\().8h
    trn2        \t0\().8h,  \t0\().8h,  \r1\().8h

    trn1        \r0\().4s,  \r3\().4s,  \r4\().4s
    trn2        \r4\().4s,  \r3\().4s,  \r4\().4s

    trn1        \r1\().4s,  \r5\().4s,  \r6\().4s
    trn2        \r5\().4s,  \r5\().4s,  \r6\().4s

    trn2        \r6\().4s,  \t0\().4s,  \r2\().4s
    trn1        \r2\().4s,  \t0\().4s,  \r2\().4s

    trn1        \r3\().4s,  \t1\().4s,  \r7\().4s
    trn2        \r7\().4s,  \t1\().4s,  \r7\().4s
.endm

.macro  transpose_4x16.b r0, r1, r2, r3, t4, t5, t6, t7
    trn1        \t4\().16b, \r0\().16b,  \r1\().16b
    trn2        \t5\().16b, \r0\().16b,  \r1\().16b
    trn1        \t6\().16b, \r2\().16b,  \r3\().16b
    trn2        \t7\().16b, \r2\().16b,  \r3\().16b

    trn1        \r0\().8h,  \t4\().8h,  \t6\().8h
    trn2        \r2\().8h,  \t4\().8h,  \t6\().8h
    trn1        \r1\().8h,  \t5\().8h,  \t7\().8h
    trn2        \r3\().8h,  \t5\().8h,  \t7\().8h
.endm

.macro  transpose_4x8.b  r0, r1, r2, r3, t4, t5, t6, t7
    trn1        \t4\().8b,  \r0\().8b,  \r1\().8b
    trn2        \t5\().8b,  \r0\().8b,  \r1\().8b
    trn1        \t6\().8b,  \r2\().8b,  \r3\().8b
    trn2        \t7\().8b,  \r2\().8b,  \r3\().8b

    trn1        \r0\().4h,  \t4\().4h,  \t6\().4h
    trn2        \r2\().4h,  \t4\().4h,  \t6\().4h
    trn1        \r1\().4h,  \t5\().4h,  \t7\().4h
    trn2        \r3\().4h,  \t5\().4h,  \t7\().4h
.endm


================================================
FILE: common/aarch64/bitstream-a.S
================================================
/*****************************************************************************
 * bitstream-a.S: aarch64 bitstream functions
 *****************************************************************************
 * Copyright (C) 2014-2025 x264 project
 *
 * Authors: Janne Grunau <janne-x264@jannau.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "asm.S"

function nal_escape_neon, export=1
    movi        v0.16b,  #0xff
    movi        v4.16b,  #4
    mov         w3,  #3
    subs        x6,  x1,  x2
    cbz         x6,  99f
0:
    cmn         x6,  #15
    b.lt        16f
    mov         x1,  x2
    b           100f
16:
    ld1         {v1.16b}, [x1], #16
    ext         v2.16b, v0.16b, v1.16b, #14
    ext         v3.16b, v0.16b, v1.16b, #15
    cmhi        v7.16b, v4.16b, v1.16b
    cmeq        v5.16b, v2.16b, #0
    cmeq        v6.16b, v3.16b, #0
    and         v5.16b, v5.16b, v7.16b
    and         v5.16b, v5.16b, v6.16b
    shrn        v7.8b,  v5.8h,  #4
    mov         x7,  v7.d[0]
    cbz         x7,  16f
    mov         x6,  #-16
100:
    umov        w5,  v0.b[14]
    umov        w4,  v0.b[15]
    orr         w5,  w4,  w5, lsl #8
101:
    ldrb        w4,  [x1, x6]
    orr         w9,  w4,  w5, lsl #16
    cmp         w9,  #3
    b.hi        102f
    strb        w3,  [x0], #1
    orr         w5,  w3,  w5, lsl #8
102:
    adds        x6,  x6,  #1
    strb        w4,  [x0], #1
    orr         w5,  w4,  w5, lsl #8
    b.lt        101b
    subs        x6,  x1,  x2
    lsr         w9,  w5,  #8
    mov         v0.b[14],  w9
    mov         v0.b[15],  w5
    b.lt        0b

    ret
16:
    subs        x6,  x1,  x2
    st1         {v1.16b}, [x0], #16
    mov         v0.16b, v1.16b
    b.lt        0b
99:
    ret
endfunc


================================================
FILE: common/aarch64/bitstream.h
================================================
/*****************************************************************************
 * bitstream.h: aarch64 bitstream functions
 *****************************************************************************
 * Copyright (C) 2017-2025 x264 project
 *
 * Authors: Anton Mitrofanov <BugMaster@narod.ru>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#ifndef X264_AARCH64_BITSTREAM_H
#define X264_AARCH64_BITSTREAM_H

#define x264_nal_escape_neon x264_template(nal_escape_neon)
uint8_t *x264_nal_escape_neon( uint8_t *dst, uint8_t *src, uint8_t *end );

#endif


================================================
FILE: common/aarch64/cabac-a.S
================================================
/*****************************************************************************
 * cabac-a.S: aarch64 cabac
 *****************************************************************************
 * Copyright (C) 2014-2025 x264 project
 *
 * Authors: Janne Grunau <janne-x264@jannau.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "asm.S"
#include "asm-offsets.h"

// w11 holds x264_cabac_t.i_low
// w12 holds x264_cabac_t.i_range

function cabac_encode_decision_asm, export=1
    add         w10, w1,  #CABAC_STATE
    ldrb        w3,  [x0,  w10, uxtw]           // i_state
    ldr         w12, [x0,  #CABAC_I_RANGE]
    movrel      x8,  X264(cabac_range_lps), -4
    movrel      x9,  X264(cabac_transition)
    ubfx        x4,  x3,  #1,  #7
    asr         w5,  w12, #6
    add         x8,  x8,  x4, lsl #2
    orr         w14, w2,  w3, lsl #1
    ldrb        w4,  [x8,  w5,  uxtw]           // i_range_lps
    ldr         w11, [x0,  #CABAC_I_LOW]
    eor         w6,  w2,  w3                    // b ^ i_state
    ldrb        w9,  [x9,  w14, uxtw]
    sub         w12, w12, w4
    add         w7,  w11, w12
    tst         w6,  #1                         // (b ^ i_state) & 1
    csel        w12, w4, w12, ne
    csel        w11, w7, w11, ne
    strb        w9,  [x0,  w10, uxtw]           // i_state

cabac_encode_renorm:
    ldr         w2,  [x0, #CABAC_I_QUEUE]
    clz         w5,  w12
    sub         w5,  w5,  #23
    lsl         w11, w11, w5
    lsl         w12, w12, w5
    adds        w2,  w2,  w5
    b.ge        cabac_putbyte

    stp         w11, w12, [x0, #CABAC_I_LOW]    // store i_low, i_range
    str         w2,  [x0, #CABAC_I_QUEUE]
    ret

.align 5
cabac_putbyte:
    ldr         w6,  [x0, #CABAC_I_BYTES_OUTSTANDING]
    add         w14, w2,  #10
    mov         w13, #-1
    sub         w2,  w2,  #8
    asr         w4,  w11, w14           // out
    lsl         w13, w13, w14
    subs        w5,  w4,  #0xff
    bic         w11, w11, w13
    cinc        w6,  w6,  eq
    b.eq        0f

1:
    ldr         x7,  [x0, #CABAC_P]
    asr         w5,  w4,  #8            // carry
    ldurb       w8,  [x7, #-1]
    add         w8,  w8,  w5
    sub         w5,  w5,  #1
    sturb       w8,  [x7, #-1]
    cbz         w6,  3f
2:
    subs        w6,  w6,  #1
    strb        w5,  [x7],  #1
    b.gt        2b
3:
    strb        w4,  [x7],  #1
    str         x7,  [x0, #CABAC_P]
0:
    stp         w11, w12, [x0, #CABAC_I_LOW]    // store i_low, i_range
    stp         w2,  w6,  [x0, #CABAC_I_QUEUE]  // store i_queue, i_bytes_outstanding
    ret
endfunc

function cabac_encode_bypass_asm, export=1, align=5
    ldr         w12, [x0, #CABAC_I_RANGE]
    ldr         w11, [x0, #CABAC_I_LOW]
    ldr         w2,  [x0, #CABAC_I_QUEUE]
    and         w1,  w1,  w12
    add         w11, w1,  w11, lsl #1
    adds        w2,  w2,  #1
    b.ge        cabac_putbyte
    str         w11, [x0, #CABAC_I_LOW]
    str         w2,  [x0, #CABAC_I_QUEUE]
    ret
endfunc

function cabac_encode_terminal_asm, export=1, align=5
    ldr         w12, [x0, #CABAC_I_RANGE]
    sub         w12, w12, #2
    tbz         w12, #8, 1f

    str         w12, [x0, #CABAC_I_RANGE]
    ret
1:
    ldr         w2,  [x0, #CABAC_I_QUEUE]
    ldr         w11, [x0, #CABAC_I_LOW]
    lsl         w12, w12, #1
    adds        w2,  w2,  #1
    lsl         w11, w11, #1
    b.ge        cabac_putbyte

    stp         w11, w12, [x0, #CABAC_I_LOW]    // store i_low, i_range
    str         w2,  [x0, #CABAC_I_QUEUE]
    ret
endfunc


================================================
FILE: common/aarch64/dct-a-common.S
================================================
/****************************************************************************
 * dct-a-common.S: aarch64 transform and zigzag
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: David Conrad <lessen42@gmail.com>
 *          Janne Grunau <janne-x264@jannau.net>
 *          David Chen   <david.chen@myais.com.cn>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

// This file contains the NEON macros that are intended to be used by
// the SVE/SVE2 functions as well

.macro DCT_1D v0 v1 v2 v3 v4 v5 v6 v7
    SUMSUB_AB   \v1, \v6, \v5, \v6
    SUMSUB_AB   \v3, \v7, \v4, \v7
    add         \v0, \v3, \v1
    add         \v4, \v7, \v7
    add         \v5, \v6, \v6
    sub         \v2, \v3, \v1
    add         \v1, \v4, \v6
    sub         \v3, \v7, \v5
.endm


================================================
FILE: common/aarch64/dct-a-sve.S
================================================
/****************************************************************************
 * dct-a-sve.S: aarch64 transform and zigzag
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: David Chen <david.chen@myais.com.cn>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "asm.S"
#include "dct-a-common.S"

ENABLE_SVE

function sub4x4_dct_sve, export=1
    mov         x3, #FENC_STRIDE
    mov         x4, #FDEC_STRIDE
    ptrue       p0.h, vl4
    ld1b        {z0.h}, p0/z, [x1]
    add         x1, x1, x3
    ld1b        {z1.h}, p0/z, [x2]
    add         x2, x2, x4
    ld1b        {z2.h}, p0/z, [x1]
    add         x1, x1, x3
    sub         v16.4h, v0.4h, v1.4h
    ld1b        {z3.h}, p0/z, [x2]
    add         x2, x2, x4
    ld1b        {z4.h}, p0/z, [x1]
    add         x1, x1, x3
    sub         v17.4h, v2.4h, v3.4h
    ld1b        {z5.h}, p0/z, [x2]
    add         x2, x2, x4
    ld1b        {z6.h}, p0/z, [x1]
    sub         v18.4h, v4.4h, v5.4h
    ld1b        {z7.h}, p0/z, [x2]
    sub         v19.4h, v6.4h, v7.4h

    DCT_1D      v0.4h, v1.4h, v2.4h, v3.4h, v16.4h, v17.4h, v18.4h, v19.4h
    transpose4x4.h v0, v1, v2, v3, v4, v5, v6, v7
    DCT_1D      v4.4h, v5.4h, v6.4h, v7.4h, v0.4h, v1.4h, v2.4h, v3.4h
    st1         {v4.4h,v5.4h,v6.4h,v7.4h}, [x0]
    ret
endfunc

function zigzag_interleave_8x8_cavlc_sve, export=1
    mov         z31.s, #1
    ptrue       p2.s, vl2
    ld4         {v0.8h,v1.8h,v2.8h,v3.8h}, [x1],  #64
    ld4         {v4.8h,v5.8h,v6.8h,v7.8h}, [x1],  #64
    umax        v16.8h, v0.8h,  v4.8h
    umax        v17.8h, v1.8h,  v5.8h
    umax        v18.8h, v2.8h,  v6.8h
    umax        v19.8h, v3.8h,  v7.8h
    st1         {v0.8h}, [x0],  #16
    st1         {v4.8h}, [x0],  #16
    umaxp       v16.8h, v16.8h, v17.8h
    umaxp       v18.8h, v18.8h, v19.8h
    st1         {v1.8h}, [x0],  #16
    st1         {v5.8h}, [x0],  #16
    umaxp       v16.8h, v16.8h, v18.8h
    st1         {v2.8h}, [x0],  #16
    st1         {v6.8h}, [x0],  #16
    cmhs        v16.4s, v16.4s, v31.4s
    st1         {v3.8h}, [x0],  #16
    and         v16.16b, v16.16b, v31.16b
    st1         {v7.8h}, [x0],  #16
    st1b        {z16.s}, p2, [x2]
    add         x2, x2, #8
    mov         v16.d[0], v16.d[1]
    st1b        {z16.s}, p2, [x2]
    ret
endfunc


================================================
FILE: common/aarch64/dct-a-sve2.S
================================================
/****************************************************************************
 * dct-a-sve2.S: aarch64 transform and zigzag
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: David Chen <david.chen@myais.com.cn>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "asm.S"
#include "dct-a-common.S"

ENABLE_SVE
ENABLE_SVE2

function add4x4_idct_sve2, export=1
    mov         x2, #FDEC_STRIDE
    mov         x11, x0
    ptrue       p0.h, vl8
    ptrue       p1.h, vl4
    ld1         {v0.8h, v1.8h}, [x1]

    SUMSUB_AB   v4.8h, v5.8h, v0.8h, v1.8h

    sshr        v7.8h, v0.8h, #1
    sshr        v6.8h, v1.8h, #1
    sub         v7.8h, v7.8h, v1.8h
    add         v6.8h, v6.8h, v0.8h
    mov         v7.d[0], v7.d[1]
    mov         v6.d[0], v6.d[1]
    ld1b        {z28.h}, p0/z, [x11]
    add         x11, x11, x2
    SUMSUB_AB   v0.8h, v2.8h, v4.8h, v6.8h
    SUMSUB_AB   v1.8h, v3.8h, v5.8h, v7.8h

    transpose4x4.h v0, v1, v3, v2, v16, v17, v18, v19

    SUMSUB_AB   v4.4h, v5.4h, v0.4h, v3.4h

    sshr        v7.4h, v1.4h, #1
    sshr        v6.4h, v2.4h, #1
    sub         v7.4h, v7.4h, v2.4h
    add         v6.4h, v6.4h, v1.4h
    ld1b        {z29.h}, p0/z, [x11]
    add         x11, x11, x2
    SUMSUB_AB   v0.4h, v2.4h, v4.4h, v6.4h
    SUMSUB_AB   v1.4h, v3.4h, v5.4h, v7.4h

    srshr       z0.h, p1/m, z0.h, #6
    srshr       z1.h, p1/m, z1.h, #6
    ld1b        {z31.h}, p0/z, [x11]
    add         x11, x11, x2
    srshr       z2.h, p1/m, z2.h, #6
    srshr       z3.h, p1/m, z3.h, #6
    ld1b        {z30.h}, p0/z, [x11]

    add         v0.8h, v0.8h, v28.8h
    add         v1.8h, v1.8h, v29.8h
    add         v2.8h, v2.8h, v30.8h
    add         v3.8h, v3.8h, v31.8h
    sqxtunb     z0.b, z0.h
    sqxtunb     z1.b, z1.h
    sqxtunb     z2.b, z2.h
    sqxtunb     z3.b, z3.h

    st1b        {z0.h}, p1, [x0]
    add         x0, x0, x2
    st1b        {z1.h}, p1, [x0]
    add         x0, x0, x2
    st1b        {z3.h}, p1, [x0]
    add         x0, x0, x2
    st1b        {z2.h}, p1, [x0]
    ret
endfunc


================================================
FILE: common/aarch64/dct-a.S
================================================
/****************************************************************************
 * dct-a.S: aarch64 transform and zigzag
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: David Conrad <lessen42@gmail.com>
 *          Janne Grunau <janne-x264@jannau.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "asm.S"
#include "dct-a-common.S"

const scan4x4_frame, align=4
.byte    0,1,   8,9,   2,3,   4,5
.byte   10,11, 16,17, 24,25, 18,19
.byte   12,13,  6,7,  14,15, 20,21
.byte   26,27, 28,29, 22,23, 30,31
endconst

const scan4x4_field, align=4
.byte    0,1,   2,3,   8,9,   4,5
.byte    6,7,  10,11, 12,13, 14,15
endconst

const sub4x4_frame, align=4
.byte    0,  1,  4,  8
.byte    5,  2,  3,  6
.byte    9, 12, 13, 10
.byte    7, 11, 14, 15
endconst

const sub4x4_field, align=4
.byte    0,  4,  1,  8
.byte   12,  5,  9, 13
.byte    2,  6, 10, 14
.byte    3,  7, 11, 15
endconst

// sum = a + (b>>shift)   sub = (a>>shift) - b
.macro SUMSUB_SHR shift sum sub a b t0 t1
    sshr        \t0,  \b, #\shift
    sshr        \t1,  \a, #\shift
    add         \sum, \a, \t0
    sub         \sub, \t1, \b
.endm

// sum = (a>>shift) + b   sub = a - (b>>shift)
.macro SUMSUB_SHR2 shift sum sub a b t0 t1
    sshr        \t0,  \a, #\shift
    sshr        \t1,  \b, #\shift
    add         \sum, \t0, \b
    sub         \sub, \a, \t1
.endm

// a += 1.5*ma   b -= 1.5*mb
.macro SUMSUB_15 a b ma mb t0 t1
    sshr        \t0, \ma, #1
    sshr        \t1, \mb, #1
    add         \t0, \t0, \ma
    add         \t1, \t1, \mb
    add         \a,  \a,  \t0
    sub         \b,  \b,  \t1
.endm


function dct4x4dc_neon, export=1
    ld1         {v0.4h,v1.4h,v2.4h,v3.4h}, [x0]
    movi        v31.4h, #1
    SUMSUB_AB   v4.4h,  v5.4h,  v0.4h,  v1.4h
    SUMSUB_AB   v6.4h,  v7.4h,  v2.4h,  v3.4h
    SUMSUB_AB   v0.4h,  v2.4h,  v4.4h,  v6.4h
    SUMSUB_AB   v3.4h,  v1.4h,  v5.4h,  v7.4h
    transpose   v4.4h,  v6.4h,  v0.4h,  v2.4h
    transpose   v5.4h,  v7.4h,  v1.4h,  v3.4h
    SUMSUB_AB   v0.4h,  v2.4h,  v4.4h,  v6.4h
    SUMSUB_AB   v1.4h,  v3.4h,  v5.4h,  v7.4h
    transpose   v4.2s,  v5.2s,  v0.2s,  v1.2s
    transpose   v6.2s,  v7.2s,  v2.2s,  v3.2s
    add         v16.4h, v4.4h,  v31.4h
    add         v17.4h, v6.4h,  v31.4h
    srhadd      v0.4h,  v4.4h,  v5.4h
    shsub       v1.4h,  v16.4h, v5.4h
    shsub       v2.4h,  v17.4h, v7.4h
    srhadd      v3.4h,  v6.4h,  v7.4h
    st1         {v0.4h,v1.4h,v2.4h,v3.4h}, [x0]
    ret
endfunc

function idct4x4dc_neon, export=1
    ld1         {v0.4h,v1.4h,v2.4h,v3.4h}, [x0]
    SUMSUB_AB   v4.4h,  v5.4h,  v0.4h,  v1.4h
    SUMSUB_AB   v6.4h,  v7.4h,  v2.4h,  v3.4h
    SUMSUB_AB   v0.4h,  v2.4h,  v4.4h,  v6.4h
    SUMSUB_AB   v3.4h,  v1.4h,  v5.4h,  v7.4h
    transpose   v4.4h,  v6.4h,  v0.4h,  v2.4h
    transpose   v5.4h,  v7.4h,  v1.4h,  v3.4h
    SUMSUB_AB   v0.4h,  v2.4h,  v4.4h,  v6.4h
    SUMSUB_AB   v1.4h,  v3.4h,  v5.4h,  v7.4h
    transpose   v4.2s,  v5.2s,  v0.2s,  v1.2s
    transpose   v6.2s,  v7.2s,  v2.2s,  v3.2s
    SUMSUB_AB   v0.4h,  v1.4h,  v4.4h,  v5.4h
    SUMSUB_AB   v3.4h,  v2.4h,  v6.4h,  v7.4h
    st1         {v0.4h,v1.4h,v2.4h,v3.4h}, [x0]
    ret
endfunc

function sub4x4_dct_neon, export=1
    mov         x3, #FENC_STRIDE
    mov         x4, #FDEC_STRIDE
    ld1         {v0.s}[0], [x1], x3
    ld1         {v1.s}[0], [x2], x4
    ld1         {v2.s}[0], [x1], x3
    usubl       v16.8h, v0.8b,  v1.8b
    ld1         {v3.s}[0], [x2], x4
    ld1         {v4.s}[0], [x1], x3
    usubl       v17.8h, v2.8b,  v3.8b
    ld1         {v5.s}[0], [x2], x4
    ld1         {v6.s}[0], [x1], x3
    usubl       v18.8h, v4.8b,  v5.8b
    ld1         {v7.s}[0], [x2], x4
    usubl       v19.8h, v6.8b,  v7.8b

    DCT_1D      v0.4h, v1.4h, v2.4h, v3.4h, v16.4h, v17.4h, v18.4h, v19.4h
    transpose4x4.h v0, v1, v2, v3, v4, v5, v6, v7
    DCT_1D      v4.4h, v5.4h, v6.4h, v7.4h, v0.4h, v1.4h, v2.4h, v3.4h
    st1         {v4.4h,v5.4h,v6.4h,v7.4h}, [x0]
    ret
endfunc

function sub8x4_dct_neon
    ld1         {v0.8b}, [x1], x3
    ld1         {v1.8b}, [x2], x4
    usubl       v16.8h, v0.8b,  v1.8b
    ld1         {v2.8b}, [x1], x3
    ld1         {v3.8b}, [x2], x4
    usubl       v17.8h, v2.8b,  v3.8b
    ld1         {v4.8b}, [x1], x3
    ld1         {v5.8b}, [x2], x4
    usubl       v18.8h, v4.8b,  v5.8b
    ld1         {v6.8b}, [x1], x3
    ld1         {v7.8b}, [x2], x4
    usubl       v19.8h, v6.8b,  v7.8b

    DCT_1D      v0.8h, v1.8h, v2.8h, v3.8h, v16.8h, v17.8h, v18.8h, v19.8h
    transpose4x8.h v0, v1, v2, v3, v4, v5, v6, v7

    SUMSUB_AB   v16.8h, v19.8h, v0.8h,  v3.8h
    SUMSUB_AB   v17.8h, v18.8h, v1.8h,  v2.8h
    add         v22.8h, v19.8h, v19.8h
    add         v21.8h, v18.8h, v18.8h
    add         v0.8h,  v16.8h, v17.8h
    sub         v1.8h,  v16.8h, v17.8h

    add         v2.8h,  v22.8h, v18.8h
    sub         v3.8h,  v19.8h, v21.8h

    zip1        v4.2d,  v0.2d,  v2.2d
    zip2        v6.2d,  v0.2d,  v2.2d
    zip1        v5.2d,  v1.2d,  v3.2d
    zip2        v7.2d,  v1.2d,  v3.2d

    st1         {v4.8h}, [x0], #16
    st1         {v5.8h}, [x0], #16
    st1         {v6.8h}, [x0], #16
    st1         {v7.8h}, [x0], #16
    ret
endfunc

function sub8x8_dct_neon, export=1
    mov         x5,  x30
    mov         x3, #FENC_STRIDE
    mov         x4, #FDEC_STRIDE
    bl          sub8x4_dct_neon
    mov         x30, x5
    b           sub8x4_dct_neon
endfunc

function sub16x16_dct_neon, export=1
    mov         x5,  x30
    mov         x3, #FENC_STRIDE
    mov         x4, #FDEC_STRIDE
    bl          sub8x4_dct_neon
    bl          sub8x4_dct_neon
    sub         x1, x1, #8*FENC_STRIDE-8
    sub         x2, x2, #8*FDEC_STRIDE-8
    bl          sub8x4_dct_neon
    bl          sub8x4_dct_neon
    sub         x1, x1, #8
    sub         x2, x2, #8
    bl          sub8x4_dct_neon
    bl          sub8x4_dct_neon
    sub         x1, x1, #8*FENC_STRIDE-8
    sub         x2, x2, #8*FDEC_STRIDE-8
    bl          sub8x4_dct_neon
    mov         x30, x5
    b           sub8x4_dct_neon
endfunc


.macro DCT8_1D type
    SUMSUB_AB   v18.8h, v17.8h, v3.8h,  v4.8h   // s34/d34
    SUMSUB_AB   v19.8h, v16.8h, v2.8h,  v5.8h   // s25/d25
    SUMSUB_AB   v22.8h, v21.8h, v1.8h,  v6.8h   // s16/d16
    SUMSUB_AB   v23.8h, v20.8h, v0.8h,  v7.8h   // s07/d07

    SUMSUB_AB   v24.8h, v26.8h,  v23.8h, v18.8h  // a0/a2
    SUMSUB_AB   v25.8h, v27.8h,  v22.8h, v19.8h  // a1/a3

    SUMSUB_AB   v30.8h, v29.8h,  v20.8h, v17.8h  // a6/a5
    sshr        v23.8h, v21.8h, #1
    sshr        v18.8h, v16.8h, #1
    add         v23.8h, v23.8h, v21.8h
    add         v18.8h, v18.8h, v16.8h
    sub         v30.8h, v30.8h, v23.8h
    sub         v29.8h, v29.8h, v18.8h

    SUMSUB_AB   v28.8h, v31.8h,  v21.8h, v16.8h   // a4/a7
    sshr        v22.8h, v20.8h, #1
    sshr        v19.8h, v17.8h, #1
    add         v22.8h, v22.8h, v20.8h
    add         v19.8h, v19.8h, v17.8h
    add         v22.8h, v28.8h, v22.8h
    add         v31.8h, v31.8h, v19.8h

    SUMSUB_AB   v0.8h,  v4.8h,  v24.8h, v25.8h
    SUMSUB_SHR  2, v1.8h,  v7.8h,  v22.8h, v31.8h, v16.8h, v17.8h
    SUMSUB_SHR  1, v2.8h,  v6.8h,  v26.8h, v27.8h, v18.8h, v19.8h
    SUMSUB_SHR2 2, v3.8h,  v5.8h,  v30.8h, v29.8h, v20.8h, v21.8h
.endm

function sub8x8_dct8_neon, export=1
    mov         x3, #FENC_STRIDE
    mov         x4, #FDEC_STRIDE
    ld1         {v16.8b}, [x1], x3
    ld1         {v17.8b}, [x2], x4
    ld1         {v18.8b}, [x1], x3
    ld1         {v19.8b}, [x2], x4
    usubl       v0.8h,  v16.8b, v17.8b
    ld1         {v20.8b}, [x1], x3
    ld1         {v21.8b}, [x2], x4
    usubl       v1.8h,  v18.8b, v19.8b
    ld1         {v22.8b}, [x1], x3
    ld1         {v23.8b}, [x2], x4
    usubl       v2.8h,  v20.8b, v21.8b
    ld1         {v24.8b}, [x1], x3
    ld1         {v25.8b}, [x2], x4
    usubl       v3.8h,  v22.8b, v23.8b
    ld1         {v26.8b}, [x1], x3
    ld1         {v27.8b}, [x2], x4
    usubl       v4.8h,  v24.8b, v25.8b
    ld1         {v28.8b}, [x1], x3
    ld1         {v29.8b}, [x2], x4
    usubl       v5.8h,  v26.8b, v27.8b
    ld1         {v30.8b}, [x1], x3
    ld1         {v31.8b}, [x2], x4
    usubl       v6.8h,  v28.8b, v29.8b
    usubl       v7.8h,  v30.8b, v31.8b

    DCT8_1D     row
    transpose8x8.h v0, v1, v2, v3, v4, v5, v6, v7, v30, v31
    DCT8_1D     col

    st1         {v0.8h,v1.8h,v2.8h,v3.8h}, [x0], #64
    st1         {v4.8h,v5.8h,v6.8h,v7.8h}, [x0], #64
    ret
endfunc

function sub16x16_dct8_neon, export=1
    mov         x7,  x30
    bl          X(sub8x8_dct8_neon)
    sub         x1,  x1,  #FENC_STRIDE*8 - 8
    sub         x2,  x2,  #FDEC_STRIDE*8 - 8
    bl          X(sub8x8_dct8_neon)
    sub         x1,  x1,  #8
    sub         x2,  x2,  #8
    bl          X(sub8x8_dct8_neon)
    mov         x30, x7
    sub         x1,  x1,  #FENC_STRIDE*8 - 8
    sub         x2,  x2,  #FDEC_STRIDE*8 - 8
    b           X(sub8x8_dct8_neon)
endfunc


// First part of IDCT (minus final SUMSUB_BA)
.macro IDCT_1D d4 d5 d6 d7 d0 d1 d2 d3
    SUMSUB_AB   \d4, \d5, \d0, \d2
    sshr        \d7, \d1, #1
    sshr        \d6, \d3, #1
    sub         \d7, \d7, \d3
    add         \d6, \d6, \d1
.endm

function add4x4_idct_neon, export=1
    mov         x2, #FDEC_STRIDE
    ld1         {v0.4h,v1.4h,v2.4h,v3.4h}, [x1]

    IDCT_1D     v4.4h, v5.4h, v6.4h, v7.4h, v0.4h, v1.4h, v2.4h, v3.4h
    ld1         {v28.s}[0], [x0], x2
    SUMSUB_AB   v0.4h, v2.4h, v4.4h, v6.4h
    SUMSUB_AB   v1.4h, v3.4h, v5.4h, v7.4h

    transpose4x4.h v0, v1, v3, v2, v16, v17, v18, v19

    IDCT_1D     v4.4h, v5.4h, v6.4h, v7.4h, v0.4h, v1.4h, v3.4h, v2.4h
    ld1         {v29.s}[0], [x0], x2
    SUMSUB_AB   v0.4h, v2.4h, v4.4h, v6.4h
    SUMSUB_AB   v1.4h, v3.4h, v5.4h, v7.4h

    srshr       v0.4h,  v0.4h,  #6
    srshr       v1.4h,  v1.4h,  #6
    ld1         {v31.s}[0], [x0], x2
    srshr       v2.4h,  v2.4h,  #6
    srshr       v3.4h,  v3.4h,  #6
    ld1         {v30.s}[0], [x0], x2

    sub         x0,  x0,  x2,  lsl #2
    uaddw       v0.8h,  v0.8h,  v28.8b
    uaddw       v1.8h,  v1.8h,  v29.8b
    uaddw       v2.8h,  v2.8h,  v30.8b
    uaddw       v3.8h,  v3.8h,  v31.8b
    sqxtun      v0.8b,  v0.8h
    sqxtun      v1.8b,  v1.8h
    sqxtun      v2.8b,  v2.8h
    sqxtun      v3.8b,  v3.8h

    st1         {v0.s}[0], [x0], x2
    st1         {v1.s}[0], [x0], x2
    st1         {v3.s}[0], [x0], x2
    st1         {v2.s}[0], [x0], x2
    ret
endfunc

function add8x4_idct_neon, export=1
    ld1         {v0.8h,v1.8h}, [x1], #32
    ld1         {v2.8h,v3.8h}, [x1], #32
    transpose   v20.2d, v21.2d, v0.2d, v2.2d
    transpose   v22.2d, v23.2d, v1.2d, v3.2d
    IDCT_1D     v16.8h, v17.8h, v18.8h, v19.8h, v20.8h, v21.8h, v22.8h, v23.8h
    SUMSUB_AB   v0.8h,  v3.8h,  v16.8h, v18.8h
    SUMSUB_AB   v1.8h,  v2.8h,  v17.8h, v19.8h

    transpose4x8.h v0, v1, v2, v3, v4, v5, v6, v7

    IDCT_1D     v16.8h, v17.8h, v18.8h, v19.8h, v0.8h, v1.8h, v2.8h, v3.8h
    SUMSUB_AB   v0.8h,  v3.8h,  v16.8h, v18.8h
    SUMSUB_AB   v1.8h,  v2.8h,  v17.8h, v19.8h

    srshr       v0.8h,  v0.8h,  #6
    ld1         {v28.8b}, [x0], x2
    srshr       v1.8h,  v1.8h,  #6
    ld1         {v29.8b}, [x0], x2
    srshr       v2.8h,  v2.8h,  #6
    ld1         {v30.8b}, [x0], x2
    srshr       v3.8h,  v3.8h,  #6
    ld1         {v31.8b}, [x0], x2

    sub         x0,  x0,  x2,  lsl #2
    uaddw       v0.8h,  v0.8h,  v28.8b
    uaddw       v1.8h,  v1.8h,  v29.8b
    uaddw       v2.8h,  v2.8h,  v30.8b
    uaddw       v3.8h,  v3.8h,  v31.8b

    sqxtun      v0.8b,  v0.8h
    sqxtun      v1.8b,  v1.8h
    st1         {v0.8b}, [x0], x2
    sqxtun      v2.8b,  v2.8h
    st1         {v1.8b}, [x0], x2
    sqxtun      v3.8b,  v3.8h
    st1         {v2.8b}, [x0], x2
    st1         {v3.8b}, [x0], x2
    ret
endfunc

function add8x8_idct_neon, export=1
    mov             x2, #FDEC_STRIDE
    mov             x5,  x30
    bl              X(add8x4_idct_neon)
    mov             x30, x5
    b               X(add8x4_idct_neon)
endfunc

function add16x16_idct_neon, export=1
    mov             x2, #FDEC_STRIDE
    mov             x5,  x30
    bl              X(add8x4_idct_neon)
    bl              X(add8x4_idct_neon)
    sub             x0, x0, #8*FDEC_STRIDE-8
    bl              X(add8x4_idct_neon)
    bl              X(add8x4_idct_neon)
    sub             x0, x0, #8
    bl              X(add8x4_idct_neon)
    bl              X(add8x4_idct_neon)
    sub             x0, x0, #8*FDEC_STRIDE-8
    bl              X(add8x4_idct_neon)
    mov             x30, x5
    b               X(add8x4_idct_neon)
endfunc

.macro IDCT8_1D type
    SUMSUB_AB   v0.8h,  v1.8h,  v16.8h, v20.8h          // a0/a2
.ifc \type, row
    ld1         {v22.8h,v23.8h}, [x1], #32
.endif
    SUMSUB_SHR  1, v2.8h,  v3.8h,  v18.8h, v22.8h, v16.8h, v20.8h   // a6/a4
    SUMSUB_AB   v16.8h, v18.8h, v21.8h, v19.8h
    SUMSUB_15   v16.8h, v18.8h, v17.8h, v23.8h, v20.8h, v22.8h      // a7/a1
    SUMSUB_AB   v22.8h, v23.8h, v23.8h, v17.8h
    SUMSUB_15   v23.8h, v22.8h, v21.8h, v19.8h, v20.8h, v17.8h      // a5/a3

    SUMSUB_SHR  2, v21.8h, v22.8h, v22.8h, v23.8h, v19.8h, v17.8h   // b3/b5
    SUMSUB_SHR2 2, v20.8h, v23.8h, v16.8h, v18.8h, v19.8h, v17.8h   // b1/b7

    SUMSUB_AB   v18.8h, v2.8h,  v0.8h,  v2.8h           // b0/b6
    SUMSUB_AB   v19.8h, v3.8h,  v1.8h,  v3.8h           // b2/b4

    SUMSUB_AB   v16.8h, v23.8h, v18.8h, v23.8h
    SUMSUB_AB   v17.8h, v22.8h, v19.8h, v22.8h
    SUMSUB_AB   v18.8h, v21.8h, v3.8h,  v21.8h
    SUMSUB_AB   v19.8h, v20.8h, v2.8h,  v20.8h
.endm

function add8x8_idct8_neon, export=1
    mov         x2,  #FDEC_STRIDE
    ld1         {v16.8h,v17.8h}, [x1], #32
    ld1         {v18.8h,v19.8h}, [x1], #32
    ld1         {v20.8h,v21.8h}, [x1], #32

    IDCT8_1D    row

    transpose8x8.h v16, v17, v18, v19, v20, v21, v22, v23, v30, v31

    IDCT8_1D    col

    ld1         {v0.8b}, [x0], x2
    srshr       v16.8h, v16.8h, #6
    ld1         {v1.8b}, [x0], x2
    srshr       v17.8h, v17.8h, #6
    ld1         {v2.8b}, [x0], x2
    srshr       v18.8h, v18.8h, #6
    ld1         {v3.8b}, [x0], x2
    srshr       v19.8h, v19.8h, #6
    ld1         {v4.8b}, [x0], x2
    srshr       v20.8h, v20.8h, #6
    ld1         {v5.8b}, [x0], x2
    srshr       v21.8h, v21.8h, #6
    ld1         {v6.8b}, [x0], x2
    srshr       v22.8h, v22.8h, #6
    ld1         {v7.8b}, [x0], x2
    srshr       v23.8h, v23.8h, #6
    sub         x0,  x0,  x2,  lsl #3

    uaddw       v16.8h, v16.8h, v0.8b
    uaddw       v17.8h, v17.8h, v1.8b
    uaddw       v18.8h, v18.8h, v2.8b
    sqxtun      v0.8b,  v16.8h
    sqxtun      v1.8b,  v17.8h
    sqxtun      v2.8b,  v18.8h
    uaddw       v19.8h, v19.8h, v3.8b
    st1         {v0.8b}, [x0], x2
    uaddw       v20.8h, v20.8h, v4.8b
    st1         {v1.8b}, [x0], x2
    uaddw       v21.8h, v21.8h, v5.8b
    st1         {v2.8b}, [x0], x2
    sqxtun      v3.8b,  v19.8h
    sqxtun      v4.8b,  v20.8h
    uaddw       v22.8h, v22.8h, v6.8b
    uaddw       v23.8h, v23.8h, v7.8b
    st1         {v3.8b}, [x0], x2
    sqxtun      v5.8b,  v21.8h
    st1         {v4.8b}, [x0], x2
    sqxtun      v6.8b,  v22.8h
    sqxtun      v7.8b,  v23.8h
    st1         {v5.8b}, [x0], x2
    st1         {v6.8b}, [x0], x2
    st1         {v7.8b}, [x0], x2
    ret
endfunc

function add16x16_idct8_neon, export=1
    mov             x7,  x30
    bl              X(add8x8_idct8_neon)
    sub             x0,  x0,  #8*FDEC_STRIDE-8
    bl              X(add8x8_idct8_neon)
    sub             x0,  x0,  #8
    bl              X(add8x8_idct8_neon)
    sub             x0,  x0,  #8*FDEC_STRIDE-8
    mov             x30, x7
    b               X(add8x8_idct8_neon)
endfunc

function add8x8_idct_dc_neon, export=1
    mov         x2,  #FDEC_STRIDE
    ld1         {v16.4h}, [x1]
    ld1         {v0.8b}, [x0], x2
    srshr       v16.4h, v16.4h, #6
    ld1         {v1.8b}, [x0], x2
    dup         v20.8h, v16.h[0]
    dup         v21.8h, v16.h[1]
    ld1         {v2.8b}, [x0], x2
    dup         v22.8h, v16.h[2]
    dup         v23.8h, v16.h[3]
    ld1         {v3.8b}, [x0], x2
    trn1        v20.2d, v20.2d,  v21.2d
    ld1         {v4.8b}, [x0], x2
    trn1        v21.2d, v22.2d,  v23.2d
    ld1         {v5.8b}, [x0], x2
    neg         v22.8h, v20.8h
    ld1         {v6.8b}, [x0], x2
    neg         v23.8h, v21.8h
    ld1         {v7.8b}, [x0], x2

    sub         x0,  x0,  #8*FDEC_STRIDE

    sqxtun      v20.8b,  v20.8h
    sqxtun      v21.8b,  v21.8h
    sqxtun      v22.8b,  v22.8h
    sqxtun      v23.8b,  v23.8h

    uqadd       v0.8b,  v0.8b,  v20.8b
    uqadd       v1.8b,  v1.8b,  v20.8b
    uqadd       v2.8b,  v2.8b,  v20.8b
    uqadd       v3.8b,  v3.8b,  v20.8b
    uqadd       v4.8b,  v4.8b,  v21.8b
    uqadd       v5.8b,  v5.8b,  v21.8b
    uqadd       v6.8b,  v6.8b,  v21.8b
    uqadd       v7.8b,  v7.8b,  v21.8b
    uqsub       v0.8b,  v0.8b,  v22.8b
    uqsub       v1.8b,  v1.8b,  v22.8b
    uqsub       v2.8b,  v2.8b,  v22.8b
    uqsub       v3.8b,  v3.8b,  v22.8b
    uqsub       v4.8b,  v4.8b,  v23.8b
    uqsub       v5.8b,  v5.8b,  v23.8b
    uqsub       v6.8b,  v6.8b,  v23.8b
    uqsub       v7.8b,  v7.8b,  v23.8b

    st1         {v0.8b}, [x0], x2
    st1         {v1.8b}, [x0], x2
    st1         {v2.8b}, [x0], x2
    st1         {v3.8b}, [x0], x2
    st1         {v4.8b}, [x0], x2
    st1         {v5.8b}, [x0], x2
    st1         {v6.8b}, [x0], x2
    st1         {v7.8b}, [x0], x2
    ret
endfunc

.macro ADD16x4_IDCT_DC dc
    ld1         {v4.16b}, [x0], x3
    dup         v24.8h,  \dc[0]
    dup         v25.8h,  \dc[1]
    ld1         {v5.16b}, [x0], x3
    dup         v26.8h,  \dc[2]
    dup         v27.8h,  \dc[3]
    ld1         {v6.16b}, [x0], x3
    trn1        v24.2d,  v24.2d,  v25.2d
    ld1         {v7.16b}, [x0], x3
    trn1        v25.2d,  v26.2d,  v27.2d
    neg         v26.8h,  v24.8h
    neg         v27.8h,  v25.8h

    sqxtun      v20.8b,  v24.8h
    sqxtun      v21.8b,  v26.8h
    sqxtun2     v20.16b, v25.8h
    sqxtun2     v21.16b, v27.8h

    uqadd       v4.16b, v4.16b, v20.16b
    uqadd       v5.16b, v5.16b, v20.16b
    uqadd       v6.16b, v6.16b, v20.16b
    uqadd       v7.16b, v7.16b, v20.16b

    uqsub       v4.16b, v4.16b, v21.16b
    uqsub       v5.16b, v5.16b, v21.16b
    uqsub       v6.16b, v6.16b, v21.16b
    st1         {v4.16b}, [x2], x3
    uqsub       v7.16b, v7.16b, v21.16b
    st1         {v5.16b}, [x2], x3
    st1         {v6.16b}, [x2], x3
    st1         {v7.16b}, [x2], x3
.endm

function add16x16_idct_dc_neon, export=1
    mov         x2,  x0
    mov         x3,  #FDEC_STRIDE

    ld1         {v0.4h,v1.4h,v2.4h,v3.4h}, [x1]
    srshr       v0.4h,  v0.4h,  #6
    srshr       v1.4h,  v1.4h,  #6

    ADD16x4_IDCT_DC v0.h
    srshr       v2.4h,  v2.4h,  #6
    ADD16x4_IDCT_DC v1.h
    srshr       v3.4h,  v3.4h,  #6
    ADD16x4_IDCT_DC v2.h
    ADD16x4_IDCT_DC v3.h
    ret
endfunc

.macro sub4x4x2_dct_dc, dst, t0, t1, t2, t3, t4, t5, t6, t7
    ld1         {\t0\().8b}, [x1], x3
    ld1         {\t1\().8b}, [x2], x4
    ld1         {\t2\().8b}, [x1], x3
    ld1         {\t3\().8b}, [x2], x4
    usubl       \t0\().8h,  \t0\().8b,  \t1\().8b
    ld1         {\t4\().8b}, [x1], x3
    ld1         {\t5\().8b}, [x2], x4
    usubl       \t1\().8h,  \t2\().8b,  \t3\().8b
    ld1         {\t6\().8b}, [x1], x3
    ld1         {\t7\().8b}, [x2], x4
    add         \dst\().8h, \t0\().8h,  \t1\().8h
    usubl       \t2\().8h,  \t4\().8b,  \t5\().8b
    usubl       \t3\().8h,  \t6\().8b,  \t7\().8b
    add         \dst\().8h, \dst\().8h, \t2\().8h
    add         \dst\().8h, \dst\().8h, \t3\().8h
.endm

function sub8x8_dct_dc_neon, export=1
    mov         x3,  #FENC_STRIDE
    mov         x4,  #FDEC_STRIDE

    sub4x4x2_dct_dc v0, v16, v17, v18, v19, v20, v21, v22, v23
    sub4x4x2_dct_dc v1, v24, v25, v26, v27, v28, v29, v30, v31

    transpose   v2.2d,  v3.2d,  v0.2d,  v1.2d
    SUMSUB_AB   v0.8h,  v1.8h,  v2.8h,  v3.8h
    transpose   v2.2d,  v3.2d,  v0.2d,  v1.2d
    SUMSUB_AB   v0.8h,  v1.8h,  v2.8h,  v3.8h
    transpose   v2.2d,  v3.2d,  v0.2d,  v1.2d

    addp        v0.8h,  v2.8h,  v3.8h
    addp        v0.8h,  v0.8h,  v0.8h

    st1         {v0.4h}, [x0]
    ret
endfunc

function sub8x16_dct_dc_neon, export=1
    mov         x3,  #FENC_STRIDE
    mov         x4,  #FDEC_STRIDE
    sub4x4x2_dct_dc v0, v16, v17, v18, v19, v20, v21, v22, v23
    sub4x4x2_dct_dc v1, v24, v25, v26, v27, v28, v29, v30, v31
    sub4x4x2_dct_dc v2, v16, v17, v18, v19, v20, v21, v22, v23
    sub4x4x2_dct_dc v3, v24, v25, v26, v27, v28, v29, v30, v31

    addp        v4.8h,  v0.8h,  v2.8h
    addp        v5.8h,  v1.8h,  v3.8h

    transpose   v2.4s,  v3.4s,  v4.4s,  v5.4s
    SUMSUB_AB   v0.8h,  v1.8h,  v2.8h,  v3.8h

    transpose   v2.4s,  v3.4s,  v0.4s,  v1.4s
    SUMSUB_AB   v0.8h,  v1.8h,  v2.8h,  v3.8h

    transpose   v2.2d,  v3.2d,  v0.2d,  v1.2d
    SUMSUB_AB   v0.8h,  v1.8h,  v2.8h,  v3.8h

    trn1        v2.2d,  v0.2d,  v1.2d
    trn2        v3.2d,  v1.2d,  v0.2d

    addp        v0.8h,  v2.8h,  v3.8h

    st1         {v0.8h}, [x0]
    ret
endfunc

function zigzag_interleave_8x8_cavlc_neon, export=1
    mov         x3,  #7
    movi        v31.4s, #1
    ld4         {v0.8h,v1.8h,v2.8h,v3.8h}, [x1],  #64
    ld4         {v4.8h,v5.8h,v6.8h,v7.8h}, [x1],  #64
    umax        v16.8h, v0.8h,  v4.8h
    umax        v17.8h, v1.8h,  v5.8h
    umax        v18.8h, v2.8h,  v6.8h
    umax        v19.8h, v3.8h,  v7.8h
    st1         {v0.8h}, [x0],  #16
    st1         {v4.8h}, [x0],  #16
    umaxp       v16.8h, v16.8h, v17.8h
    umaxp       v18.8h, v18.8h, v19.8h
    st1         {v1.8h}, [x0],  #16
    st1         {v5.8h}, [x0],  #16
    umaxp       v16.8h, v16.8h, v18.8h
    st1         {v2.8h}, [x0],  #16
    st1         {v6.8h}, [x0],  #16
    cmhs        v16.4s, v16.4s, v31.4s
    st1         {v3.8h}, [x0],  #16
    and         v16.16b, v16.16b, v31.16b
    st1         {v7.8h}, [x0],  #16
    st1         {v16.b}[0],    [x2],  #1
    st1         {v16.b}[4],    [x2],  x3
    st1         {v16.b}[8],    [x2],  #1
    st1         {v16.b}[12],   [x2]
    ret
endfunc

function zigzag_scan_4x4_frame_neon, export=1
    movrel      x2, scan4x4_frame
    ld1         {v0.16b,v1.16b}, [x1]
    ld1         {v16.16b,v17.16b}, [x2]
    tbl         v2.16b, {v0.16b,v1.16b}, v16.16b
    tbl         v3.16b, {v0.16b,v1.16b}, v17.16b
    st1         {v2.16b,v3.16b},   [x0]
    ret
endfunc

.macro zigzag_sub_4x4 f ac
function zigzag_sub_4x4\ac\()_\f\()_neon, export=1
    mov         x9,  #FENC_STRIDE
    mov         x4,  #FDEC_STRIDE
    movrel      x5,  sub4x4_\f
    mov         x6,  x2
    ld1         {v0.s}[0], [x1], x9
    ld1         {v0.s}[1], [x1], x9
    ld1         {v0.s}[2], [x1], x9
    ld1         {v0.s}[3], [x1], x9
    ld1         {v16.16b}, [x5]
    ld1         {v1.s}[0], [x2], x4
    ld1         {v1.s}[1], [x2], x4
    ld1         {v1.s}[2], [x2], x4
    ld1         {v1.s}[3], [x2], x4
    tbl         v2.16b, {v0.16b}, v16.16b
    tbl         v3.16b, {v1.16b}, v16.16b
    st1         {v0.s}[0], [x6], x4
    usubl       v4.8h,  v2.8b,  v3.8b
.ifc \ac, ac
    dup         h7, v4.h[0]
    ins         v4.h[0], wzr
    fmov        w5,  s7
    strh        w5,  [x3]
.endif
    usubl2      v5.8h,  v2.16b, v3.16b
    st1         {v0.s}[1], [x6], x4
    umax        v6.8h,  v4.8h,  v5.8h
    umaxv       h6,  v6.8h
    st1         {v0.s}[2], [x6], x4
    fmov        w7,  s6
    st1         {v0.s}[3], [x6], x4
    cmp         w7, #0
    st1         {v4.8h,v5.8h},   [x0]
    cset        w0, ne
    ret
endfunc
.endm

zigzag_sub_4x4 field
zigzag_sub_4x4 field, ac
zigzag_sub_4x4 frame
zigzag_sub_4x4 frame, ac

function zigzag_scan_4x4_field_neon, export=1
    movrel      x2, scan4x4_field
    ld1         {v0.8h,v1.8h},   [x1]
    ld1         {v16.16b},       [x2]
    tbl         v0.16b, {v0.16b}, v16.16b
    st1         {v0.8h,v1.8h},   [x0]
    ret
endfunc

function zigzag_scan_8x8_frame_neon, export=1
    movrel      x2,  scan8x8_frame
    ld1         {v0.8h,v1.8h},   [x1], #32
    ld1         {v2.8h,v3.8h},   [x1], #32
    ld1         {v4.8h,v5.8h},   [x1], #32
    ld1         {v6.8h,v7.8h},   [x1]
    ld1         {v16.16b,v17.16b}, [x2], #32
    ld1         {v18.16b,v19.16b}, [x2], #32
    ld1         {v20.16b,v21.16b}, [x2], #32
    ld1         {v22.16b,v23.16b}, [x2], #32
    tbl         v24.16b, {v0.16b,v1.16b,v2.16b,v3.16b}, v16.16b
    tbl         v25.16b, {v0.16b,v1.16b,v2.16b,v3.16b}, v17.16b
    tbl         v26.16b, {v0.16b,v1.16b,v2.16b,v3.16b}, v18.16b
    tbl         v27.16b, {v3.16b,v4.16b,v5.16b,v6.16b}, v19.16b
    tbl         v28.16b, {v0.16b,v1.16b,v2.16b,v3.16b}, v20.16b
    tbl         v29.16b, {v4.16b,v5.16b,v6.16b,v7.16b}, v21.16b
    tbl         v30.16b, {v4.16b,v5.16b,v6.16b,v7.16b}, v22.16b
    tbl         v31.16b, {v4.16b,v5.16b,v6.16b,v7.16b}, v23.16b
    mov         v25.h[6], v4.h[0]
    mov         v25.h[7], v5.h[0]
    mov         v26.h[0], v4.h[1]
    mov         v27.h[4], v7.h[0]
    mov         v28.h[7], v4.h[4]
    mov         v29.h[7], v3.h[6]
    mov         v30.h[0], v2.h[7]
    mov         v30.h[1], v3.h[7]
    st1         {v24.8h,v25.8h}, [x0], #32
    st1         {v26.8h,v27.8h}, [x0], #32
    st1         {v28.8h,v29.8h}, [x0], #32
    st1         {v30.8h,v31.8h}, [x0]
    ret
endfunc

#define Z(z)   2*(z), 2*(z)+1
#define T(x,y) Z(x*8+y)
const scan8x8_frame, align=5
    .byte T(0,0), T(1,0), T(0,1), T(0,2)
    .byte T(1,1), T(2,0), T(3,0), T(2,1)
    .byte T(1,2), T(0,3), T(0,4), T(1,3)
    .byte T(2,2), T(3,1), T(4,0), T(5,0)
    .byte T(4,1), T(3,2), T(2,3), T(1,4)
    .byte T(0,5), T(0,6), T(1,5), T(2,4)
#undef T
#define T(x,y) Z((x-3)*8+y)
    .byte T(3,3), T(4,2), T(5,1), T(6,0)
    .byte T(7,0), T(6,1), T(5,2), T(4,3)
#undef T
#define T(x,y) Z((x-0)*8+y)
    .byte T(3,4), T(2,5), T(1,6), T(0,7)
    .byte T(1,7), T(2,6), T(3,5), T(4,4)
#undef T
#define T(x,y) Z((x-4)*8+y)
    .byte T(5,3), T(6,2), T(7,1), T(7,2)
    .byte T(6,3), T(5,4), T(4,5), T(3,6)
    .byte T(2,7), T(3,7), T(4,6), T(5,5)
    .byte T(6,4), T(7,3), T(7,4), T(6,5)
    .byte T(5,6), T(4,7), T(5,7), T(6,6)
    .byte T(7,5), T(7,6), T(6,7), T(7,7)
endconst

function zigzag_scan_8x8_field_neon, export=1
    movrel      x2,  scan8x8_field
    ld1         {v0.8h,v1.8h},   [x1], #32
    ld1         {v2.8h,v3.8h},   [x1], #32
    ld1         {v4.8h,v5.8h},   [x1], #32
    ld1         {v6.8h,v7.8h},   [x1]
    ld1         {v16.16b,v17.16b}, [x2], #32
    ld1         {v18.16b,v19.16b}, [x2], #32
    ld1         {v20.16b,v21.16b}, [x2], #32
    ld1         {v22.16b}, [x2]
    ext         v31.16b, v7.16b, v7.16b, #4
    tbl         v24.16b, {v0.16b,v1.16b},               v16.16b
    tbl         v25.16b, {v0.16b,v1.16b,v2.16b,v3.16b}, v17.16b
    tbl         v26.16b, {v1.16b,v2.16b,v3.16b,v4.16b}, v18.16b
    tbl         v27.16b, {v2.16b,v3.16b,v4.16b,v5.16b}, v19.16b
    tbl         v28.16b, {v3.16b,v4.16b,v5.16b,v6.16b}, v20.16b
    tbl         v29.16b, {v4.16b,v5.16b,v6.16b},        v21.16b
    tbl         v30.16b, {v5.16b,v6.16b,v7.16b},        v22.16b
    ext         v31.16b, v6.16b, v31.16b, #12
    st1         {v24.8h,v25.8h}, [x0], #32
    st1         {v26.8h,v27.8h}, [x0], #32
    st1         {v28.8h,v29.8h}, [x0], #32
    st1         {v30.8h,v31.8h}, [x0]
    ret
endfunc

.macro zigzag_sub8x8 f
function zigzag_sub_8x8_\f\()_neon, export=1
    movrel      x4,  sub8x8_\f
    mov         x5,  #FENC_STRIDE
    mov         x6,  #FDEC_STRIDE
    mov         x7,  x2
    ld1         {v0.d}[0], [x1], x5
    ld1         {v0.d}[1], [x1], x5
    ld1         {v1.d}[0], [x1], x5
    ld1         {v1.d}[1], [x1], x5
    ld1         {v2.d}[0], [x1], x5
    ld1         {v2.d}[1], [x1], x5
    ld1         {v3.d}[0], [x1], x5
    ld1         {v3.d}[1], [x1]
    ld1         {v4.d}[0], [x2], x6
    ld1         {v4.d}[1], [x2], x6
    ld1         {v5.d}[0], [x2], x6
    ld1         {v5.d}[1], [x2], x6
    ld1         {v6.d}[0], [x2], x6
    ld1         {v6.d}[1], [x2], x6
    ld1         {v7.d}[0], [x2], x6
    ld1         {v7.d}[1], [x2]
    ld1         {v16.16b,v17.16b}, [x4], #32
    ld1         {v18.16b,v19.16b}, [x4], #32
    tbl         v24.16b, {v0.16b,v1.16b,v2.16b,v3.16b}, v16.16b
    tbl         v25.16b, {v0.16b,v1.16b,v2.16b,v3.16b}, v17.16b
    tbl         v26.16b, {v0.16b,v1.16b,v2.16b,v3.16b}, v18.16b
    tbl         v27.16b, {v0.16b,v1.16b,v2.16b,v3.16b}, v19.16b
    tbl         v28.16b, {v4.16b,v5.16b,v6.16b,v7.16b}, v16.16b
    tbl         v29.16b, {v4.16b,v5.16b,v6.16b,v7.16b}, v17.16b
    tbl         v30.16b, {v4.16b,v5.16b,v6.16b,v7.16b}, v18.16b
    tbl         v31.16b, {v4.16b,v5.16b,v6.16b,v7.16b}, v19.16b
    usubl       v4.8h,  v24.8b,  v28.8b
    usubl2      v5.8h,  v24.16b, v28.16b
    usubl       v6.8h,  v25.8b,  v29.8b
    usubl2      v7.8h,  v25.16b, v29.16b
    usubl       v16.8h, v26.8b,  v30.8b
    usubl2      v17.8h, v26.16b, v30.16b
    usubl       v18.8h, v27.8b,  v31.8b
    usubl2      v19.8h, v27.16b, v31.16b
    umax        v20.8h, v4.8h,   v5.8h
    umax        v21.8h, v6.8h,   v7.8h
    umax        v22.8h, v16.8h,  v17.8h
    umax        v23.8h, v18.8h,  v19.8h
    umax        v20.8h, v20.8h,  v21.8h
    umax        v21.8h, v22.8h,  v23.8h
    umax        v20.8h, v20.8h,  v21.8h
    umaxv       h22,    v20.8h
    st1         {v0.d}[0], [x7], x6
    st1         {v0.d}[1], [x7], x6
    st1         {v1.d}[0], [x7], x6
    st1         {v1.d}[1], [x7], x6
    st1         {v2.d}[0], [x7], x6
    st1         {v2.d}[1], [x7], x6
    st1         {v3.d}[0], [x7], x6
    st1         {v3.d}[1], [x7]
    st1         {v4.8h,v5.8h},   [x0], #32
    st1         {v6.8h,v7.8h},   [x0], #32
    st1         {v16.8h,v17.8h}, [x0], #32
    st1         {v18.8h,v19.8h}, [x0]
    fmov        w9,  s22
    cmp         w9, #0
    cset        w0, ne
    ret
endfunc
.endm

zigzag_sub8x8 field
zigzag_sub8x8 frame

#undef T
#define T(x,y) Z(x*8+y)
const scan8x8_field, align=5
    .byte T(0,0), T(0,1), T(0,2), T(1,0)
    .byte T(1,1), T(0,3), T(0,4), T(1,2)
    .byte T(2,0), T(1,3), T(0,5), T(0,6)
    .byte T(0,7), T(1,4), T(2,1), T(3,0)
#undef T
#define T(x,y) Z((x-1)*8+y)
    .byte T(2,2), T(1,5), T(1,6), T(1,7)
    .byte T(2,3), T(3,1), T(4,0), T(3,2)
#undef T
#define T(x,y) Z((x-2)*8+y)
    .byte T(2,4), T(2,5), T(2,6), T(2,7)
    .byte T(3,3), T(4,1), T(5,0), T(4,2)
#undef T
#define T(x,y) Z((x-3)*8+y)
    .byte T(3,4), T(3,5), T(3,6), T(3,7)
    .byte T(4,3), T(5,1), T(6,0), T(5,2)
#undef T
#define T(x,y) Z((x-4)*8+y)
    .byte T(4,4), T(4,5), T(4,6), T(4,7)
    .byte T(5,3), T(6,1), T(6,2), T(5,4)
#undef T
#define T(x,y) Z((x-5)*8+y)
    .byte T(5,5), T(5,6), T(5,7), T(6,3)
    .byte T(7,0), T(7,1), T(6,4), T(6,5)
endconst


#undef T
#define T(y,x) x*8+y
const sub8x8_frame, align=5
    .byte T(0,0), T(1,0), T(0,1), T(0,2)
    .byte T(1,1), T(2,0), T(3,0), T(2,1)
    .byte T(1,2), T(0,3), T(0,4), T(1,3)
    .byte T(2,2), T(3,1), T(4,0), T(5,0)
    .byte T(4,1), T(3,2), T(2,3), T(1,4)
    .byte T(0,5), T(0,6), T(1,5), T(2,4)
    .byte T(3,3), T(4,2), T(5,1), T(6,0)
    .byte T(7,0), T(6,1), T(5,2), T(4,3)
    .byte T(3,4), T(2,5), T(1,6), T(0,7)
    .byte T(1,7), T(2,6), T(3,5), T(4,4)
    .byte T(5,3), T(6,2), T(7,1), T(7,2)
    .byte T(6,3), T(5,4), T(4,5), T(3,6)
    .byte T(2,7), T(3,7), T(4,6), T(5,5)
    .byte T(6,4), T(7,3), T(7,4), T(6,5)
    .byte T(5,6), T(4,7), T(5,7), T(6,6)
    .byte T(7,5), T(7,6), T(6,7), T(7,7)
endconst

const sub8x8_field, align=5
    .byte T(0,0), T(0,1), T(0,2), T(1,0)
    .byte T(1,1), T(0,3), T(0,4), T(1,2)
    .byte T(2,0), T(1,3), T(0,5), T(0,6)
    .byte T(0,7), T(1,4), T(2,1), T(3,0)
    .byte T(2,2), T(1,5), T(1,6), T(1,7)
    .byte T(2,3), T(3,1), T(4,0), T(3,2)
    .byte T(2,4), T(2,5), T(2,6), T(2,7)
    .byte T(3,3), T(4,1), T(5,0), T(4,2)
    .byte T(3,4), T(3,5), T(3,6), T(3,7)
    .byte T(4,3), T(5,1), T(6,0), T(5,2)
    .byte T(4,4), T(4,5), T(4,6), T(4,7)
    .byte T(5,3), T(6,1), T(6,2), T(5,4)
    .byte T(5,5), T(5,6), T(5,7), T(6,3)
    .byte T(7,0), T(7,1), T(6,4), T(6,5)
    .byte T(6,6), T(6,7), T(7,2), T(7,3)
    .byte T(7,4), T(7,5), T(7,6), T(7,7)
endconst


================================================
FILE: common/aarch64/dct.h
================================================
/*****************************************************************************
 * dct.h: aarch64 transform and zigzag
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: David Conrad <lessen42@gmail.com>
 *          Janne Grunau <janne-x264@jannau.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#ifndef X264_AARCH64_DCT_H
#define X264_AARCH64_DCT_H

#define x264_dct4x4dc_neon x264_template(dct4x4dc_neon)
void x264_dct4x4dc_neon( int16_t d[16] );
#define x264_idct4x4dc_neon x264_template(idct4x4dc_neon)
void x264_idct4x4dc_neon( int16_t d[16] );

#define x264_sub4x4_dct_neon x264_template(sub4x4_dct_neon)
void x264_sub4x4_dct_neon( int16_t dct[16], uint8_t *pix1, uint8_t *pix2 );
#define x264_sub8x8_dct_neon x264_template(sub8x8_dct_neon)
void x264_sub8x8_dct_neon( int16_t dct[4][16], uint8_t *pix1, uint8_t *pix2 );
#define x264_sub16x16_dct_neon x264_template(sub16x16_dct_neon)
void x264_sub16x16_dct_neon( int16_t dct[16][16], uint8_t *pix1, uint8_t *pix2 );

#define x264_add4x4_idct_neon x264_template(add4x4_idct_neon)
void x264_add4x4_idct_neon( uint8_t *p_dst, int16_t dct[16] );
#define x264_add8x8_idct_neon x264_template(add8x8_idct_neon)
void x264_add8x8_idct_neon( uint8_t *p_dst, int16_t dct[4][16] );
#define x264_add16x16_idct_neon x264_template(add16x16_idct_neon)
void x264_add16x16_idct_neon( uint8_t *p_dst, int16_t dct[16][16] );

#define x264_add8x8_idct_dc_neon x264_template(add8x8_idct_dc_neon)
void x264_add8x8_idct_dc_neon( uint8_t *p_dst, int16_t dct[4] );
#define x264_add16x16_idct_dc_neon x264_template(add16x16_idct_dc_neon)
void x264_add16x16_idct_dc_neon( uint8_t *p_dst, int16_t dct[16] );
#define x264_sub8x8_dct_dc_neon x264_template(sub8x8_dct_dc_neon)
void x264_sub8x8_dct_dc_neon( int16_t dct[4], uint8_t *pix1, uint8_t *pix2 );
#define x264_sub8x16_dct_dc_neon x264_template(sub8x16_dct_dc_neon)
void x264_sub8x16_dct_dc_neon( int16_t dct[8], uint8_t *pix1, uint8_t *pix2 );

#define x264_sub8x8_dct8_neon x264_template(sub8x8_dct8_neon)
void x264_sub8x8_dct8_neon( int16_t dct[64], uint8_t *pix1, uint8_t *pix2 );
#define x264_sub16x16_dct8_neon x264_template(sub16x16_dct8_neon)
void x264_sub16x16_dct8_neon( int16_t dct[4][64], uint8_t *pix1, uint8_t *pix2 );

#define x264_add8x8_idct8_neon x264_template(add8x8_idct8_neon)
void x264_add8x8_idct8_neon( uint8_t *p_dst, int16_t dct[64] );
#define x264_add16x16_idct8_neon x264_template(add16x16_idct8_neon)
void x264_add16x16_idct8_neon( uint8_t *p_dst, int16_t dct[4][64] );

#define x264_zigzag_scan_4x4_frame_neon x264_template(zigzag_scan_4x4_frame_neon)
void x264_zigzag_scan_4x4_frame_neon( int16_t level[16], int16_t dct[16] );
#define x264_zigzag_scan_4x4_field_neon x264_template(zigzag_scan_4x4_field_neon)
void x264_zigzag_scan_4x4_field_neon( int16_t level[16], int16_t dct[16] );
#define x264_zigzag_scan_8x8_frame_neon x264_template(zigzag_scan_8x8_frame_neon)
void x264_zigzag_scan_8x8_frame_neon( int16_t level[64], int16_t dct[64] );
#define x264_zigzag_scan_8x8_field_neon x264_template(zigzag_scan_8x8_field_neon)
void x264_zigzag_scan_8x8_field_neon( int16_t level[64], int16_t dct[64] );

#define x264_zigzag_sub_4x4_field_neon x264_template(zigzag_sub_4x4_field_neon)
int x264_zigzag_sub_4x4_field_neon( dctcoef level[16], const pixel *p_src, pixel *p_dst );
#define x264_zigzag_sub_4x4ac_field_neon x264_template(zigzag_sub_4x4ac_field_neon)
int x264_zigzag_sub_4x4ac_field_neon( dctcoef level[16], const pixel *p_src, pixel *p_dst, dctcoef *dc );
#define x264_zigzag_sub_4x4_frame_neon x264_template(zigzag_sub_4x4_frame_neon)
int x264_zigzag_sub_4x4_frame_neon( dctcoef level[16], const pixel *p_src, pixel *p_dst );
#define x264_zigzag_sub_4x4ac_frame_neon x264_template(zigzag_sub_4x4ac_frame_neon)
int x264_zigzag_sub_4x4ac_frame_neon( dctcoef level[16], const pixel *p_src, pixel *p_dst, dctcoef *dc );

#define x264_zigzag_sub_8x8_field_neon x264_template(zigzag_sub_8x8_field_neon)
int x264_zigzag_sub_8x8_field_neon( dctcoef level[16], const pixel *p_src, pixel *p_dst );
#define x264_zigzag_sub_8x8_frame_neon x264_template(zigzag_sub_8x8_frame_neon)
int x264_zigzag_sub_8x8_frame_neon( dctcoef level[16], const pixel *p_src, pixel *p_dst );

#define x264_zigzag_interleave_8x8_cavlc_neon x264_template(zigzag_interleave_8x8_cavlc_neon)
void x264_zigzag_interleave_8x8_cavlc_neon( dctcoef *dst, dctcoef *src, uint8_t *nnz );

#define x264_sub4x4_dct_sve x264_template(sub4x4_dct_sve)
void x264_sub4x4_dct_sve( int16_t dct[16], uint8_t *pix1, uint8_t *pix2 );

#define x264_add4x4_idct_sve2 x264_template(add4x4_idct_sve2)
void x264_add4x4_idct_sve2( uint8_t *p_dst, int16_t dct[16] );

#define x264_zigzag_interleave_8x8_cavlc_sve x264_template(zigzag_interleave_8x8_cavlc_sve)
void x264_zigzag_interleave_8x8_cavlc_sve( dctcoef *dst, dctcoef *src, uint8_t *nnz );

#endif


================================================
FILE: common/aarch64/deblock-a-common.S
================================================
/*****************************************************************************
 * deblock-a-common.S: aarch64 deblocking
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: Mans Rullgard <mans@mansr.com>
 *          Janne Grunau <janne-x264@jannau.net>
 *          David Chen <david.chen@myais.com.cn>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

// This file contains the NEON macros that are intended to be used by
// the SVE/SVE2 functions as well

.macro h264_loop_filter_start
    cmp             w2,  #0
    ldr             w6,  [x4]
    ccmp            w3,  #0, #0, ne
    mov             v24.s[0], w6
    and             w8,  w6,  w6,  lsl #16
    b.eq            1f
    ands            w8,  w8,  w8,  lsl #8
    b.ge            2f
1:
    ret
2:
.endm


================================================
FILE: common/aarch64/deblock-a-sve.S
================================================
/*****************************************************************************
 * deblock-a-sve.S: aarch64 deblocking
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: David Chen <david.chen@myais.com.cn>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "asm.S"
#include "deblock-a-common.S"

ENABLE_SVE

.macro h264_loop_filter_chroma_sve
    ptrue           p0.b, vl16

    dup             v22.16b, w2              // alpha
    uxtl            v24.8h,  v24.8b
    uabd            v26.16b, v16.16b, v0.16b   // abs(p0 - q0)
    uxtl            v4.8h,   v0.8b
    uxtl2           v5.8h,   v0.16b
    uabd            v28.16b, v18.16b, v16.16b  // abs(p1 - p0)
    usubw           v4.8h,   v4.8h,   v16.8b
    usubw2          v5.8h,   v5.8h,   v16.16b
    sli             v24.8h,  v24.8h,  #8
    shl             v4.8h,   v4.8h,   #2
    shl             v5.8h,   v5.8h,   #2
    uabd            v30.16b, v2.16b,  v0.16b   // abs(q1 - q0)
    uxtl            v24.4s,  v24.4h
    uaddw           v4.8h,   v4.8h,   v18.8b
    uaddw2          v5.8h,   v5.8h,   v18.16b

    cmphi           p1.b, p0/z, z22.b, z26.b
    usubw           v4.8h,   v4.8h,   v2.8b
    usubw2          v5.8h,   v5.8h,   v2.16b
    sli             v24.4s,  v24.4s,  #16
    dup             v22.16b, w3              // beta
    rshrn           v4.8b,   v4.8h,   #3
    rshrn2          v4.16b,  v5.8h,   #3
    cmphi           p2.b, p0/z, z22.b, z28.b
    cmphi           p3.b, p0/z, z22.b, z30.b
    smin            v4.16b,  v4.16b,  v24.16b
    neg             v25.16b, v24.16b
    and             p1.b, p0/z, p1.b, p2.b
    smax            v4.16b,  v4.16b,  v25.16b
    and             p1.b, p0/z, p1.b, p3.b
    uxtl            v22.8h,  v0.8b
    uxtl2           v23.8h,  v0.16b

    uxtl            v28.8h,  v16.8b
    uxtl2           v29.8h,  v16.16b
    saddw           v28.8h,  v28.8h,  v4.8b
    saddw2          v29.8h,  v29.8h,  v4.16b
    ssubw           v22.8h,  v22.8h,  v4.8b
    ssubw2          v23.8h,  v23.8h,  v4.16b
    sqxtun          v16.8b,  v28.8h
    sqxtun          v0.8b,   v22.8h
    sqxtun2         v16.16b, v29.8h
    sqxtun2         v0.16b,  v23.8h
.endm

function deblock_v_chroma_sve, export=1
    h264_loop_filter_start

    sub             x0,  x0,  x1, lsl #1
    // No performance improvement if sve load is used. So, continue using
    // NEON load here
    ld1             {v18.16b}, [x0], x1
    ld1             {v16.16b}, [x0], x1
    ld1             {v0.16b},  [x0], x1
    ld1             {v2.16b},  [x0]

    h264_loop_filter_chroma_sve

    sub             x0,  x0,  x1, lsl #1
    st1b            {z16.b}, p1, [x0]
    add             x0, x0, x1
    st1b            {z0.b}, p1, [x0]

    ret
endfunc


================================================
FILE: common/aarch64/deblock-a.S
================================================
/*****************************************************************************
 * deblock.S: aarch64 deblocking
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: Mans Rullgard <mans@mansr.com>
 *          Janne Grunau <janne-x264@jannau.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "asm.S"
#include "deblock-a-common.S"

.macro h264_loop_filter_luma
    dup             v22.16b, w2                     // alpha
    uxtl            v24.8h,  v24.8b
    uabd            v21.16b, v16.16b, v0.16b        // abs(p0 - q0)
    uxtl            v24.4s,  v24.4h
    uabd            v28.16b, v18.16b, v16.16b       // abs(p1 - p0)
    sli             v24.8h,  v24.8h,  #8
    uabd            v30.16b, v2.16b,  v0.16b        // abs(q1 - q0)
    sli             v24.4s,  v24.4s,  #16
    cmhi            v21.16b, v22.16b, v21.16b       // < alpha
    dup             v22.16b, w3                     // beta
    cmlt            v23.16b, v24.16b, #0
    cmhi            v28.16b, v22.16b, v28.16b       // < beta
    cmhi            v30.16b, v22.16b, v30.16b       // < beta
    bic             v21.16b, v21.16b, v23.16b
    uabd            v17.16b, v20.16b, v16.16b       // abs(p2 - p0)
    and             v21.16b, v21.16b, v28.16b
    uabd            v19.16b,  v4.16b,  v0.16b       // abs(q2 - q0)
    cmhi            v17.16b, v22.16b, v17.16b       // < beta
    and             v21.16b, v21.16b, v30.16b
    cmhi            v19.16b, v22.16b, v19.16b       // < beta
    and             v17.16b, v17.16b, v21.16b
    and             v19.16b, v19.16b, v21.16b
    and             v24.16b, v24.16b, v21.16b
    urhadd          v28.16b, v16.16b,  v0.16b
    sub             v21.16b, v24.16b, v17.16b
    uqadd           v23.16b, v18.16b, v24.16b
    uhadd           v20.16b, v20.16b, v28.16b
    sub             v21.16b, v21.16b, v19.16b
    uhadd           v28.16b,  v4.16b, v28.16b
    umin            v23.16b, v23.16b, v20.16b
    uqsub           v22.16b, v18.16b, v24.16b
    uqadd           v4.16b,   v2.16b, v24.16b
    umax            v23.16b, v23.16b, v22.16b
    uqsub           v22.16b,  v2.16b, v24.16b
    umin            v28.16b,  v4.16b, v28.16b
    uxtl            v4.8h,    v0.8b
    umax            v28.16b, v28.16b, v22.16b
    uxtl2           v20.8h,   v0.16b
    usubw           v4.8h,    v4.8h,  v16.8b
    usubw2          v20.8h,  v20.8h,  v16.16b
    shl             v4.8h,    v4.8h,  #2
    shl             v20.8h,  v20.8h,  #2
    uaddw           v4.8h,    v4.8h,  v18.8b
    uaddw2          v20.8h,  v20.8h,  v18.16b
    usubw           v4.8h,    v4.8h,   v2.8b
    usubw2          v20.8h,  v20.8h,   v2.16b
    rshrn           v4.8b,    v4.8h,  #3
    rshrn2          v4.16b,  v20.8h,  #3
    bsl             v17.16b, v23.16b, v18.16b
    bsl             v19.16b, v28.16b,  v2.16b
    neg             v23.16b, v21.16b
    uxtl            v28.8h,  v16.8b
    smin            v4.16b,   v4.16b, v21.16b
    uxtl2           v21.8h,  v16.16b
    smax            v4.16b,   v4.16b, v23.16b
    uxtl            v22.8h,   v0.8b
    uxtl2           v24.8h,   v0.16b
    saddw           v28.8h,  v28.8h,  v4.8b
    saddw2          v21.8h,  v21.8h,  v4.16b
    ssubw           v22.8h,  v22.8h,  v4.8b
    ssubw2          v24.8h,  v24.8h,  v4.16b
    sqxtun          v16.8b,  v28.8h
    sqxtun2         v16.16b, v21.8h
    sqxtun          v0.8b,   v22.8h
    sqxtun2         v0.16b,  v24.8h
.endm

function deblock_v_luma_neon, export=1
    h264_loop_filter_start

    ld1             {v0.16b},  [x0], x1
    ld1             {v2.16b},  [x0], x1
    ld1             {v4.16b},  [x0], x1
    sub             x0,  x0,  x1, lsl #2
    sub             x0,  x0,  x1, lsl #1
    ld1             {v20.16b},  [x0], x1
    ld1             {v18.16b},  [x0], x1
    ld1             {v16.16b},  [x0], x1

    h264_loop_filter_luma

    sub             x0,  x0,  x1, lsl #1
    st1             {v17.16b}, [x0], x1
    st1             {v16.16b}, [x0], x1
    st1             {v0.16b},  [x0], x1
    st1             {v19.16b}, [x0]

    ret
endfunc

function deblock_h_luma_neon, export=1
    h264_loop_filter_start

    sub             x0,  x0,  #4
    ld1             {v6.8b},  [x0], x1
    ld1             {v20.8b}, [x0], x1
    ld1             {v18.8b}, [x0], x1
    ld1             {v16.8b}, [x0], x1
    ld1             {v0.8b},  [x0], x1
    ld1             {v2.8b},  [x0], x1
    ld1             {v4.8b},  [x0], x1
    ld1             {v26.8b}, [x0], x1
    ld1             {v6.d}[1],  [x0], x1
    ld1             {v20.d}[1], [x0], x1
    ld1             {v18.d}[1], [x0], x1
    ld1             {v16.d}[1], [x0], x1
    ld1             {v0.d}[1],  [x0], x1
    ld1             {v2.d}[1],  [x0], x1
    ld1             {v4.d}[1],  [x0], x1
    ld1             {v26.d}[1], [x0], x1

    transpose_8x16.b v6, v20, v18, v16, v0, v2, v4, v26, v21, v23

    h264_loop_filter_luma

    transpose_4x16.b v17, v16, v0, v19, v21, v23, v25, v27

    sub             x0,  x0,  x1, lsl #4
    add             x0,  x0,  #2
    st1             {v17.s}[0],  [x0], x1
    st1             {v16.s}[0], [x0], x1
    st1             {v0.s}[0],  [x0], x1
    st1             {v19.s}[0], [x0], x1
    st1             {v17.s}[1],  [x0], x1
    st1             {v16.s}[1], [x0], x1
    st1             {v0.s}[1],  [x0], x1
    st1             {v19.s}[1], [x0], x1
    st1             {v17.s}[2],  [x0], x1
    st1             {v16.s}[2], [x0], x1
    st1             {v0.s}[2],  [x0], x1
    st1             {v19.s}[2], [x0], x1
    st1             {v17.s}[3],  [x0], x1
    st1             {v16.s}[3], [x0], x1
    st1             {v0.s}[3],  [x0], x1
    st1             {v19.s}[3], [x0], x1

    ret
endfunc

.macro h264_loop_filter_start_intra
    orr             w4,  w2,  w3
    cmp             w4,  #0
    b.ne            1f
    ret
1:
    dup             v30.16b, w2                // alpha
    dup             v31.16b, w3                // beta
.endm

.macro h264_loop_filter_luma_intra
    uabd            v16.16b, v7.16b,  v0.16b        // abs(p0 - q0)
    uabd            v17.16b, v6.16b,  v7.16b        // abs(p1 - p0)
    uabd            v18.16b, v1.16b,  v0.16b        // abs(q1 - q0)
    cmhi            v19.16b, v30.16b, v16.16b       // < alpha
    cmhi            v17.16b, v31.16b, v17.16b       // < beta
    cmhi            v18.16b, v31.16b, v18.16b       // < beta

    movi            v29.16b, #2
    ushr            v30.16b, v30.16b, #2            // alpha >> 2
    add             v30.16b, v30.16b, v29.16b       // (alpha >> 2) + 2
    cmhi            v16.16b, v30.16b, v16.16b       // < (alpha >> 2) + 2

    and             v19.16b, v19.16b, v17.16b
    and             v19.16b, v19.16b, v18.16b
    shrn            v20.8b,  v19.8h,  #4
    mov             x4, v20.d[0]
    cbz             x4, 9f

    ushll           v20.8h,  v6.8b,   #1
    ushll           v22.8h,  v1.8b,   #1
    ushll2          v21.8h,  v6.16b,  #1
    ushll2          v23.8h,  v1.16b,  #1
    uaddw           v20.8h,  v20.8h,  v7.8b
    uaddw           v22.8h,  v22.8h,  v0.8b
    uaddw2          v21.8h,  v21.8h,  v7.16b
    uaddw2          v23.8h,  v23.8h,  v0.16b
    uaddw           v20.8h,  v20.8h,  v1.8b
    uaddw           v22.8h,  v22.8h,  v6.8b
    uaddw2          v21.8h,  v21.8h,  v1.16b
    uaddw2          v23.8h,  v23.8h,  v6.16b

    rshrn           v24.8b,  v20.8h,  #2 // p0'_1
    rshrn           v25.8b,  v22.8h,  #2 // q0'_1
    rshrn2          v24.16b, v21.8h,  #2 // p0'_1
    rshrn2          v25.16b, v23.8h,  #2 // q0'_1

    uabd            v17.16b, v5.16b,  v7.16b        // abs(p2 - p0)
    uabd            v18.16b, v2.16b,  v0.16b        // abs(q2 - q0)
    cmhi            v17.16b, v31.16b, v17.16b       // < beta
    cmhi            v18.16b, v31.16b, v18.16b       // < beta

    and             v17.16b, v16.16b, v17.16b  // if_2 && if_3
    and             v18.16b, v16.16b, v18.16b  // if_2 && if_4

    not             v30.16b, v17.16b
    not             v31.16b, v18.16b

    and             v30.16b, v30.16b, v19.16b  // if_1 && !(if_2 && if_3)
    and             v31.16b, v31.16b, v19.16b  // if_1 && !(if_2 && if_4)

    and             v17.16b, v19.16b, v17.16b  // if_1 && if_2 && if_3
    and             v18.16b, v19.16b, v18.16b  // if_1 && if_2 && if_4

    //calc            p, v7, v6, v5, v4, v17, v7, v6, v5, v4
    uaddl           v26.8h,  v5.8b,   v7.8b
    uaddl2          v27.8h,  v5.16b,  v7.16b
    uaddw           v26.8h,  v26.8h,  v0.8b
    uaddw2          v27.8h,  v27.8h,  v0.16b
    add             v20.8h,  v20.8h,  v26.8h
    add             v21.8h,  v21.8h,  v27.8h
    uaddw           v20.8h,  v20.8h,  v0.8b
    uaddw2          v21.8h,  v21.8h,  v0.16b
    rshrn           v20.8b,  v20.8h,  #3 // p0'_2
    rshrn2          v20.16b, v21.8h,  #3 // p0'_2
    uaddw           v26.8h,  v26.8h,  v6.8b
    uaddw2          v27.8h,  v27.8h,  v6.16b
    rshrn           v21.8b,  v26.8h,  #2 // p1'_2
    rshrn2          v21.16b, v27.8h,  #2 // p1'_2
    uaddl           v28.8h,  v4.8b,   v5.8b
    uaddl2          v29.8h,  v4.16b,  v5.16b
    shl             v28.8h,  v28.8h,  #1
    shl             v29.8h,  v29.8h,  #1
    add             v28.8h,  v28.8h,  v26.8h
    add             v29.8h,  v29.8h,  v27.8h
    rshrn           v19.8b,  v28.8h,  #3 // p2'_2
    rshrn2          v19.16b, v29.8h,  #3 // p2'_2

    //calc            q, v0, v1, v2, v3, v18, v0, v1, v2, v3
    uaddl           v26.8h,  v2.8b,   v0.8b
    uaddl2          v27.8h,  v2.16b,  v0.16b
    uaddw           v26.8h,  v26.8h,  v7.8b
    uaddw2          v27.8h,  v27.8h,  v7.16b
    add             v22.8h,  v22.8h,  v26.8h
    add             v23.8h,  v23.8h,  v27.8h
    uaddw           v22.8h,  v22.8h,  v7.8b
    uaddw2          v23.8h,  v23.8h,  v7.16b
    rshrn           v22.8b,  v22.8h,  #3 // q0'_2
    rshrn2          v22.16b, v23.8h,  #3 // q0'_2
    uaddw           v26.8h,  v26.8h,  v1.8b
    uaddw2          v27.8h,  v27.8h,  v1.16b
    rshrn           v23.8b,  v26.8h,  #2 // q1'_2
    rshrn2          v23.16b, v27.8h,  #2 // q1'_2
    uaddl           v28.8h,  v2.8b,   v3.8b
    uaddl2          v29.8h,  v2.16b,  v3.16b
    shl             v28.8h,  v28.8h,  #1
    shl             v29.8h,  v29.8h,  #1
    add             v28.8h,  v28.8h,  v26.8h
    add             v29.8h,  v29.8h,  v27.8h
    rshrn           v26.8b,  v28.8h,  #3 // q2'_2
    rshrn2          v26.16b, v29.8h,  #3 // q2'_2

    bit             v7.16b,  v24.16b, v30.16b  // p0'_1
    bit             v0.16b,  v25.16b, v31.16b  // q0'_1
    bit             v7.16b, v20.16b,  v17.16b  // p0'_2
    bit             v6.16b, v21.16b,  v17.16b  // p1'_2
    bit             v5.16b, v19.16b,  v17.16b  // p2'_2
    bit             v0.16b, v22.16b,  v18.16b  // q0'_2
    bit             v1.16b, v23.16b,  v18.16b  // q1'_2
    bit             v2.16b, v26.16b,  v18.16b  // q2'_2
.endm

function deblock_v_luma_intra_neon, export=1
    h264_loop_filter_start_intra

    ld1             {v0.16b},  [x0], x1 // q0
    ld1             {v1.16b},  [x0], x1 // q1
    ld1             {v2.16b},  [x0], x1 // q2
    ld1             {v3.16b},  [x0], x1 // q3
    sub             x0,  x0,  x1, lsl #3
    ld1             {v4.16b},  [x0], x1 // p3
    ld1             {v5.16b},  [x0], x1 // p2
    ld1             {v6.16b},  [x0], x1 // p1
    ld1             {v7.16b},  [x0]     // p0

    h264_loop_filter_luma_intra

    sub             x0,  x0,  x1, lsl #1
    st1             {v5.16b}, [x0], x1  // p2
    st1             {v6.16b}, [x0], x1  // p1
    st1             {v7.16b}, [x0], x1  // p0
    st1             {v0.16b}, [x0], x1  // q0
    st1             {v1.16b}, [x0], x1  // q1
    st1             {v2.16b}, [x0]      // q2
9:
    ret
endfunc

function deblock_h_luma_intra_neon, export=1
    h264_loop_filter_start_intra

    sub             x0,  x0,  #4
    ld1             {v4.8b},  [x0], x1
    ld1             {v5.8b},  [x0], x1
    ld1             {v6.8b},  [x0], x1
    ld1             {v7.8b},  [x0], x1
    ld1             {v0.8b},  [x0], x1
    ld1             {v1.8b},  [x0], x1
    ld1             {v2.8b},  [x0], x1
    ld1             {v3.8b},  [x0], x1
    ld1             {v4.d}[1],  [x0], x1
    ld1             {v5.d}[1],  [x0], x1
    ld1             {v6.d}[1],  [x0], x1
    ld1             {v7.d}[1],  [x0], x1
    ld1             {v0.d}[1],  [x0], x1
    ld1             {v1.d}[1],  [x0], x1
    ld1             {v2.d}[1],  [x0], x1
    ld1             {v3.d}[1],  [x0], x1

    transpose_8x16.b v4, v5, v6, v7, v0, v1, v2, v3, v21, v23

    h264_loop_filter_luma_intra

    transpose_8x16.b v4, v5, v6, v7, v0, v1, v2, v3, v21, v23

    sub             x0,  x0,  x1, lsl #4
    st1             {v4.8b},  [x0], x1
    st1             {v5.8b},  [x0], x1
    st1             {v6.8b},  [x0], x1
    st1             {v7.8b},  [x0], x1
    st1             {v0.8b},  [x0], x1
    st1             {v1.8b},  [x0], x1
    st1             {v2.8b},  [x0], x1
    st1             {v3.8b},  [x0], x1
    st1             {v4.d}[1],  [x0], x1
    st1             {v5.d}[1],  [x0], x1
    st1             {v6.d}[1],  [x0], x1
    st1             {v7.d}[1],  [x0], x1
    st1             {v0.d}[1],  [x0], x1
    st1             {v1.d}[1],  [x0], x1
    st1             {v2.d}[1],  [x0], x1
    st1             {v3.d}[1],  [x0], x1
9:
    ret
endfunc

.macro h264_loop_filter_chroma
    dup             v22.16b, w2              // alpha
    uxtl            v24.8h,  v24.8b
    uabd            v26.16b, v16.16b, v0.16b   // abs(p0 - q0)
    uxtl            v4.8h,   v0.8b
    uxtl2           v5.8h,   v0.16b
    uabd            v28.16b, v18.16b, v16.16b  // abs(p1 - p0)
    usubw           v4.8h,   v4.8h,   v16.8b
    usubw2          v5.8h,   v5.8h,   v16.16b
    sli             v24.8h,  v24.8h,  #8
    shl             v4.8h,   v4.8h,   #2
    shl             v5.8h,   v5.8h,   #2
    uabd            v30.16b, v2.16b,  v0.16b   // abs(q1 - q0)
    uxtl            v24.4s,  v24.4h
    uaddw           v4.8h,   v4.8h,   v18.8b
    uaddw2          v5.8h,   v5.8h,   v18.16b
    cmhi            v26.16b, v22.16b, v26.16b  // < alpha
    usubw           v4.8h,   v4.8h,   v2.8b
    usubw2          v5.8h,   v5.8h,   v2.16b
    sli             v24.4s,  v24.4s,  #16
    dup             v22.16b, w3              // beta
    rshrn           v4.8b,   v4.8h,   #3
    rshrn2          v4.16b,  v5.8h,   #3
    cmhi            v28.16b, v22.16b, v28.16b  // < beta
    cmhi            v30.16b, v22.16b, v30.16b  // < beta
    smin            v4.16b,  v4.16b,  v24.16b
    neg             v25.16b, v24.16b
    and             v26.16b, v26.16b, v28.16b
    smax            v4.16b,  v4.16b,  v25.16b
    and             v26.16b, v26.16b, v30.16b
    uxtl            v22.8h,  v0.8b
    uxtl2           v23.8h,  v0.16b
    and             v4.16b,  v4.16b,  v26.16b
    uxtl            v28.8h,  v16.8b
    uxtl2           v29.8h,  v16.16b
    saddw           v28.8h,  v28.8h,  v4.8b
    saddw2          v29.8h,  v29.8h,  v4.16b
    ssubw           v22.8h,  v22.8h,  v4.8b
    ssubw2          v23.8h,  v23.8h,  v4.16b
    sqxtun          v16.8b,  v28.8h
    sqxtun          v0.8b,   v22.8h
    sqxtun2         v16.16b, v29.8h
    sqxtun2         v0.16b,  v23.8h
.endm

function deblock_v_chroma_neon, export=1
    h264_loop_filter_start

    sub             x0,  x0,  x1, lsl #1
    ld1             {v18.16b}, [x0], x1
    ld1             {v16.16b}, [x0], x1
    ld1             {v0.16b},  [x0], x1
    ld1             {v2.16b},  [x0]

    h264_loop_filter_chroma

    sub             x0,  x0,  x1, lsl #1
    st1             {v16.16b}, [x0], x1
    st1             {v0.16b},  [x0], x1

    ret
endfunc

function deblock_h_chroma_neon, export=1
    h264_loop_filter_start

    sub             x0,  x0,  #4
deblock_h_chroma:
    ld1             {v18.d}[0], [x0], x1
    ld1             {v16.d}[0], [x0], x1
    ld1             {v0.d}[0],  [x0], x1
    ld1             {v2.d}[0],  [x0], x1
    ld1             {v18.d}[1], [x0], x1
    ld1             {v16.d}[1], [x0], x1
    ld1             {v0.d}[1],  [x0], x1
    ld1             {v2.d}[1],  [x0], x1

    transpose4x8.h  v18, v16, v0, v2, v28, v29, v30, v31

    h264_loop_filter_chroma

    transpose4x8.h  v18, v16, v0, v2, v28, v29, v30, v31

    sub             x0,  x0,  x1, lsl #3
    st1             {v18.d}[0], [x0], x1
    st1             {v16.d}[0], [x0], x1
    st1             {v0.d}[0],  [x0], x1
    st1             {v2.d}[0],  [x0], x1
    st1             {v18.d}[1], [x0], x1
    st1             {v16.d}[1], [x0], x1
    st1             {v0.d}[1],  [x0], x1
    st1             {v2.d}[1],  [x0], x1

    ret
endfunc

function deblock_h_chroma_422_neon, export=1
    add             x5,  x0,  x1
    sub             x0,  x0,  #4
    add             x1,  x1,  x1
    h264_loop_filter_start
    mov             x7,  x30
    bl              deblock_h_chroma
    mov             x30, x7
    sub             x0,  x5,  #4
    mov             v24.s[0], w6
    b               deblock_h_chroma
endfunc

.macro h264_loop_filter_chroma8
    dup             v22.8b,  w2                 // alpha
    uxtl            v24.8h,  v24.8b
    uabd            v26.8b,  v16.8b,  v17.8b    // abs(p0 - q0)
    uxtl            v4.8h,   v17.8b
    uabd            v28.8b,  v18.8b,  v16.8b    // abs(p1 - p0)
    usubw           v4.8h,   v4.8h,   v16.8b
    sli             v24.8h,  v24.8h,  #8
    shl             v4.8h,   v4.8h,   #2
    uabd            v30.8b,  v19.8b,  v17.8b    // abs(q1 - q0)
    uaddw           v4.8h,   v4.8h,   v18.8b
    cmhi            v26.8b,  v22.8b,  v26.8b    // < alpha
    usubw           v4.8h,   v4.8h,   v19.8b
    dup             v22.8b,  w3                 // beta
    rshrn           v4.8b,   v4.8h,   #3
    cmhi            v28.8b,  v22.8b,  v28.8b    // < beta
    cmhi            v30.8b,  v22.8b,  v30.8b    // < beta
    smin            v4.8b,   v4.8b,   v24.8b
    neg             v25.8b,  v24.8b
    and             v26.8b,  v26.8b,  v28.8b
    smax            v4.8b,   v4.8b,   v25.8b
    and             v26.8b,  v26.8b,  v30.8b
    uxtl            v22.8h,  v17.8b
    and             v4.8b,   v4.8b,   v26.8b
    uxtl            v28.8h,  v16.8b
    saddw           v28.8h,  v28.8h,  v4.8b
    ssubw           v22.8h,  v22.8h,  v4.8b
    sqxtun          v16.8b,  v28.8h
    sqxtun          v17.8b,  v22.8h
.endm

function deblock_h_chroma_mbaff_neon, export=1
    h264_loop_filter_start

    sub             x4,  x0,  #4
    sub             x0,  x0,  #2

    ld1             {v18.8b}, [x4], x1
    ld1             {v16.8b}, [x4], x1
    ld1             {v17.8b},  [x4], x1
    ld1             {v19.8b},  [x4]

    transpose4x4.h  v18, v16, v17, v19, v28, v29, v30, v31

    h264_loop_filter_chroma8

    st2             {v16.h,v17.h}[0], [x0], x1
    st2             {v16.h,v17.h}[1], [x0], x1
    st2             {v16.h,v17.h}[2], [x0], x1
    st2             {v16.h,v17.h}[3], [x0]

    ret
endfunc

.macro h264_loop_filter_chroma_intra width=16
    uabd            v26.16b, v16.16b, v17.16b  // abs(p0 - q0)
    uabd            v27.16b, v18.16b, v16.16b  // abs(p1 - p0)
    uabd            v28.16b, v19.16b, v17.16b  // abs(q1 - q0)
    cmhi            v26.16b, v30.16b, v26.16b  // < alpha
    cmhi            v27.16b, v31.16b, v27.16b  // < beta
    cmhi            v28.16b, v31.16b, v28.16b  // < beta
    and             v26.16b, v26.16b, v27.16b
    and             v26.16b, v26.16b, v28.16b

    ushll           v4.8h,   v18.8b,  #1
    ushll           v6.8h,   v19.8b,  #1
.ifc \width, 16
    ushll2          v5.8h,   v18.16b, #1
    ushll2          v7.8h,   v19.16b, #1
    uaddl2          v21.8h,  v16.16b, v19.16b
    uaddl2          v23.8h,  v17.16b, v18.16b
.endif
    uaddl           v20.8h,  v16.8b,  v19.8b
    uaddl           v22.8h,  v17.8b,  v18.8b
    add             v20.8h,  v20.8h,  v4.8h     // mlal?
    add             v22.8h,  v22.8h,  v6.8h
.ifc \width, 16
    add             v21.8h,  v21.8h,  v5.8h
    add             v23.8h,  v23.8h,  v7.8h
.endif
    uqrshrn         v24.8b,  v20.8h,  #2
    uqrshrn         v25.8b,  v22.8h,  #2
.ifc \width, 16
    uqrshrn2        v24.16b, v21.8h,  #2
    uqrshrn2        v25.16b, v23.8h,  #2
.endif
    bit             v16.16b, v24.16b, v26.16b
    bit             v17.16b, v25.16b, v26.16b
.endm

function deblock_v_chroma_intra_neon, export=1
    h264_loop_filter_start_intra

    sub             x0,  x0,  x1, lsl #1
    ld1             {v18.16b}, [x0], x1
    ld1             {v16.16b}, [x0], x1
    ld1             {v17.16b}, [x0], x1
    ld1             {v19.16b}, [x0]

    h264_loop_filter_chroma_intra

    sub             x0,  x0,  x1, lsl #1
    st1             {v16.16b}, [x0], x1
    st1             {v17.16b}, [x0], x1

    ret
endfunc

function deblock_h_chroma_intra_mbaff_neon, export=1
    h264_loop_filter_start_intra

    sub             x4,  x0,  #4
    sub             x0,  x0,  #2
    ld1             {v18.8b}, [x4], x1
    ld1             {v16.8b}, [x4], x1
    ld1             {v17.8b}, [x4], x1
    ld1             {v19.8b}, [x4], x1

    transpose4x4.h  v18, v16, v17, v19, v26, v27, v28, v29

    h264_loop_filter_chroma_intra width=8

    st2             {v16.h,v17.h}[0], [x0], x1
    st2             {v16.h,v17.h}[1], [x0], x1
    st2             {v16.h,v17.h}[2], [x0], x1
    st2             {v16.h,v17.h}[3], [x0], x1

    ret
endfunc

function deblock_h_chroma_intra_neon, export=1
    h264_loop_filter_start_intra

    sub             x4,  x0,  #4
    sub             x0,  x0,  #2
    ld1             {v18.d}[0], [x4], x1
    ld1             {v16.d}[0], [x4], x1
    ld1             {v17.d}[0], [x4], x1
    ld1             {v19.d}[0], [x4], x1
    ld1             {v18.d}[1], [x4], x1
    ld1             {v16.d}[1], [x4], x1
    ld1             {v17.d}[1], [x4], x1
    ld1             {v19.d}[1], [x4], x1

    transpose4x8.h  v18, v16, v17, v19, v26, v27, v28, v29

    h264_loop_filter_chroma_intra

    st2             {v16.h,v17.h}[0], [x0], x1
    st2             {v16.h,v17.h}[1], [x0], x1
    st2             {v16.h,v17.h}[2], [x0], x1
    st2             {v16.h,v17.h}[3], [x0], x1
    st2             {v16.h,v17.h}[4], [x0], x1
    st2             {v16.h,v17.h}[5], [x0], x1
    st2             {v16.h,v17.h}[6], [x0], x1
    st2             {v16.h,v17.h}[7], [x0], x1

    ret
endfunc

function deblock_h_chroma_422_intra_neon, export=1
    h264_loop_filter_start_intra

    sub             x4,  x0,  #4
    sub             x0,  x0,  #2
    ld1             {v18.d}[0], [x4], x1
    ld1             {v16.d}[0], [x4], x1
    ld1             {v17.d}[0], [x4], x1
    ld1             {v19.d}[0], [x4], x1
    ld1             {v18.d}[1], [x4], x1
    ld1             {v16.d}[1], [x4], x1
    ld1             {v17.d}[1], [x4], x1
    ld1             {v19.d}[1], [x4], x1

    transpose4x8.h  v18, v16, v17, v19, v26, v27, v28, v29

    h264_loop_filter_chroma_intra

    st2             {v16.h,v17.h}[0], [x0], x1
    st2             {v16.h,v17.h}[1], [x0], x1
    st2             {v16.h,v17.h}[2], [x0], x1
    st2             {v16.h,v17.h}[3], [x0], x1
    st2             {v16.h,v17.h}[4], [x0], x1
    st2             {v16.h,v17.h}[5], [x0], x1
    st2             {v16.h,v17.h}[6], [x0], x1
    st2             {v16.h,v17.h}[7], [x0], x1

    ld1             {v18.d}[0], [x4], x1
    ld1             {v16.d}[0], [x4], x1
    ld1             {v17.d}[0], [x4], x1
    ld1             {v19.d}[0], [x4], x1
    ld1             {v18.d}[1], [x4], x1
    ld1             {v16.d}[1], [x4], x1
    ld1             {v17.d}[1], [x4], x1
    ld1             {v19.d}[1], [x4], x1

    transpose4x8.h  v18, v16, v17, v19, v26, v27, v28, v29

    h264_loop_filter_chroma_intra

    st2             {v16.h,v17.h}[0], [x0], x1
    st2             {v16.h,v17.h}[1], [x0], x1
    st2             {v16.h,v17.h}[2], [x0], x1
    st2             {v16.h,v17.h}[3], [x0], x1
    st2             {v16.h,v17.h}[4], [x0], x1
    st2             {v16.h,v17.h}[5], [x0], x1
    st2             {v16.h,v17.h}[6], [x0], x1
    st2             {v16.h,v17.h}[7], [x0], x1

    ret
endfunc

// void deblock_strength( uint8_t nnz[X264_SCAN8_SIZE],
//                        int8_t ref[2][X264_SCAN8_LUMA_SIZE],
//                        int16_t mv[2][X264_SCAN8_LUMA_SIZE][2],
//                        uint8_t bs[2][8][4], int mvy_limit,
//                        int bframe )
function deblock_strength_neon, export=1
    movi        v4.16b, #0
    lsl         w4,  w4,  #8
    add         x3,  x3,  #32
    sub         w4,  w4,  #(1<<8)-3
    movi        v5.16b, #0
    dup         v6.8h,  w4
    mov         x6,  #-32

bframe:
    // load bytes ref
    add         x2,  x2,  #16
    ld1         {v31.d}[1], [x1], #8
    ld1         {v1.16b}, [x1], #16
    movi        v0.16b,  #0
    ld1         {v2.16b}, [x1], #16
    ext         v3.16b,  v0.16b,  v1.16b,  #15
    ext         v0.16b,  v0.16b,  v2.16b,  #15
    unzip       v21.4s,  v22.4s,  v1.4s,   v2.4s
    unzip       v23.4s,  v20.4s,  v3.4s,   v0.4s
    ext         v21.16b, v31.16b, v22.16b, #12

    eor         v0.16b,  v20.16b, v22.16b
    eor         v1.16b,  v21.16b, v22.16b
    orr         v4.16b,  v4.16b,  v0.16b
    orr         v5.16b,  v5.16b,  v1.16b

    ld1         {v21.8h}, [x2], #16      // mv + 0x10
    ld1         {v19.8h}, [x2], #16      // mv + 0x20
    ld1         {v22.8h}, [x2], #16      // mv + 0x30
    ld1         {v18.8h}, [x2], #16      // mv + 0x40
    ld1         {v23.8h}, [x2], #16      // mv + 0x50
    ext         v19.16b, v19.16b, v22.16b, #12
    ext         v18.16b, v18.16b, v23.16b, #12
    sabd        v0.8h,   v22.8h,  v19.8h
    ld1         {v19.8h}, [x2], #16      // mv + 0x60
    sabd        v1.8h,   v23.8h,  v18.8h
    ld1         {v24.8h}, [x2], #16      // mv + 0x70
    uqxtn       v0.8b,   v0.8h
    ld1         {v18.8h}, [x2], #16      // mv + 0x80
    ld1         {v25.8h}, [x2], #16      // mv + 0x90
    uqxtn2      v0.16b,  v1.8h
    ext         v19.16b, v19.16b, v24.16b, #12
    ext         v18.16b, v18.16b, v25.16b, #12
    sabd        v1.8h,   v24.8h,  v19.8h
    sabd        v2.8h,   v25.8h,  v18.8h
    uqxtn       v1.8b,   v1.8h
    uqxtn2      v1.16b,  v2.8h

    uqsub       v0.16b,  v0.16b,  v6.16b
    uqsub       v1.16b,  v1.16b,  v6.16b
    uqxtn       v0.8b,   v0.8h
    uqxtn2      v0.16b,  v1.8h

    sabd        v1.8h,   v22.8h,  v23.8h
    orr         v4.16b,  v4.16b,  v0.16b

    sabd        v0.8h,   v21.8h,  v22.8h
    sabd        v2.8h,   v23.8h,  v24.8h
    sabd        v3.8h,   v24.8h,  v25.8h
    uqxtn       v0.8b,   v0.8h
    uqxtn2      v0.16b,  v1.8h
    uqxtn       v1.8b,   v2.8h
    uqxtn2      v1.16b,  v3.8h

    uqsub       v0.16b,  v0.16b,  v6.16b
    uqsub       v1.16b,  v1.16b,  v6.16b
    uqxtn       v0.8b,   v0.8h
    uqxtn2      v0.16b,  v1.8h
    subs        w5,  w5,  #1
    orr         v5.16b,  v5.16b,  v0.16b
    b.eq        bframe

    movi        v6.16b, #1
    // load bytes nnz
    ld1         {v31.d}[1], [x0], #8
    ld1         {v1.16b}, [x0], #16
    movi        v0.16b,  #0
    ld1         {v2.16b}, [x0], #16
    ext         v3.16b,  v0.16b,  v1.16b,  #15
    ext         v0.16b,  v0.16b,  v2.16b,  #15
    unzip       v21.4s,  v22.4s,  v1.4s,   v2.4s
    unzip       v23.4s,  v20.4s,  v3.4s,   v0.4s
    ext         v21.16b, v31.16b, v22.16b, #12

    movrel      x7,  transpose_table
    ld1         {v7.16b}, [x7]
    orr         v0.16b,  v20.16b, v22.16b
    orr         v1.16b,  v21.16b, v22.16b
    umin        v0.16b,  v0.16b,  v6.16b
    umin        v1.16b,  v1.16b,  v6.16b
    umin        v4.16b,  v4.16b,  v6.16b        // mv ? 1 : 0
    umin        v5.16b,  v5.16b,  v6.16b
    add         v0.16b,  v0.16b,  v0.16b        // nnz ? 2 : 0
    add         v1.16b,  v1.16b,  v1.16b
    umax        v4.16b,  v4.16b,  v0.16b
    umax        v5.16b,  v5.16b,  v1.16b
    tbl         v6.16b, {v4.16b}, v7.16b
    st1         {v5.16b}, [x3], x6       // bs[1]
    st1         {v6.16b}, [x3]           // bs[0]
    ret
endfunc

const transpose_table
    .byte 0, 4,  8, 12
    .byte 1, 5,  9, 13
    .byte 2, 6, 10, 14
    .byte 3, 7, 11, 15
endconst


================================================
FILE: common/aarch64/deblock.h
================================================
/*****************************************************************************
 * deblock.h: aarch64 deblocking
 *****************************************************************************
 * Copyright (C) 2017-2025 x264 project
 *
 * Authors: Anton Mitrofanov <BugMaster@narod.ru>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#ifndef X264_AARCH64_DEBLOCK_H
#define X264_AARCH64_DEBLOCK_H

#define x264_deblock_v_luma_neon x264_template(deblock_v_luma_neon)
void x264_deblock_v_luma_neon  ( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 );
#define x264_deblock_h_luma_neon x264_template(deblock_h_luma_neon)
void x264_deblock_h_luma_neon  ( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 );
#define x264_deblock_v_chroma_neon x264_template(deblock_v_chroma_neon)
void x264_deblock_v_chroma_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 );
#define x264_deblock_h_chroma_neon x264_template(deblock_h_chroma_neon)
void x264_deblock_h_chroma_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 );
#define x264_deblock_strength_neon x264_template(deblock_strength_neon)
void x264_deblock_strength_neon( uint8_t nnz[X264_SCAN8_SIZE], int8_t ref[2][X264_SCAN8_LUMA_SIZE],
                                 int16_t mv[2][X264_SCAN8_LUMA_SIZE][2], uint8_t bs[2][8][4],
                                 int mvy_limit, int bframe );
#define x264_deblock_h_chroma_422_neon x264_template(deblock_h_chroma_422_neon)
void x264_deblock_h_chroma_422_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 );
#define x264_deblock_h_chroma_mbaff_neon x264_template(deblock_h_chroma_mbaff_neon)
void x264_deblock_h_chroma_mbaff_neon( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 );
#define x264_deblock_h_chroma_intra_mbaff_neon x264_template(deblock_h_chroma_intra_mbaff_neon)
void x264_deblock_h_chroma_intra_mbaff_neon( uint8_t *pix, intptr_t stride, int alpha, int beta );
#define x264_deblock_h_chroma_intra_neon x264_template(deblock_h_chroma_intra_neon)
void x264_deblock_h_chroma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta );
#define x264_deblock_h_chroma_422_intra_neon x264_template(deblock_h_chroma_422_intra_neon)
void x264_deblock_h_chroma_422_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta );
#define x264_deblock_v_chroma_intra_neon x264_template(deblock_v_chroma_intra_neon)
void x264_deblock_v_chroma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta );
#define x264_deblock_h_luma_intra_neon x264_template(deblock_h_luma_intra_neon)
void x264_deblock_h_luma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta );
#define x264_deblock_v_luma_intra_neon x264_template(deblock_v_luma_intra_neon)
void x264_deblock_v_luma_intra_neon( uint8_t *pix, intptr_t stride, int alpha, int beta );

#define x264_deblock_v_chroma_sve x264_template(deblock_v_chroma_sve)
void x264_deblock_v_chroma_sve( uint8_t *pix, intptr_t stride, int alpha, int beta, int8_t *tc0 );

#endif


================================================
FILE: common/aarch64/mc-a-common.S
================================================
/****************************************************************************
 * mc-a-common.S: aarch64 motion compensation
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: David Conrad <lessen42@gmail.com>
 *          Janne Grunau <janne-x264@jannau.net>
 *          Mans Rullgard <mans@mansr.com>
 *          Stefan Groenroos <stefan.gronroos@gmail.com>
 *          David Chen   <david.chen@myais.com.cn>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

// This file contains the NEON macros and functions that are intended to be used by
// the SVE/SVE2 functions as well

#if BIT_DEPTH == 8

// 0 < weight < 64
.macro load_weights_add_add
    mov         w6,  w6
.endm

// weight > 64
.macro load_weights_add_sub
    neg         w7,  w7
.endm

// weight < 0
.macro load_weights_sub_add
    neg         w6,  w6
.endm

function pixel_avg_w4_neon
1:  subs        w9,  w9,  #2
    ld1         {v0.s}[0], [x2], x3
    ld1         {v2.s}[0], [x4], x5
    urhadd      v0.8b,  v0.8b,  v2.8b
    ld1         {v1.s}[0], [x2], x3
    ld1         {v3.s}[0], [x4], x5
    urhadd      v1.8b,  v1.8b,  v3.8b
    st1         {v0.s}[0], [x0], x1
    st1         {v1.s}[0], [x0], x1
    b.gt        1b
    ret
endfunc

#else // BIT_DEPTH == 10

#endif


================================================
FILE: common/aarch64/mc-a-sve.S
================================================
/*****************************************************************************
 * mc-a-sve.S: aarch64 motion compensation
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: David Chen <david.chen@myais.com.cn>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "asm.S"
#include "mc-a-common.S"

ENABLE_SVE

#if BIT_DEPTH == 8

// void pixel_avg( uint8_t *dst,  intptr_t dst_stride,
//                 uint8_t *src1, intptr_t src1_stride,
//                 uint8_t *src2, intptr_t src2_stride, int weight );
.macro AVGH_SVE w h
function pixel_avg_\w\()x\h\()_sve, export=1
    mov         w10, #64
    cmp         w6,  #32
    mov         w9, #\h
    b.eq        pixel_avg_w\w\()_neon
    subs        w7,  w10,  w6
    b.lt        pixel_avg_weight_w\w\()_add_sub_sve     // weight > 64
    cmp         w6,  #0
    b.ge        pixel_avg_weight_w\w\()_add_add_sve
    b           pixel_avg_weight_w\w\()_sub_add_sve     // weight < 0
endfunc
.endm

AVGH_SVE  4, 2
AVGH_SVE  4, 4
AVGH_SVE  4, 8
AVGH_SVE  4, 16

// 0 < weight < 64
.macro weight_add_add_sve dst, s1, s2, h=
    mul         \dst, \s1, v30.8h
    mla         \dst, \s2, v31.8h
.endm

// weight > 64
.macro weight_add_sub_sve dst, s1, s2, h=
    mul         \dst, \s1, v30.8h
    mls         \dst, \s2, v31.8h
.endm

// weight < 0
.macro weight_sub_add_sve dst, s1, s2, h=
    mul         \dst, \s2, v31.8h
    mls         \dst, \s1, v30.8h
.endm

.macro AVG_WEIGHT_SVE ext
function pixel_avg_weight_w4_\ext\()_sve
    load_weights_\ext
    ptrue       p0.b, vl8
    dup         v30.8h, w6
    dup         v31.8h, w7
1:  // height loop
    subs        w9,  w9,  #2
    ld1b        {z0.h}, p0/z, [x2]
    add         x2, x2, x3
    ld1b        {z1.h}, p0/z, [x4]
    add         x4, x4, x5
    weight_\ext\()_sve v4.8h,  v0.8h,  v1.8h
    ld1b        {z2.h}, p0/z, [x2]
    add         x2, x2, x3
    ld1b        {z3.h}, p0/z, [x4]
    add         x4, x4, x5

    sqrshrun    v0.8b,  v4.8h,  #6
    weight_\ext\()_sve v5.8h,  v2.8h,  v3.8h
    st1         {v0.s}[0], [x0], x1
    sqrshrun    v1.8b,  v5.8h,  #6
    st1         {v1.s}[0], [x0], x1
    b.gt        1b
    ret
endfunc
.endm

AVG_WEIGHT_SVE add_add
AVG_WEIGHT_SVE add_sub
AVG_WEIGHT_SVE sub_add

#else // BIT_DEPTH == 10


#endif


================================================
FILE: common/aarch64/mc-a.S
================================================
/*****************************************************************************
 * mc.S: aarch64 motion compensation
 *****************************************************************************
 * Copyright (C) 2009-2025 x264 project
 *
 * Authors: David Conrad <lessen42@gmail.com>
 *          Janne Grunau <janne-x264@jannau.net>
 *          Mans Rullgard <mans@mansr.com>
 *          Stefan Groenroos <stefan.gronroos@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
 *
 * This program is also available under a commercial proprietary license.
 * For more information, contact us at licensing@x264.com.
 *****************************************************************************/

#include "asm.S"
#include "mc-a-common.S"

// note: prefetch stuff assumes 64-byte cacheline

// void prefetch_ref( uint8_t *pix, intptr_t stride, int parity )
function prefetch_ref_aarch64, export=1
    cmp         w2,  #1
    csel        x2,  xzr, x1, eq
    add         x0,  x0,  #64
    add         x0,  x0,  x2,  lsl #3

    lsl         x2,  x1,  #1
    add         x3,  x1,  x1,  lsl #1
    add         x4,  x0,  x1,  lsl #2

    prfm        pldl1strm, [x0]
    prfm        pldl1strm, [x0,  x1]
    prfm        pldl1strm, [x0,  x2]
    prfm        pldl1strm, [x0,  x3]
    prfm        pldl1strm, [x4]
    prfm        pldl1strm, [x4,  x1]
    prfm        pldl1strm, [x4,  x2]
    prfm        pldl1strm, [x4,  x3]
    ret
endfunc

// void prefetch_fenc( uint8_t *pix_y,  intptr_t stride_y,
//                     uint8_t *pix_uv, intptr_t stride_uv, int mb_x )
.macro prefetch_fenc sub
function prefetch_fenc_\sub\()_aarch64, export=1
    and         w6,  w5,  #3
    and         w7,  w5,  #3
    mul         x6,  x6,  x1
    mul         x7,  x7,  x3
    add         x0,  x0,  #64
    add         x2,  x2,  #64

    add         x0,  x0,  x6,  lsl #2
    add         x6,  x0,  x1,  lsl #1
    prfm        pldl1strm, [x0]
    prfm        pldl1strm, [x0,  x1]
    prfm        pldl1strm, [x6]
    prfm        pldl1strm, [x6, x1]

    add         x2,  x2,  x7,  lsl #1
    prfm        pldl1strm, [x2]
    prfm        pldl1strm, [x2,  x3]
.ifc \sub, 422
    add         x7,  x2,  x3,  lsl #1
    prfm        pldl1strm, [x7]
    prfm        pldl1strm, [x7,  x3]
.endif
    ret
endfunc
.endm

prefetch_fenc 420
prefetch_fenc 422

function mbtree_propagate_cost_neon, export=1
    ld1r        {v5.4s},  [x5]
8:
    subs        w6,  w6,  #8
    ld1         {v1.8h},  [x1], #16
    ld1         {v2.8h},  [x2], #16
    ld1         {v3.8h},  [x3], #16
    ld1         {v4.8h},  [x4], #16
    bic         v3.8h,  #0xc0, lsl #8
    umin        v3.8h,  v2.8h,  v3.8h
    umull       v20.4s, v2.4h,  v4.4h   // propagate_intra
    umull2      v21.4s, v2.8h,  v4.8h   // propagate_intra
    usubl       v22.4s, v2.4h,  v3.4h   // propagate_num
    usubl2      v23.4s, v2.8h,  v3.8h   // propagate_num
    uxtl        v26.4s, v2.4h           // propagate_denom
    uxtl2       v27.4s, v2.8h           // propagate_denom
    uxtl        v24.4s, v1.4h
    uxtl2       v25.4s, v1.8h
    ucvtf       v20.4s, v20.4s
    ucvtf       v21.4s, v21.4s
    ucvtf       v26.4s, v26.4s
    ucvtf       v27.4s, v27.4s
    ucvtf       v22.4s, v22.4s
    ucvtf       v23.4s, v23.4s
    frecpe      v28.4s, v26.4s
    frecpe      v29.4s, v27.4s
    ucvtf       v24.4s, v24.4s
    ucvtf       v25.4s, v25.4s
    frecps      v30.4s, v28.4s, v26.4s
    frecps      v31.4s, v29.4s, v27.4s
    fmla        v24.4s, v20.4s, v5.4s   // propagate_amount
    fmla        v25.4s, v21.4s, v5.4s   // propagate_amount
    fmul        v28.4s, v28.4s, v30.4s
    fmul        v29.4s, v29.4s, v31.4s
    fmul        v16.4s, v24.4s, v22.4s
    fmul        v17.4s, v25.4s, v23.4s
    fmul        v18.4s, v16.4s, v28.4s
    fmul        v19.4s, v17.4s, v29.4s
    fcvtns      v20.4s, v18.4s
    fcvtns      v21.4s, v19.4s
    sqxtn       v0.4h,  v20.4s
    sqxtn2      v0.8h,  v21.4s
    st1         {v0.8h},  [x0], #16
    b.gt        8b
    ret
endfunc

const pw_0to15, align=5
    .short 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
endconst

function mbtree_propagate_list_internal_neon, export=1
    movrel      x11,  pw_0to15
    dup         v31.8h,  w4             // bipred_weight
    movi        v30.8h,  #0xc0, lsl #8
    ld1         {v29.8h},  [x11] //h->mb.i_mb_x,h->mb.i_mb_y
    movi        v28.4s,  #4
    movi        v27.8h,  #31
    movi        v26.8h,  #32
    dup         v24.8h,  w5             // mb_y
    zip1        v29.8h,  v29.8h, v24.8h
8:
    subs        w6,  w6,  #8
    ld1         {v1.8h},  [x1], #16     // propagate_amount
    ld1         {v2.8h},  [x2], #16     // lowres_cost
    and         v2.16b, v2.16b, v30.16b
    cmeq        v25.8h, v2.8h,  v30.8h
    umull       v16.4s, v1.4h,  v31.4h
    umull2      v17.4s, v1.8h,  v31.8h
    rshrn       v16.4h, v16.4s, #6
    rshrn2      v16.8h, v17.4s, #6
    bsl         v25.16b, v16.16b, v1.16b // if( lists_used == 3 )
    //          propagate_amount = (propagate_amount * bipred_weight + 32) >> 6
    ld1         {v4.8h,v5.8h},  [x0],  #32
    sshr        v6.8h,  v4.8h,  #5
    sshr        v7.8h,  v5.8h,  #5
    add         v6.8h,  v6.8h,  v29.8h
    add         v29.8h, v29.8h, v28.8h
    add         v7.8h,  v7.8h,  v29.8h
    add         v29.8h, v29.8h, v28.8h
    st1         {v6.8h,v7.8h},  [x3],  #32
    and         v4.16b, v4.16b, v27.16b
    and         v5.16b, v5.16b, v27.16b
    uzp1        v6.8h,  v4.8h,  v5.8h   // x & 31
    uzp2        v7.8h,  v4.8h,  v5.8h   // y & 31
    sub         v4.8h,  v26.8h, v6.8h   // 32 - (x & 31)
    sub         v5.8h,  v26.8h, v7.8h   // 32 - (y & 31)
    mul         v19.8h, v6.8h,  v7.8h   // idx3weight = y*x;
    mul         v18.8h, v4.8h,  v7.8h   // idx2weight = y*(32-x);
    mul         v17.8h, v6.8h,  v5.8h   // idx1weight = (32-y)*x;
    mul         v16.8h, v4.8h,  v5.8h   // idx0weight = (32-y)*(32-x) ;
    umull       v6.4s,  v19.4h, v25.4h
    umull2      v7.4s,  v19.8h, v25.8h
    umull       v4.4s,  v18.4h, v25.4h
    umull2      v5.4s,  v18.8h, v25.8h
    umull       v2.4s,  v17.4h, v25.4h
    umull2      v3.4s,  v17.8h, v25.8h
    umull       v0.4s,  v16.4h, v25.4h
    umull2      v1.4s,  v16.8h, v25.8h
    rshrn       v19.4h, v6.4s,  #10
    rshrn2      v19.8h, v7.4s,  #10
    rshrn       v18.4h, v4.4s,  #10
    rshrn2      v18.8h, v5.4s,  #10
    rshrn       v17.4h, v2.4s,  #10
    rshrn2      v17.8h, v3.4s,  #10
    rshrn       v16.4h, v0.4s,  #10
    rshrn2      v16.8h, v1.4s,  #10
    zip1        v0.8h,  v16.8h, v17.8h
    zip2        v1.8h,  v16.8h, v17.8h
    zip1        v2.8h,  v18.8h, v19.8h
    zip2        v3.8h,  v18.8h, v19.8h
    st1         {v0.8h,v1.8h},  [x3], #32
    st1         {v2.8h,v3.8h},  [x3], #32
    b.ge        8b
    ret
endfunc

function memcpy_aligned_neon, export=1
    tst         x2,  #16
    b.eq        32f
    sub         x2,  x2,  #16
    ldr         q0,  [x1], #16
    str         q0,  [x0], #16
32:
    tst         x2,  #32
    b.eq        640f
    sub         x2,  x2,  #32
    ldp         q0,  q1,  [x1], #32
    stp         q0,  q1,  [x0], #32
640:
    cbz         x2,  1f
64:
    subs        x2,  x2,  #64
    ldp         q0,  q1,  [x1, #32]
    ldp         q2,  q3,  [x1], #64
    stp         q0,  q1,  [x0, #32]
    stp         q2,  q3,  [x0], #64
    b.gt        64b
1:
    ret
endfunc

function memzero_aligned_neon, export=1
    movi        v0.16b,  #0
    movi        v1.16b,  #0
1:
    subs        x1,  x1,  #128
    stp         q0,  q1,  [x0, #96]
    stp         q0,  q1,  [x0, #64]
    stp         q0,  q1,  [x0, #32]
    stp         q0,  q1,  [x0], 128
    b.gt        1b
    ret
endfunc

// void mbtree_fix8_pack( int16_t *dst, float *src, int count )
function mbtree_fix8_pack_neon, export=1
    subs        w3,  w2,  #8
    b.lt        2f
1:
    subs        w3,  w3,  #8
    ld1         {v0.4s,v1.4s}, [x1], #32
    fcvtzs      v0.4s,  v0.4s,  #8
    fcvtzs      v1.4s,  v1.4s,  #8
    sqxtn       v2.4h,  v0.4s
    sqxtn2      v2.8h,  v1.4s
    rev16       v3.16b, v2.16b
    st1         {v3.8h},  [x0], #16
    b.ge        1b
2:
    adds        w3,  w3,  #8
    b.eq        4f
3:
    subs        w3,  w3,  #1
    ldr         s0, [x1], #4
    fcvtzs      w4,  s0,  #8
    rev16       w5,  w4
    strh        w5, [x0], #2
    b.gt        3b
4:
    ret
endfunc

// void mbtree_fix8_unpack( float *dst, int16_t *src, int count )
function mbtree_fix8_unpack_neon, export=1
    subs        w3,  w2,  #8
    b.lt        2f
1:
    subs        w3,  w3,  #8
    ld1         {v0.8h}, [x1], #16
    rev16       v1.16b, v0.16b
    sxtl        v2.4s,  v1.4h
    sxtl2       v3.4s,  v1.8h
    scvtf       v4.4s,  v2.4s,  #8
    scvtf       v5.4s,  v3.4s,  #8
    st1         {v4.4s,v5.4s}, [x0], #32
    b.ge        1b
2:
    adds        w3,  w3,  #8
    b.eq        4f
3:
    subs        w3,  w3,  #1
    ldrh        w4, [x1], #2
    rev16       w5,  w4
    sxth        w6,  w5
    scvtf       s0,  w6,  #8
    str         s0, [x0], #4
    b.gt        3b
4:
    ret
endfunc

#if BIT_DEPTH == 8

// void pixel_avg( uint8_t *dst,  intptr_t dst_stride,
//                 uint8_t *src1, intptr_t src1_stride,
//                 uint8_t *src2, intptr_t src2_stride, int weight );
.macro AVGH w h
function pixel_avg_\w\()x\h\()_neon, export=1
    mov         w10, #64
    cmp         w6,  #32
    mov         w9, #\h
    b.eq        pixel_avg_w\w\()_neon
    subs        w7,  w10,  w6
    b.lt        pixel_avg_weight_w\w\()_add_sub_neon     // weight > 64
    cmp         w6,  #0
    b.ge        pixel_avg_weight_w\w\()_add_add_neon
    b           pixel_avg_weight_w\w\()_sub_add_neon     // weight < 0
endfunc
.endm

AVGH  4, 2
AVGH  4, 4
AVGH  4, 8
AVGH  4, 16
AVGH  8, 4
AVGH  8, 8
AVGH  8, 16
AVGH 16, 8
AVGH 16, 16

// 0 < weight < 64
.macro weight_add_add dst, s1, s2, h=
.ifc \h, 2
    umull2      \dst, \s1, v30.16b
    umlal2      \dst, \s2, v31.16b
.else
    umull       \dst, \s1, v30.8b
    umlal       \dst, \s2, v31.8b
.endif
.endm

// weight > 64
.macro weight_add_sub dst, s1, s2, h=
.ifc \h, 2
    umull2      \dst, \s1, v30.16b
    umlsl2      \dst, \s2, v31.16b
.else
    umull       \dst, \s1, v30.8b
    umlsl       \dst, \s2, v31.8b
.endif
.endm

// weight < 0
.macro weight_sub_add dst, s1, s2, h=
.ifc \h, 2
    umull2      \dst, \s2, v31.16b
    umlsl2      \dst, \s1, v30.16b
.else
    umull       \dst, \s2, v31.8b
    umlsl       \dst, \s1, v30.8b
.endif
.endm

.macro AVG_WEIGHT ext
function pixel_avg_weight_w4_\ext\()_neon
    load_weights_\ext
    dup         v30.8b, w6
    dup         v31.8b, w7
1:  // height loop
    subs        w9,  w9,  #2
    ld1         {v0.s}[0], [x2], x3
    ld1         {v1.s}[0], [x4], x5
    weight_\ext v4.8h,  v0.8b,  v1.8b
    ld1         {v2.s}[0], [x2], x3
    ld1         {v3.s}[0], [x4], x5
    sqrshrun    v0.8b,  v4.8h,  #6
    weight_\ext v5.8h,  v2.8b,  v3.8b
    st1         {v0.s}[0], [x0], x1
    sqrshrun    v1.8b,  v5.8h,  #6
    st1         {v1.s}[0], [x0], x1
    b.gt        1b
    ret
endfunc

function pixel_avg_weight_w8_\ext\()_neon
    load_weights_\ext
    dup         v30.8b, w6
    dup         v31.8b, w7
1:  // height loop
    subs        w9,  w9,  #4
    ld1         {v0.8b}, [x2], x3
    ld1         {v1.8b}, [x4], x5
    weight_\ext v16.8h, v0.8b,  v1.8b
    ld1         {v2.8b}, [x2], x3
    ld1         {v3.8b}, [x4], x5
    weight_\ext v17.8h, v2.8b,  v3.8b
    ld1         {v4.8b}, [x2], x3
    ld1         {v5.8b}, [x4], x5
    weight_\ext v18.8h, v4.8b,  v5.8b
    ld1         {v6.8b}, [x2], x3
    ld1         {v7.8b}, [x4], x5
    weight_\ext v19.8h, v6.8b,  v7.8b
    sqrshrun    v0.8b,  v16.8h, #6
    sqrshrun    v1.8b,  v17.8h, #6
    sqrshrun    v2.8b,  v18.8h, #6
    sqrshrun    v3.8b,  v19.8h, #6
    st1         {v0.8b}, [x0], x1
    st1         {v1.8b}, [x0], x1
    st1         {v2.8b}, [x0], x1
    st1         {v3.8b}, [x0], x1
    b.gt        1b
    ret
endfunc

function pixel_avg_weight_w16_\ext\()_neon
    load_weights_\ext
    dup         v30.16b, w6
    dup         v31.16b, w7
1:  // height loop
    subs        w9,  w9,  #2
    ld1         {v0.16b}, [x2], x3
    ld1         {v1.16b}, [x4], x5
    weight_\ext v16.8h, v0.8b,  v1.8b
    weight_\ext v17.8h, v0.16b, v1.16b, 2
    ld1         {v2.16b}, [x2], x3
    ld1         {v3.16b}, [x4], x5
    weight_\ext v18.8h, v2.8b,  v3.8b
    weight_\ext v19.8h, v2.16b, v3.16b, 2
    sqrshrun    v0.8b,  v16.8h, #6
    sqrshrun    v1.8b,  v18.8h, #6
    sqrshrun2   v0.16b, v17.8h, #6
    sqrshrun2   v1.16b, v19.8h, #6
    st1         {v0.16b}, [x0], x1
    st1         {v1.16b}, [x0], x1
    b.gt        1b
    ret
endfunc
.endm

AVG_WEIGHT add_add
AVG_WEIGHT add_sub
AVG_WEIGHT sub_add

function pixel_avg_w8_neon
1:  subs        w9,  w9,  #4
    ld1         {v0.8b}, [x2], x3
    ld1         {v1.8b}, [x4], x5
    ld1         {v2.8b}, [x2], x3
    urhadd      v0.8b,  v0.8b,  v1.8b
    ld1         {v3.8b}, [x4], x5
    st1         {v0.8b}, [x0], x1
    ld1         {v4.8b}, [x2], x3
    urhadd      v1.8b,  v2.8b,  v3.8b
    ld1         {v5.8b}, [x4], x5
    st1         {v1.8b}, [x0], x1
    ld1         {v6.8b}, [x2], x3
    ld1         {v7.8b}, [x4], x5
    urhadd      v2.8b,  v4.8b,  v5.8b
    urhadd      v3.8b,  v6.8b,  v7.8b
    st1         {v2.8b}, [x0], x1
    st1         {v3.8b}, [x0], x1
    b.gt        1b
    ret
endfunc

function pixel_avg_w16_neon
1:  subs        w9,  w9,  #4
    ld1         {v0.16b}, [x2], x3
    ld1         {v1.16b}, [x4], x5
    ld1         {v2.16b}, [x2], x3
    urhadd      v0.16b, v0.16b, v1.16b
    ld1         {v3.16b}, [x4], x5
    st1         {v0.16b}, [x0], x1
    ld1         {v4.16b}, [x2], x3
    urhadd      v1.16b, v2.16b, v3.16b
    ld1         {v5.16b}, [x4], x5
    st1         {v1.16b}, [x0], x1
    ld1         {v6.16b}, [x2], x3
    ld1         {v7.16b}, [x4], x5
    urhadd      v2.16b, v4.16b, v5.16b
    urhadd      v3.16b, v6.16b, v7.16b
    st1         {v2.16b}, [x0], x1
    st1         {v3.16b}, [x0], x1
    b.gt        1b
    ret
endfunc

function pixel_avg2_w4_neon, export=1
1:
    subs        w5,  w5,  #2
    ld1         {v0.s}[0],  [x2], x3
    ld1         {v2.s}[0],  [x4], x3
    urhadd      v0.8b,  v0.8b,  v2.8b
    ld1         {v1.s}[0],  [x2], x3
    ld1         {v3.s}[0],  [x4], x3
    urhadd      v1.8b,  v1.8b,  v3.8b
    st1         {v0.s}[0], [x0], x1
    st1         {v1.s}[0], [x0], x1
    b.gt        1b
    ret
endfunc

function pixel_avg2_w8_neon, export=1
1:
    subs        w5,  w5,  #2
    ld1         {v0.8b}, [x2], x3
    ld1         {v2.8b}, [x4], x3
    urhadd      v0.8b,  v0.8b,  v2.8b
    ld1         {v1.8b}, [x2], x3
    ld1         {v3.8b}, [x4], x3
    urhadd      v1.8b,  v1.8b,  v3.8b
    st1         {v0.8b}, [x0], x1
    st1         {v1.8b}, [x0], x1
    b.gt        1b
    ret
endfunc

function pixel_avg2_w16_neon, export=1
1:
    subs        w5,  w5,  #2
    ld1         {v0.16b}, [x2], x3
    ld1         {v2.16b}, [x4], x3
    urhadd      v0.16b, v0.16b, v2.16b
    ld1         {v1.16b}, [x2], x3
    ld1         {v3.16b}, [x4], x3
    urhadd      v1.16b, v1.16b, v3.16b
    st1         {v0.16b}, [x0], x1
    st1         {v1.16b}, [x0], x1
    b.gt        1b
    ret
endfunc

function pixel_avg2_w20_neon, export=1
    sub         x1,  x1,  #16
1:
    subs        w5,  w5,  #2
    ld1         {v0.16b,v1.16b}, [x2], x3
    ld1         {v2.16b,v3.16b}, [x4], x3
    urhadd      v0.16b, v0.16b, v2.16b
    urhadd      v1.8b,  v1.8b,  v3.8b
    ld1         {v4.16b,v5.16b}, [x2], x3
    ld1         {v6.16b,v7.16b}, [x4], x3
    urhadd      v4.16b, v4.16b, v6.16b
    urhadd      v5.8b,  v5.8b,  v7.8b
    st1         {v0.16b},  [x0], #16
    st1         {v1.s}[0], [x0], x1
    st1         {v4.16b},  [x0], #16
    st1         {v5.s}[0], [x0], x1
    b.gt        1b
    ret
endfunc

.macro weight_prologue type
    mov         w9,  w5                 // height
.ifc \type, full
    ldr         w12, [x4, #32]          // denom
.endif
    ldp         w4,  w5,  [x4, #32+4]   // scale, offset
    dup         v0.16b, w4
    dup         v1.8h,  w5
.ifc \type, full
    neg         w12, w12
    dup         v2.8h,  w12
.endif
.endm

// void mc_weight( uint8_t *src, intptr_t src_stride, uint8_t *dst,
//                 intptr_t dst_stride, const x264_weight_t *weight, int h )
function mc_weight_w20_neon, export=1
    weight_prologue full
    sub         x1,  x1,  #16
1:
    subs        w9,  w9,  #2
    ld1         {v16.8b,v17.8b,v18.8b}, [x2], x3
    ld1         {v19.8b,v20.8b,v21.8b}, [x2], x3
    umull       v22.8h, v16.8b, v0.8b
    umull       v23.8h, v17.8b, v0.8b
    zip1        v18.2s, v18.2s, v21.2s
    umull       v25.8h, v19.8b, v0.8b
    umull       v26.8h, v20.8b, v0.8b
    umull       v24.8h, v18.8b, v0.8b
    srshl       v22.8h, v22.8h, v2.8h
    srshl       v23.8h, v23.8h, v2.8h
    srshl       v24.8h, v24.8h, v2.8h
    srshl       v25.8h, v25.8h, v2.8h
    srshl       v26.8h, v26.8h, v2.8h
    add         v22.8h, v22.8h, v1.8h
    add         v23.8h, v23.8h, v1.8h
    add         v24.8h, v24.8h, v1.8h
    add         v25.8h, v25.8h, v1.8h
    add         v26.8h, v26.8h, v1.8h
    sqxtun      v4.8b,  v22.8h
    sqxtun2     v4.16b, v23.8h
    sqxtun      v6.8b,  v24.8h
    sqxtun      v5.8b,  v25.8h
    sqxtun2     v5.16b, v26.8h
    st1         {v4.16b},  [x0], #16
    st1         {v6.s}[0], [x0], x1
    st1         {v5.16b},  [x0], #16
    st1         {v6.s}[1], [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w16_neon, export=1
    weight_prologue full
weight16_loop:
1:
    subs        w9,  w9,  #2
    ld1         {v4.16b}, [x2], x3
    ld1         {v5.16b}, [x2], x3
    umull       v22.8h, v4.8b,  v0.8b
    umull2      v23.8h, v4.16b, v0.16b
    umull       v24.8h, v5.8b,  v0.8b
    umull2      v25.8h, v5.16b, v0.16b
    srshl       v22.8h, v22.8h, v2.8h
    srshl       v23.8h, v23.8h, v2.8h
    srshl       v24.8h, v24.8h, v2.8h
    srshl       v25.8h, v25.8h, v2.8h
    add         v22.8h, v22.8h, v1.8h
    add         v23.8h, v23.8h, v1.8h
    add         v24.8h, v24.8h, v1.8h
    add         v25.8h, v25.8h, v1.8h
    sqxtun      v4.8b,  v22.8h
    sqxtun2     v4.16b, v23.8h
    sqxtun      v5.8b,  v24.8h
    sqxtun2     v5.16b, v25.8h
    st1         {v4.16b}, [x0], x1
    st1         {v5.16b}, [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w8_neon, export=1
    weight_prologue full
1:
    subs        w9,  w9,  #2
    ld1         {v16.8b}, [x2], x3
    ld1         {v17.8b}, [x2], x3
    umull       v4.8h,  v16.8b, v0.8b
    umull       v5.8h,  v17.8b, v0.8b
    srshl       v4.8h,  v4.8h,  v2.8h
    srshl       v5.8h,  v5.8h,  v2.8h
    add         v4.8h,  v4.8h,  v1.8h
    add         v5.8h,  v5.8h,  v1.8h
    sqxtun      v16.8b, v4.8h
    sqxtun      v17.8b, v5.8h
    st1         {v16.8b}, [x0], x1
    st1         {v17.8b}, [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w4_neon, export=1
    weight_prologue full
1:
    subs        w9,  w9,  #2
    ld1         {v16.s}[0], [x2], x3
    ld1         {v16.s}[1], [x2], x3
    umull       v4.8h,  v16.8b, v0.8b
    srshl       v4.8h,  v4.8h,  v2.8h
    add         v4.8h,  v4.8h,  v1.8h
    sqxtun      v16.8b, v4.8h
    st1         {v16.s}[0], [x0], x1
    st1         {v16.s}[1], [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w20_nodenom_neon, export=1
    weight_prologue nodenom
    sub         x1,  x1,  #16
1:
    subs        w9,  w9,  #2
    ld1         {v16.8b,v17.8b,v18.8b}, [x2], x3
    mov         v27.16b, v1.16b
    mov         v28.16b, v1.16b
    ld1         {v19.8b,v20.8b,v21.8b}, [x2], x3
    mov         v31.16b, v1.16b
    mov         v29.16b, v1.16b
    mov         v30.16b, v1.16b
    zip1        v18.2s, v18.2s, v21.2s
    umlal       v27.8h, v16.8b, v0.8b
    umlal       v28.8h, v17.8b, v0.8b
    umlal       v31.8h, v18.8b, v0.8b
    umlal       v29.8h, v19.8b, v0.8b
    umlal       v30.8h, v20.8b, v0.8b
    sqxtun      v4.8b,  v27.8h
    sqxtun2     v4.16b, v28.8h
    sqxtun      v5.8b,  v29.8h
    sqxtun2     v5.16b, v30.8h
    sqxtun      v6.8b,  v31.8h
    st1         {v4.16b},  [x0], #16
    st1         {v6.s}[0], [x0], x1
    st1         {v5.16b},  [x0], #16
    st1         {v6.s}[1], [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w16_nodenom_neon, export=1
    weight_prologue nodenom
1:
    subs        w9,  w9,  #2
    ld1         {v6.16b},  [x2], x3
    mov         v27.16b, v1.16b
    mov         v28.16b, v1.16b
    ld1         {v7.16b},  [x2], x3
    mov         v29.16b, v1.16b
    mov         v30.16b, v1.16b
    umlal       v27.8h, v6.8b,  v0.8b
    umlal2      v28.8h, v6.16b, v0.16b
    umlal       v29.8h, v7.8b,  v0.8b
    umlal2      v30.8h, v7.16b, v0.16b
    sqxtun      v4.8b,  v27.8h
    sqxtun2     v4.16b, v28.8h
    sqxtun      v5.8b,  v29.8h
    sqxtun2     v5.16b, v30.8h
    st1         {v4.16b},  [x0], x1
    st1         {v5.16b},  [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w8_nodenom_neon, export=1
    weight_prologue nodenom
1:
    subs        w9,  w9,  #2
    ld1         {v16.8b}, [x2], x3
    mov         v27.16b, v1.16b
    ld1         {v17.8b}, [x2], x3
    mov         v29.16b, v1.16b
    umlal       v27.8h, v16.8b, v0.8b
    umlal       v29.8h, v17.8b, v0.8b
    sqxtun      v4.8b,  v27.8h
    sqxtun      v5.8b,  v29.8h
    st1         {v4.8b},  [x0], x1
    st1         {v5.8b},  [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w4_nodenom_neon, export=1
    weight_prologue nodenom
1:
    subs        w9,  w9,  #2
    ld1         {v16.s}[0], [x2], x3
    ld1         {v16.s}[1], [x2], x3
    mov         v27.16b, v1.16b
    umlal       v27.8h, v16.8b, v0.8b
    sqxtun      v4.8b,  v27.8h
    st1         {v4.s}[0],  [x0], x1
    st1         {v4.s}[1],  [x0], x1
    b.gt        1b
    ret
endfunc

.macro weight_simple_prologue
    ldr         w6,  [x4]               // offset
    dup         v1.16b,  w6
.endm

.macro weight_simple name op
function mc_weight_w20_\name\()_neon, export=1
    weight_simple_prologue
1:
    subs        w5,  w5,  #2
    ldr         s18, [x2, #16]
    ld1         {v16.16b}, [x2], x3
    ldr         s19, [x2, #16]
    ld1         {v17.16b}, [x2], x3
    \op         v18.8b,  v18.8b,  v1.8b
    \op         v16.16b, v16.16b, v1.16b
    \op         v19.8b,  v19.8b,  v1.8b
    \op         v17.16b, v17.16b, v1.16b
    str         s18, [x0, #16]
    st1         {v16.16b}, [x0], x1
    str         s19, [x0, #16]
    st1         {v17.16b}, [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w16_\name\()_neon, export=1
    weight_simple_prologue
1:
    subs        w5,  w5,  #2
    ld1         {v16.16b}, [x2], x3
    ld1         {v17.16b}, [x2], x3
    \op         v16.16b, v16.16b, v1.16b
    \op         v17.16b, v17.16b, v1.16b
    st1         {v16.16b}, [x0], x1
    st1         {v17.16b}, [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w8_\name\()_neon, export=1
    weight_simple_prologue
1:
    subs        w5,  w5,  #2
    ld1         {v16.8b}, [x2], x3
    ld1         {v17.8b}, [x2], x3
    \op         v16.8b, v16.8b, v1.8b
    \op         v17.8b, v17.8b, v1.8b
    st1         {v16.8b}, [x0], x1
    st1         {v17.8b}, [x0], x1
    b.gt        1b
    ret
endfunc

function mc_weight_w4_\name\()_neon, export=1
    weight_simple_prologue
1:
    subs        w5,  w5,  #2
    ld1         {v16.s}[0], [x2], x3
    ld1         {v16.s}[1], [x2], x3
    \op         v16.8b, v16.8b, v1.8b
    st1         {v16.s}[0], [x0], x1
    st1         {v16.s}[1], [x0], x1
    b.gt        1b
    ret
endfunc
.endm

weight_simple offsetadd, uqadd
weight_simple offsetsub, uqsub


// void mc_copy( uint8_t *dst, intptr_t dst_stride, uint8_t *src, intptr_t src_stride, int height )
function mc_copy_w4_neon, export=1
1:
    subs        w4,  w4,  #4
    ld1         {v0.s}[0],  [x2],  x3
    ld1         {v1.s}[0],  [x2],  x3
    ld1         {v2.s}[0],  [x2],  x3
    ld1         {v3.s}[0],  [x2],  x3
    st1         {v0.s}[0],  [x0],  x1
    st1         {v1.s}[0],  [x0],  x1
    st1         {v2.s}[0],  [x0],  x1
    st1         {v3.s}[0],  [x0],  x1
    b.gt        1b
    ret
endfunc

function mc_copy_w8_neon, export=1
1:  subs        w4,  w4,  #4
    ld1         {v0.8b},  [x2],  x3
    ld1         {v1.8b},  [x2],  x3
    ld1         {v2.8b},  [x2],  x3
    ld1         {v3.8b},  [x2],  x3
    st1         {v0.8b},  [x0],  x1
    st1         {v1.8b},  [x0],  x1
    st1         {v2.8b},  [x0],  x1
    st1         {v3.8b},  [x0],  x1
    b.gt        1b
    ret
endfunc

function mc_copy_w16_neon, export=1
1:  subs        w4,  w4,  #4
    ld1         {v0.16b}, [x2],  x3
    ld1         {v1.16b}, [x2],  x3
    ld1         {v2.16b}, [x2],  x3
    ld1         {v3.16b}, [x2],  x3
    st1         {v0.16b}, [x0],  x1
    st1         {v1.16b}, [x0],  x1
    st1         {v2.16b}, [x0],  x1
    st1         {v3.16b}, [x0],  x1
    b.gt        1b
    ret
endfunc

// void mc_chroma( uint8_t *dst_u, uint8_t *dst_v,
//                 intptr_t i_dst_stride,
//                 uint8_t *src, intptr_t i_src_stride,
//                 int dx, int dy, int i_width, int i_height );
function mc_chroma_neon, export=1
    ldr         w15, [sp]               // height
    sbfx        x12, x6,  #3,  #29      // asr(3) and sign extend
    sbfx        x11, x5,  #3,  #29      // asr(3) and sign extend
    cmp         w7,  #4
    mul         x12, x12, x4
    add         x3,  x3,  x11, lsl #1

    and         w5,  w5,  #7
    and         w6,  w6,  #7

    add         x3,  x3,  x12

    //pld             [x3]
    //pld             [x3, x4]

    b.gt        mc_chroma_w8_neon
    b.eq        mc_chroma_w4_neon
endfunc

.macro CHROMA_MC_START r00, r01, r10, r11
    mul         w12, w5,  w6            // cD = d8x    *d8y
    lsl         w13, w5,  #3
    add         w9,  w12,  #64
    lsl         w14, w6,  #3
    tst         w12, w12
    sub         w9,  w9,  w13
    sub         w10, w13, w12           // cB = d8x    *(8-d8y);
    sub         w11, w14, w12           // cC = (8-d8x)*d8y
    sub         w9,  w9,  w14           // cA = (8-d8x)*(8-d8y);
.endm

.macro CHROMA_MC width, vsize
function mc_chroma_w\width\()_neon
// since the element size varies, there's a different index for the 2nd store
.if \width == 4
    .set idx2, 1
.else
    .set idx2, 2
.endif
    CHROMA_MC_START
    b.eq        2f

    ld2         {v28.8b,v29.8b}, [x3], x4
    dup         v0.8b,  w9               // cA
    dup         v1.8b,  w10              // cB

    ext         v6.8b, v28.8b, v6.8b,  #1
    ext         v7.8b, v29.8b, v7.8b,  #1

    ld2         {v30.8b,v31.8b}, [x3], x4
    dup         v2.8b,  w11              // cC
    dup         v3.8b,  w12              // cD

    ext         v22.8b, v30.8b, v22.8b,  #1
    ext         v23.8b, v31.8b, v23.8b,  #1

    trn1        v0.2s,  v0.2s,  v1.2s
    trn1        v2.2s,  v2.2s,  v3.2s

    trn1        v4.2s,  v28.2s, v6.2s
    trn1        v5.2s,  v29.2s, v7.2s
    trn1        v20.2s, v30.2s, v22.2s
    trn1        v21.2s, v31.2s, v23.2s
1:  // height loop, interpolate xy
    subs        w15, w15, #2
    umull       v16.8h, v4.8b,  v0.8b
    umlal       v16.8h, v20.8b, v2.8b
    umull       v17.8h, v5.8b,  v0.8b
    umlal       v17.8h, v21.8b, v2.8b

    ld2         {v28.8b,v29.8b}, [x3], x4
    transpose   v24.2d, v25.2d, v16.2d, v17.2d

    ext         v6.8b, v28.8b, v6.8b,  #1
    ext         v7.8b, v29.8b, v7.8b,  #1

    trn1        v4.2s,  v28.2s, v6.2s
    trn1        v5.2s,  v29.2s, v7.2s

    add         v16.8h, v24.8h, v25.8h

    umull       v18.8h, v20.8b, v0.8b
    umlal       v18.8h, v4.8b,  v2.8b
    umull       v19.8h, v21.8b, v0.8b
    umlal       v19.8h, v5.8b,  v2.8b

    ld2         {v30.8b,v31.8b}, [x3], x4
    transpose   v26.2d, v27.2d, v18.2d, v19.2d

    ext         v22.8b, v30.8b, v22.8b,  #1
    ext         v23.8b, v31.8b, v23.8b,  #1
    trn1        v20.2s, v30.2s, v22.2s
    trn1        v21.2s, v31.2s, v23.2s

    add         v17.8h, v26.8h, v27.8h

    rshrn       v16.8b, v16.8h, #6
    rshrn       v17.8b, v17.8h, #6

    //pld         [x3]
    //pld         [x3, x4]

    st1         {v16.\vsize}[0],    [x0], x2
    st1         {v16.\vsize}[idx2], [x1], x2
    st1         {v17.\vsize}[0],    [x0], x2
    st1         {v17.\vsize}[idx2], [x1], x2
    b.gt        1b

    ret
2:  // dx or dy are 0
    tst         w11, w11
    add         w10, w10,  w11
    dup         v0.8b,  w9
    dup         v1.8b,  w10

    b.eq        4f

    ld1         {v4.8b}, [x3], x4
    ld1         {v6.8b}, [x3], x4
3:  // vertical inte
Download .txt
gitextract_fz8ha9kx/

├── .gitignore
├── .gitlab-ci.yml
├── AUTHORS
├── COPYING
├── Makefile
├── autocomplete.c
├── common/
│   ├── aarch64/
│   │   ├── asm-offsets.c
│   │   ├── asm-offsets.h
│   │   ├── asm.S
│   │   ├── bitstream-a.S
│   │   ├── bitstream.h
│   │   ├── cabac-a.S
│   │   ├── dct-a-common.S
│   │   ├── dct-a-sve.S
│   │   ├── dct-a-sve2.S
│   │   ├── dct-a.S
│   │   ├── dct.h
│   │   ├── deblock-a-common.S
│   │   ├── deblock-a-sve.S
│   │   ├── deblock-a.S
│   │   ├── deblock.h
│   │   ├── mc-a-common.S
│   │   ├── mc-a-sve.S
│   │   ├── mc-a.S
│   │   ├── mc-c.c
│   │   ├── mc.h
│   │   ├── pixel-a-common.S
│   │   ├── pixel-a-sve.S
│   │   ├── pixel-a.S
│   │   ├── pixel.h
│   │   ├── predict-a.S
│   │   ├── predict-c.c
│   │   ├── predict.h
│   │   ├── quant-a.S
│   │   └── quant.h
│   ├── arm/
│   │   ├── asm.S
│   │   ├── bitstream-a.S
│   │   ├── bitstream.h
│   │   ├── cpu-a.S
│   │   ├── dct-a.S
│   │   ├── dct.h
│   │   ├── deblock-a.S
│   │   ├── deblock.h
│   │   ├── mc-a.S
│   │   ├── mc-c.c
│   │   ├── mc.h
│   │   ├── pixel-a.S
│   │   ├── pixel.h
│   │   ├── predict-a.S
│   │   ├── predict-c.c
│   │   ├── predict.h
│   │   ├── quant-a.S
│   │   └── quant.h
│   ├── base.c
│   ├── base.h
│   ├── bitstream.c
│   ├── bitstream.h
│   ├── cabac.c
│   ├── cabac.h
│   ├── common.c
│   ├── common.h
│   ├── cpu.c
│   ├── cpu.h
│   ├── dct.c
│   ├── dct.h
│   ├── deblock.c
│   ├── frame.c
│   ├── frame.h
│   ├── loongarch/
│   │   ├── dct-a.S
│   │   ├── dct.h
│   │   ├── deblock-a.S
│   │   ├── deblock.h
│   │   ├── loongson_asm.S
│   │   ├── loongson_util.S
│   │   ├── mc-a.S
│   │   ├── mc-c.c
│   │   ├── mc.h
│   │   ├── pixel-a.S
│   │   ├── pixel-c.c
│   │   ├── pixel.h
│   │   ├── predict-a.S
│   │   ├── predict-c.c
│   │   ├── predict.h
│   │   ├── quant-a.S
│   │   ├── quant.h
│   │   └── sad-a.S
│   ├── macroblock.c
│   ├── macroblock.h
│   ├── mc.c
│   ├── mc.h
│   ├── mips/
│   │   ├── dct-c.c
│   │   ├── dct.h
│   │   ├── deblock-c.c
│   │   ├── deblock.h
│   │   ├── macros.h
│   │   ├── mc-c.c
│   │   ├── mc.h
│   │   ├── pixel-c.c
│   │   ├── pixel.h
│   │   ├── predict-c.c
│   │   ├── predict.h
│   │   ├── quant-c.c
│   │   └── quant.h
│   ├── mvpred.c
│   ├── opencl/
│   │   ├── bidir.cl
│   │   ├── downscale.cl
│   │   ├── intra.cl
│   │   ├── motionsearch.cl
│   │   ├── subpel.cl
│   │   ├── weightp.cl
│   │   └── x264-cl.h
│   ├── opencl.c
│   ├── opencl.h
│   ├── osdep.c
│   ├── osdep.h
│   ├── pixel.c
│   ├── pixel.h
│   ├── ppc/
│   │   ├── dct.c
│   │   ├── dct.h
│   │   ├── deblock.c
│   │   ├── deblock.h
│   │   ├── mc.c
│   │   ├── mc.h
│   │   ├── pixel.c
│   │   ├── pixel.h
│   │   ├── ppccommon.h
│   │   ├── predict.c
│   │   ├── predict.h
│   │   ├── quant.c
│   │   └── quant.h
│   ├── predict.c
│   ├── predict.h
│   ├── quant.c
│   ├── quant.h
│   ├── rectangle.c
│   ├── rectangle.h
│   ├── set.c
│   ├── set.h
│   ├── tables.c
│   ├── tables.h
│   ├── threadpool.c
│   ├── threadpool.h
│   ├── vlc.c
│   ├── win32thread.c
│   ├── win32thread.h
│   └── x86/
│       ├── bitstream-a.asm
│       ├── bitstream.h
│       ├── cabac-a.asm
│       ├── const-a.asm
│       ├── cpu-a.asm
│       ├── dct-32.asm
│       ├── dct-64.asm
│       ├── dct-a.asm
│       ├── dct.h
│       ├── deblock-a.asm
│       ├── deblock.h
│       ├── mc-a.asm
│       ├── mc-a2.asm
│       ├── mc-c.c
│       ├── mc.h
│       ├── pixel-32.asm
│       ├── pixel-a.asm
│       ├── pixel.h
│       ├── predict-a.asm
│       ├── predict-c.c
│       ├── predict.h
│       ├── quant-a.asm
│       ├── quant.h
│       ├── sad-a.asm
│       ├── sad16-a.asm
│       ├── trellis-64.asm
│       ├── util.h
│       ├── x86inc.asm
│       └── x86util.asm
├── config.guess
├── config.sub
├── configure
├── doc/
│   ├── ratecontrol.txt
│   ├── regression_test.txt
│   ├── standards.txt
│   ├── threads.txt
│   └── vui.txt
├── encoder/
│   ├── analyse.c
│   ├── analyse.h
│   ├── api.c
│   ├── cabac.c
│   ├── cavlc.c
│   ├── encoder.c
│   ├── lookahead.c
│   ├── macroblock.c
│   ├── macroblock.h
│   ├── me.c
│   ├── me.h
│   ├── ratecontrol.c
│   ├── ratecontrol.h
│   ├── rdo.c
│   ├── set.c
│   ├── set.h
│   ├── slicetype-cl.c
│   ├── slicetype-cl.h
│   └── slicetype.c
├── example.c
├── extras/
│   ├── avisynth_c.h
│   ├── cl.h
│   ├── cl_platform.h
│   ├── getopt.c
│   ├── getopt.h
│   ├── intel_dispatcher.h
│   ├── inttypes.h
│   └── stdint.h
├── filters/
│   ├── filters.c
│   ├── filters.h
│   └── video/
│       ├── cache.c
│       ├── crop.c
│       ├── depth.c
│       ├── fix_vfr_pts.c
│       ├── internal.c
│       ├── internal.h
│       ├── resize.c
│       ├── select_every.c
│       ├── source.c
│       ├── video.c
│       └── video.h
├── input/
│   ├── avs.c
│   ├── ffms.c
│   ├── input.c
│   ├── input.h
│   ├── lavf.c
│   ├── raw.c
│   ├── thread.c
│   ├── timecode.c
│   └── y4m.c
├── output/
│   ├── flv.c
│   ├── flv_bytestream.c
│   ├── flv_bytestream.h
│   ├── matroska.c
│   ├── matroska_ebml.c
│   ├── matroska_ebml.h
│   ├── mp4.c
│   ├── mp4_lsmash.c
│   ├── output.h
│   └── raw.c
├── tools/
│   ├── bash-autocomplete.sh
│   ├── checkasm-a.asm
│   ├── checkasm-aarch64.S
│   ├── checkasm-arm.S
│   ├── checkasm-loongarch.S
│   ├── checkasm.c
│   ├── cltostr.sh
│   ├── countquant_x264.pl
│   ├── digress/
│   │   ├── __init__.py
│   │   ├── cli.py
│   │   ├── comparers.py
│   │   ├── constants.py
│   │   ├── errors.py
│   │   ├── scm/
│   │   │   ├── __init__.py
│   │   │   ├── dummy.py
│   │   │   └── git.py
│   │   └── testing.py
│   ├── gas-preprocessor.pl
│   ├── msvsdepend.sh
│   ├── q_matrix_jvt.cfg
│   └── test_x264.py
├── version.sh
├── x264.c
├── x264.h
├── x264cli.h
├── x264dll.c
├── x264res.manifest
└── x264res.rc
Download .txt
SYMBOL INDEX (1927 symbols across 131 files)

FILE: autocomplete.c
  function list_contains (line 231) | static int list_contains( const char * const *list, const char *s )
  function suggest (line 240) | static void suggest( const char *s, const char *cur, int cur_len )
  function suggest_lower (line 246) | static void suggest_lower( const char *s, const char *cur, int cur_len )
  function suggest_num_range (line 256) | static void suggest_num_range( int start, int end, const char *cur, int ...
  function suggest_token (line 268) | static void suggest_token( const char *s, int delim, const char *cur, in...
  function x264_cli_autocomplete (line 293) | int x264_cli_autocomplete( const char *prev, const char *cur )

FILE: common/aarch64/mc-c.c
  function weight_cache_neon (line 190) | static void weight_cache_neon( x264_t *h, x264_weight_t *w )
  function mc_luma_neon (line 211) | static void mc_luma_neon( pixel *dst,    intptr_t i_dst_stride,
  function pixel (line 237) | static pixel *get_ref_neon( pixel *dst,   intptr_t *i_dst_stride,

FILE: common/aarch64/predict-c.c
  function x264_predict_4x4_init_aarch64 (line 31) | void x264_predict_4x4_init_aarch64( uint32_t cpu, x264_predict_t pf[12] )
  function x264_predict_8x8c_init_aarch64 (line 50) | void x264_predict_8x8c_init_aarch64( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x16c_init_aarch64 (line 70) | void x264_predict_8x16c_init_aarch64( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x8_init_aarch64 (line 85) | void x264_predict_8x8_init_aarch64( uint32_t cpu, x264_predict8x8_t pf[1...
  function x264_predict_16x16_init_aarch64 (line 103) | void x264_predict_16x16_init_aarch64( uint32_t cpu, x264_predict_t pf[7] )

FILE: common/arm/mc-c.c
  function weight_cache_neon (line 173) | static void weight_cache_neon( x264_t *h, x264_weight_t *w )
  function mc_luma_neon (line 213) | static void mc_luma_neon( uint8_t *dst,    intptr_t i_dst_stride,
  function hpel_filter_neon (line 272) | static void hpel_filter_neon( uint8_t *dsth, uint8_t *dstv, uint8_t *dst...

FILE: common/arm/predict-c.c
  function x264_predict_4x4_init_arm (line 30) | void x264_predict_4x4_init_arm( uint32_t cpu, x264_predict_t pf[12] )
  function x264_predict_8x8c_init_arm (line 49) | void x264_predict_8x8c_init_arm( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x16c_init_arm (line 64) | void x264_predict_8x16c_init_arm( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x8_init_arm (line 77) | void x264_predict_8x8_init_arm( uint32_t cpu, x264_predict8x8_t pf[12], ...
  function x264_predict_16x16_init_arm (line 95) | void x264_predict_16x16_init_arm( uint32_t cpu, x264_predict_t pf[7] )

FILE: common/base.c
  function x264_log_default (line 68) | void x264_log_default( void *p_unused, int i_level, const char *psz_fmt,...
  function x264_log_internal (line 93) | void x264_log_internal( int i_level, const char *psz_fmt, ... )
  function x264_free (line 149) | void x264_free( void *p )
  type strdup_buffer (line 206) | typedef struct {
  function REALIGN_STACK (line 251) | REALIGN_STACK void x264_param_cleanup( x264_param_t *param )
  function REALIGN_STACK (line 266) | REALIGN_STACK void x264_picture_init( x264_picture_t *pic )
  function REALIGN_STACK (line 277) | REALIGN_STACK int x264_picture_alloc( x264_picture_t *pic, int i_csp, in...
  function REALIGN_STACK (line 333) | REALIGN_STACK void x264_picture_clean( x264_picture_t *pic )
  function REALIGN_STACK (line 344) | REALIGN_STACK void x264_param_default( x264_param_t *param )
  function param_apply_preset (line 489) | static int param_apply_preset( x264_param_t *param, const char *preset )
  function param_apply_tune (line 611) | static int param_apply_tune( x264_param_t *param, const char *tune )
  function REALIGN_STACK (line 706) | REALIGN_STACK int x264_param_default_preset( x264_param_t *param, const ...
  function REALIGN_STACK (line 717) | REALIGN_STACK void x264_param_apply_fastfirstpass( x264_param_t *param )
  function profile_string_to_int (line 732) | static int profile_string_to_int( const char *str )
  function REALIGN_STACK (line 749) | REALIGN_STACK int x264_param_apply_profile( x264_param_t *param, const c...
  function parse_enum (line 816) | static int parse_enum( const char *arg, const char * const *names, int *...
  function parse_cqm (line 827) | static int parse_cqm( const char *str, uint8_t *cqm, int length )
  function atobool_internal (line 839) | static int atobool_internal( const char *str, int *b_error )
  function atoi_internal (line 853) | static int atoi_internal( const char *str, int *b_error )
  function atof_internal (line 862) | static double atof_internal( const char *str, int *b_error )
  function REALIGN_STACK (line 886) | REALIGN_STACK int x264_param_parse( x264_param_t *p, const char *name, c...

FILE: common/base.h
  type x264_union16_t (line 64) | typedef union { uint16_t i; uint8_t  b[2]; } MAY_ALIAS x264_union16_t;
  type x264_union32_t (line 65) | typedef union { uint32_t i; uint16_t w[2]; uint8_t  b[4]; } MAY_ALIAS x2...
  type x264_union64_t (line 66) | typedef union { uint64_t i; uint32_t d[2]; uint16_t w[4]; uint8_t b[8]; ...
  type x264_uint128_t (line 67) | typedef struct { uint64_t i[2]; } x264_uint128_t;
  type x264_union128_t (line 68) | typedef union { x264_uint128_t i; uint64_t q[2]; uint32_t d[4]; uint16_t...
  type profile_e (line 93) | enum profile_e
  type chroma_format_e (line 103) | enum chroma_format_e
  type slice_type_e (line 111) | enum slice_type_e
  type sei_payload_type_e (line 120) | enum sei_payload_type_e
  function ALWAYS_INLINE (line 206) | static ALWAYS_INLINE int x264_clip3( int v, int i_min, int i_max )
  function ALWAYS_INLINE (line 211) | static ALWAYS_INLINE double x264_clip3f( double v, double f_min, double ...
  function ALWAYS_INLINE (line 218) | static ALWAYS_INLINE int x264_exp2fix8( float x )
  function ALWAYS_INLINE (line 226) | static ALWAYS_INLINE float x264_log2( uint32_t x )
  function ALWAYS_INLINE (line 232) | static ALWAYS_INLINE int x264_median( int a, int b, int c )
  function ALWAYS_INLINE (line 242) | static ALWAYS_INLINE void x264_median_mv( int16_t *dst, int16_t *a, int1...
  function ALWAYS_INLINE (line 248) | static ALWAYS_INLINE int x264_predictor_difference( int16_t (*mvc)[2], i...
  function ALWAYS_INLINE (line 259) | static ALWAYS_INLINE uint16_t x264_cabac_mvd_sum( uint8_t *mvdleft, uint...

FILE: common/bitstream.c
  function x264_nal_encode (line 55) | void x264_nal_encode( x264_t *h, uint8_t *dst, x264_nal_t *nal )
  function x264_bitstream_init (line 106) | void x264_bitstream_init( uint32_t cpu, x264_bitstream_function_t *pf )

FILE: common/bitstream.h
  type vlc_large_t (line 31) | typedef struct
  type bs_t (line 39) | typedef struct bs_s
  type x264_run_level_t (line 50) | typedef struct
  type x264_bitstream_function_t (line 57) | typedef struct
  function bs_init (line 86) | static inline void bs_init( bs_t *s, void *p_data, int i_data )
  function bs_pos (line 100) | static inline int bs_pos( bs_t *s )
  function bs_flush (line 106) | static inline void bs_flush( bs_t *s )
  function bs_realign (line 113) | static inline void bs_realign( bs_t *s )
  function bs_write (line 125) | static inline void bs_write( bs_t *s, int i_count, uint32_t i_bits )
  function bs_write32 (line 163) | static inline void bs_write32( bs_t *s, uint32_t i_bits )
  function bs_write1 (line 169) | static inline void bs_write1( bs_t *s, uint32_t i_bit )
  function bs_align_0 (line 182) | static inline void bs_align_0( bs_t *s )
  function bs_align_1 (line 187) | static inline void bs_align_1( bs_t *s )
  function bs_align_10 (line 192) | static inline void bs_align_10( bs_t *s )
  function bs_write_ue_big (line 221) | static inline void bs_write_ue_big( bs_t *s, unsigned int val )
  function bs_write_ue (line 241) | static inline void bs_write_ue( bs_t *s, int val )
  function bs_write_se (line 246) | static inline void bs_write_se( bs_t *s, int val )
  function bs_write_te (line 264) | static inline void bs_write_te( bs_t *s, int x, int val )
  function bs_rbsp_trailing (line 272) | static inline void bs_rbsp_trailing( bs_t *s )
  function ALWAYS_INLINE (line 278) | static ALWAYS_INLINE int bs_size_ue( unsigned int val )
  function ALWAYS_INLINE (line 283) | static ALWAYS_INLINE int bs_size_ue_big( unsigned int val )
  function ALWAYS_INLINE (line 291) | static ALWAYS_INLINE int bs_size_se( int val )
  function ALWAYS_INLINE (line 301) | static ALWAYS_INLINE int bs_size_te( int x, int val )

FILE: common/cabac.c
  function x264_cabac_init (line 32) | void x264_cabac_init( x264_t *h )
  function x264_cabac_context_init (line 48) | void x264_cabac_context_init( x264_t *h, x264_cabac_t *cb, int i_slice_t...
  function x264_cabac_encode_init_core (line 53) | void x264_cabac_encode_init_core( x264_cabac_t *cb )
  function x264_cabac_encode_init (line 61) | void x264_cabac_encode_init( x264_cabac_t *cb, uint8_t *p_data, uint8_t ...
  function cabac_putbyte (line 69) | static inline void cabac_putbyte( x264_cabac_t *cb )
  function cabac_encode_renorm (line 101) | static inline void cabac_encode_renorm( x264_cabac_t *cb )
  function x264_cabac_encode_decision_c (line 113) | void x264_cabac_encode_decision_c( x264_cabac_t *cb, int i_ctx, int b )
  function x264_cabac_encode_bypass_c (line 128) | void x264_cabac_encode_bypass_c( x264_cabac_t *cb, int b )
  function x264_cabac_encode_ue_bypass (line 142) | void x264_cabac_encode_ue_bypass( x264_cabac_t *cb, int exp_bits, int val )
  function x264_cabac_encode_terminal_c (line 159) | void x264_cabac_encode_terminal_c( x264_cabac_t *cb )
  function x264_cabac_encode_flush (line 165) | void x264_cabac_encode_flush( x264_t *h, x264_cabac_t *cb )

FILE: common/cabac.h
  type x264_cabac_t (line 30) | typedef struct
  function ALWAYS_INLINE (line 94) | static ALWAYS_INLINE int x264_cabac_pos( x264_cabac_t *cb )
  function ALWAYS_INLINE (line 101) | static ALWAYS_INLINE void x264_cabac_size_decision( x264_cabac_t *cb, lo...
  function ALWAYS_INLINE (line 108) | static ALWAYS_INLINE int x264_cabac_size_decision2( uint8_t *state, long...
  function ALWAYS_INLINE (line 115) | static ALWAYS_INLINE void x264_cabac_size_decision_noup( x264_cabac_t *c...
  function ALWAYS_INLINE (line 121) | static ALWAYS_INLINE int x264_cabac_size_decision_noup2( uint8_t *state,...

FILE: common/common.c
  function x264_log (line 32) | void x264_log( x264_t *h, int i_level, const char *psz_fmt, ... )

FILE: common/common.h
  type pixel (line 94) | typedef uint16_t pixel;
  type pixel4 (line 95) | typedef uint64_t pixel4;
  type dctcoef (line 96) | typedef int32_t  dctcoef;
  type udctcoef (line 97) | typedef uint32_t udctcoef;
  type pixel (line 102) | typedef uint8_t  pixel;
  type pixel4 (line 103) | typedef uint32_t pixel4;
  type dctcoef (line 104) | typedef int16_t  dctcoef;
  type udctcoef (line 105) | typedef uint16_t udctcoef;
  function ALWAYS_INLINE (line 145) | static ALWAYS_INLINE pixel x264_clip_pixel( int x )
  type x264_slice_header_t (line 153) | typedef struct
  type x264_lookahead_t (line 217) | typedef struct x264_lookahead_t
  type x264_ratecontrol_t (line 231) | typedef struct x264_ratecontrol_t   x264_ratecontrol_t;
  type x264_left_table_t (line 233) | typedef struct x264_left_table_t
  type x264_frame_stat_t (line 243) | typedef struct
  type x264_t (line 270) | struct x264_t
  type mvsad_t (line 765) | typedef struct
  function ALWAYS_INLINE (line 774) | static ALWAYS_INLINE int x264_predictor_roundclip( int16_t (*dst)[2], in...
  function ALWAYS_INLINE (line 790) | static ALWAYS_INLINE int x264_predictor_clip( int16_t (*dst)[2], int16_t...

FILE: common/cpu.c
  function x264_getauxval (line 113) | static unsigned long x264_getauxval( unsigned long type )
  function sigill_handler (line 132) | static void sigill_handler( int sig )
  function x264_cpu_detect (line 150) | uint32_t x264_cpu_detect( void )
  function x264_cpu_detect (line 333) | uint32_t x264_cpu_detect( void )
  function x264_cpu_detect (line 347) | uint32_t x264_cpu_detect( void )
  function x264_cpu_detect (line 374) | uint32_t x264_cpu_detect( void )
  function x264_cpu_detect (line 403) | uint32_t x264_cpu_detect( void )
  function x264_cpu_detect (line 417) | uint32_t x264_cpu_detect( void )
  function x264_cpu_detect (line 468) | uint32_t x264_cpu_detect( void )
  function detect_flags (line 495) | static uint32_t detect_flags( void )
  function have_feature (line 517) | static int have_feature( const char *feature )
  function detect_flags (line 526) | static uint32_t detect_flags( void )
  function detect_flags (line 541) | static uint32_t detect_flags( void )
  function x264_cpu_detect (line 569) | uint32_t x264_cpu_detect( void )
  function x264_cpu_detect (line 602) | uint32_t x264_cpu_detect( void )
  function x264_cpu_detect (line 612) | uint32_t x264_cpu_detect( void )
  function x264_cpu_detect (line 627) | uint32_t x264_cpu_detect( void )
  function x264_cpu_num_processors (line 634) | int x264_cpu_num_processors( void )

FILE: common/cpu.h
  type x264_cpu_name_t (line 49) | typedef struct

FILE: common/dct.c
  function dct4x4dc (line 47) | static void dct4x4dc( dctcoef d[16] )
  function idct4x4dc (line 78) | static void idct4x4dc( dctcoef d[16] )
  function dct2x4dc (line 109) | static void dct2x4dc( dctcoef dct[8], dctcoef dct4x4[8][16] )
  function pixel_sub_wxh (line 145) | static inline void pixel_sub_wxh( dctcoef *diff, int i_size,
  function sub4x4_dct (line 157) | static void sub4x4_dct( dctcoef dct[16], pixel *pix1, pixel *pix2 )
  function sub8x8_dct (line 191) | static void sub8x8_dct( dctcoef dct[4][16], pixel *pix1, pixel *pix2 )
  function sub16x16_dct (line 199) | static void sub16x16_dct( dctcoef dct[16][16], pixel *pix1, pixel *pix2 )
  function sub4x4_dct_dc (line 207) | static int sub4x4_dct_dc( pixel *pix1, pixel *pix2 )
  function sub8x8_dct_dc (line 216) | static void sub8x8_dct_dc( dctcoef dct[4], pixel *pix1, pixel *pix2 )
  function sub8x16_dct_dc (line 234) | static void sub8x16_dct_dc( dctcoef dct[8], pixel *pix1, pixel *pix2 )
  function add4x4_idct (line 272) | static void add4x4_idct( pixel *p_dst, dctcoef dct[16] )
  function add8x8_idct (line 312) | static void add8x8_idct( pixel *p_dst, dctcoef dct[4][16] )
  function add16x16_idct (line 320) | static void add16x16_idct( pixel *p_dst, dctcoef dct[16][16] )
  function sub8x8_dct8 (line 359) | static void sub8x8_dct8( dctcoef dct[64], pixel *pix1, pixel *pix2 )
  function sub16x16_dct8 (line 380) | static void sub16x16_dct8( dctcoef dct[4][64], pixel *pix1, pixel *pix2 )
  function add8x8_idct8 (line 415) | static void add8x8_idct8( pixel *dst, dctcoef dct[64] )
  function add16x16_idct8 (line 434) | static void add16x16_idct8( pixel *dst, dctcoef dct[4][64] )
  function add4x4_idct_dc (line 442) | static inline void add4x4_idct_dc( pixel *p_dst, dctcoef dc )
  function add8x8_idct_dc (line 454) | static void add8x8_idct_dc( pixel *p_dst, dctcoef dct[4] )
  function add16x16_idct_dc (line 462) | static void add16x16_idct_dc( pixel *p_dst, dctcoef dct[16] )
  function x264_dct_init (line 477) | void x264_dct_init( uint32_t cpu, x264_dct_function_t *dctf )
  function zigzag_scan_8x8_frame (line 829) | static void zigzag_scan_8x8_frame( dctcoef level[64], dctcoef dct[64] )
  function zigzag_scan_8x8_field (line 834) | static void zigzag_scan_8x8_field( dctcoef level[64], dctcoef dct[64] )
  function zigzag_scan_4x4_frame (line 843) | static void zigzag_scan_4x4_frame( dctcoef level[16], dctcoef dct[16] )
  function zigzag_scan_4x4_field (line 848) | static void zigzag_scan_4x4_field( dctcoef level[16], dctcoef dct[16] )
  function zigzag_sub_4x4_frame (line 878) | static int zigzag_sub_4x4_frame( dctcoef level[16], const pixel *p_src, ...
  function zigzag_sub_4x4_field (line 886) | static int zigzag_sub_4x4_field( dctcoef level[16], const pixel *p_src, ...
  function zigzag_sub_4x4ac_frame (line 902) | static int zigzag_sub_4x4ac_frame( dctcoef level[16], const pixel *p_src...
  function zigzag_sub_4x4ac_field (line 910) | static int zigzag_sub_4x4ac_field( dctcoef level[16], const pixel *p_src...
  function zigzag_sub_8x8_frame (line 918) | static int zigzag_sub_8x8_frame( dctcoef level[64], const pixel *p_src, ...
  function zigzag_sub_8x8_field (line 925) | static int zigzag_sub_8x8_field( dctcoef level[64], const pixel *p_src, ...
  function zigzag_interleave_8x8_cavlc (line 936) | static void zigzag_interleave_8x8_cavlc( dctcoef *dst, dctcoef *src, uin...
  function x264_zigzag_init (line 950) | void x264_zigzag_init( uint32_t cpu, x264_zigzag_function_t *pf_progress...

FILE: common/dct.h
  type x264_dct_function_t (line 29) | typedef struct
  type x264_zigzag_function_t (line 61) | typedef struct

FILE: common/deblock.c
  function ALWAYS_INLINE (line 79) | static ALWAYS_INLINE void deblock_edge_luma_c( pixel *pix, intptr_t xstr...
  function deblock_luma_c (line 110) | static inline void deblock_luma_c( pixel *pix, intptr_t xstride, intptr_...
  function deblock_h_luma_mbaff_c (line 123) | static void deblock_h_luma_mbaff_c( pixel *pix, intptr_t stride, int alp...
  function deblock_v_luma_c (line 128) | static void deblock_v_luma_c( pixel *pix, intptr_t stride, int alpha, in...
  function deblock_h_luma_c (line 132) | static void deblock_h_luma_c( pixel *pix, intptr_t stride, int alpha, in...
  function ALWAYS_INLINE (line 137) | static ALWAYS_INLINE void deblock_edge_chroma_c( pixel *pix, intptr_t xs...
  function ALWAYS_INLINE (line 151) | static ALWAYS_INLINE void deblock_chroma_c( pixel *pix, int height, intp...
  function deblock_h_chroma_mbaff_c (line 166) | static void deblock_h_chroma_mbaff_c( pixel *pix, intptr_t stride, int a...
  function deblock_v_chroma_c (line 170) | static void deblock_v_chroma_c( pixel *pix, intptr_t stride, int alpha, ...
  function deblock_h_chroma_c (line 174) | static void deblock_h_chroma_c( pixel *pix, intptr_t stride, int alpha, ...
  function deblock_h_chroma_422_c (line 178) | static void deblock_h_chroma_422_c( pixel *pix, intptr_t stride, int alp...
  function ALWAYS_INLINE (line 183) | static ALWAYS_INLINE void deblock_edge_luma_intra_c( pixel *pix, intptr_...
  function deblock_luma_intra_c (line 222) | static inline void deblock_luma_intra_c( pixel *pix, intptr_t xstride, i...
  function deblock_h_luma_intra_mbaff_c (line 227) | static void deblock_h_luma_intra_mbaff_c( pixel *pix, intptr_t ystride, ...
  function deblock_v_luma_intra_c (line 232) | static void deblock_v_luma_intra_c( pixel *pix, intptr_t stride, int alp...
  function deblock_h_luma_intra_c (line 236) | static void deblock_h_luma_intra_c( pixel *pix, intptr_t stride, int alp...
  function ALWAYS_INLINE (line 241) | static ALWAYS_INLINE void deblock_edge_chroma_intra_c( pixel *pix, intpt...
  function ALWAYS_INLINE (line 254) | static ALWAYS_INLINE void deblock_chroma_intra_c( pixel *pix, int width,...
  function deblock_h_chroma_intra_mbaff_c (line 260) | static void deblock_h_chroma_intra_mbaff_c( pixel *pix, intptr_t stride,...
  function deblock_v_chroma_intra_c (line 264) | static void deblock_v_chroma_intra_c( pixel *pix, intptr_t stride, int a...
  function deblock_h_chroma_intra_c (line 268) | static void deblock_h_chroma_intra_c( pixel *pix, intptr_t stride, int a...
  function deblock_h_chroma_422_intra_c (line 272) | static void deblock_h_chroma_422_intra_c( pixel *pix, intptr_t stride, i...
  function deblock_strength_c (line 277) | static void deblock_strength_c( uint8_t nnz[X264_SCAN8_SIZE], int8_t ref...
  function ALWAYS_INLINE (line 306) | static ALWAYS_INLINE void deblock_edge( x264_t *h, pixel *pix, intptr_t ...
  function ALWAYS_INLINE (line 326) | static ALWAYS_INLINE void deblock_edge_intra( x264_t *h, pixel *pix, int...
  function ALWAYS_INLINE (line 340) | static ALWAYS_INLINE void macroblock_cache_load_neighbours_deblock( x264...
  function x264_frame_deblock_row (line 378) | void x264_frame_deblock_row( x264_t *h, int mb_y )
  function x264_macroblock_deblock (line 615) | void x264_macroblock_deblock( x264_t *h )
  function x264_deblock_init (line 687) | void x264_deblock_init( uint32_t cpu, x264_deblock_function_t *pf, int b...

FILE: common/frame.c
  function align_stride (line 30) | static int align_stride( int x, int align, int disalign )
  function align_plane_size (line 38) | static int align_plane_size( int x, int disalign )
  function frame_internal_csp (line 45) | static int frame_internal_csp( int external_csp )
  function x264_frame_t (line 59) | static x264_frame_t *frame_new( x264_t *h, int b_fdec )
  function x264_frame_delete (line 312) | void x264_frame_delete( x264_frame_t *frame )
  function get_plane_ptr (line 342) | static int get_plane_ptr( x264_t *h, x264_picture_t *src, uint8_t **pix,...
  function x264_frame_copy_picture (line 363) | int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_...
  function ALWAYS_INLINE (line 483) | static ALWAYS_INLINE void pixel_memset( pixel *dst, pixel *src, int len,...
  function ALWAYS_INLINE (line 535) | static ALWAYS_INLINE void plane_expand_border( pixel *pix, int i_stride,...
  function x264_frame_expand_border (line 556) | void x264_frame_expand_border( x264_t *h, x264_frame_t *frame, int mb_y )
  function x264_frame_expand_border_filtered (line 599) | void x264_frame_expand_border_filtered( x264_t *h, x264_frame_t *frame, ...
  function x264_frame_expand_border_lowres (line 627) | void x264_frame_expand_border_lowres( x264_frame_t *frame )
  function x264_frame_expand_border_chroma (line 633) | void x264_frame_expand_border_chroma( x264_t *h, x264_frame_t *frame, in...
  function x264_frame_expand_border_mod16 (line 640) | void x264_frame_expand_border_mod16( x264_t *h, x264_frame_t *frame )
  function x264_expand_border_mbpair (line 668) | void x264_expand_border_mbpair( x264_t *h, int mb_x, int mb_y )
  function x264_frame_cond_broadcast (line 683) | void x264_frame_cond_broadcast( x264_frame_t *frame, int i_lines_complet...
  function x264_frame_cond_wait (line 691) | int x264_frame_cond_wait( x264_frame_t *frame, int i_lines_completed )
  function x264_threadslice_cond_broadcast (line 701) | void x264_threadslice_cond_broadcast( x264_t *h, int pass )
  function x264_threadslice_cond_wait (line 710) | void x264_threadslice_cond_wait( x264_t *h, int pass )
  function x264_frame_new_slice (line 718) | int x264_frame_new_slice( x264_t *h, x264_frame_t *frame )
  function x264_frame_push (line 735) | void x264_frame_push( x264_frame_t **list, x264_frame_t *frame )
  function x264_frame_t (line 742) | x264_frame_t *x264_frame_pop( x264_frame_t **list )
  function x264_frame_unshift (line 753) | void x264_frame_unshift( x264_frame_t **list, x264_frame_t *frame )
  function x264_frame_t (line 762) | x264_frame_t *x264_frame_shift( x264_frame_t **list )
  function x264_frame_push_unused (line 772) | void x264_frame_push_unused( x264_t *h, x264_frame_t *frame )
  function x264_frame_t (line 780) | x264_frame_t *x264_frame_pop_unused( x264_t *h, int b_fdec )
  function x264_frame_push_blank_unused (line 803) | void x264_frame_push_blank_unused( x264_t *h, x264_frame_t *frame )
  function x264_frame_t (line 811) | x264_frame_t *x264_frame_pop_blank_unused( x264_t *h )
  function x264_weight_scale_plane (line 825) | void x264_weight_scale_plane( x264_t *h, pixel *dst, intptr_t i_dst_stri...
  function x264_frame_delete_list (line 843) | void x264_frame_delete_list( x264_frame_t **list )
  function x264_sync_frame_list_init (line 853) | int x264_sync_frame_list_init( x264_sync_frame_list_t *slist, int max_si...
  function x264_sync_frame_list_delete (line 869) | void x264_sync_frame_list_delete( x264_sync_frame_list_t *slist )
  function x264_sync_frame_list_push (line 877) | void x264_sync_frame_list_push( x264_sync_frame_list_t *slist, x264_fram...
  function x264_frame_t (line 887) | x264_frame_t *x264_sync_frame_list_pop( x264_sync_frame_list_t *slist )

FILE: common/frame.h
  type x264_frame_t (line 37) | typedef struct x264_frame
  type x264_sync_frame_list_t (line 186) | typedef struct
  type x264_deblock_function_t (line 198) | typedef struct

FILE: common/loongarch/mc-c.c
  function weight_cache_lsx (line 60) | static void weight_cache_lsx( x264_t *h, x264_weight_t *w )
  function weight_cache_lasx (line 99) | static void weight_cache_lasx( x264_t *h, x264_weight_t *w )
  function mc_luma_lsx (line 184) | static void mc_luma_lsx( uint8_t *p_dst, intptr_t i_dst_stride,
  function PLANE_COPY_YUYV (line 223) | PLANE_INTERLEAVE(lsx)
  function else (line 265) | else if ( pWeight->weightfn )
  function mc_luma_lasx (line 277) | static void mc_luma_lasx( uint8_t *p_dst, intptr_t i_dst_stride,
  function x264_mc_init_loongarch (line 326) | void x264_mc_init_loongarch( int32_t cpu, x264_mc_functions_t *pf  )

FILE: common/loongarch/pixel-c.c
  function x264_pixel_hadamard_ac_8x8_lsx (line 32) | uint64_t x264_pixel_hadamard_ac_8x8_lsx( uint8_t *p_pix, intptr_t i_stri...
  function x264_pixel_hadamard_ac_8x16_lsx (line 41) | uint64_t x264_pixel_hadamard_ac_8x16_lsx( uint8_t *p_pix, intptr_t i_str...
  function x264_pixel_hadamard_ac_16x8_lsx (line 51) | uint64_t x264_pixel_hadamard_ac_16x8_lsx( uint8_t *p_pix, intptr_t i_str...
  function x264_pixel_hadamard_ac_16x16_lsx (line 61) | uint64_t x264_pixel_hadamard_ac_16x16_lsx( uint8_t *p_pix, intptr_t i_st...
  function x264_pixel_hadamard_ac_8x8_lasx (line 73) | uint64_t x264_pixel_hadamard_ac_8x8_lasx( uint8_t *p_pix, intptr_t i_str...
  function x264_pixel_hadamard_ac_8x16_lasx (line 82) | uint64_t x264_pixel_hadamard_ac_8x16_lasx( uint8_t *p_pix, intptr_t i_st...
  function x264_intra_sa8d_x3_8x8_lsx (line 92) | void x264_intra_sa8d_x3_8x8_lsx( uint8_t *p_enc, uint8_t p_edge[36],
  function x264_intra_sa8d_x3_8x8_lasx (line 110) | void x264_intra_sa8d_x3_8x8_lasx( uint8_t *p_enc, uint8_t p_edge[36],
  function x264_intra_satd_x3_4x4_lsx (line 128) | void x264_intra_satd_x3_4x4_lsx( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_satd_x3_16x16_lsx (line 144) | void x264_intra_satd_x3_16x16_lsx( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_satd_x3_16x16_lasx (line 160) | void x264_intra_satd_x3_16x16_lasx( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_satd_x3_8x8c_lsx (line 176) | void x264_intra_satd_x3_8x8c_lsx( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_sad_x3_4x4_lsx (line 192) | void x264_intra_sad_x3_4x4_lsx( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_sad_x3_16x16_lsx (line 208) | void x264_intra_sad_x3_16x16_lsx( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_sad_x3_8x8_lsx (line 224) | void x264_intra_sad_x3_8x8_lsx( uint8_t *p_enc, uint8_t p_edge[36],
  function x264_intra_sad_x3_8x8c_lsx (line 242) | void x264_intra_sad_x3_8x8c_lsx( uint8_t *p_enc, uint8_t *p_dec,

FILE: common/loongarch/predict-c.c
  function x264_predict_16x16_init_loongarch (line 29) | void x264_predict_16x16_init_loongarch( int cpu, x264_predict_t pf[7] )
  function x264_predict_8x8c_init_loongarch (line 49) | void x264_predict_8x8c_init_loongarch( int cpu, x264_predict_t pf[7] )
  function x264_predict_8x8_init_loongarch (line 65) | void x264_predict_8x8_init_loongarch( int cpu, x264_predict8x8_t pf[12],...
  function x264_predict_4x4_init_loongarch (line 92) | void x264_predict_4x4_init_loongarch( int cpu, x264_predict_t pf[12] )

FILE: common/macroblock.c
  function NOINLINE (line 37) | static NOINLINE void mb_mc_0xywh( x264_t *h, int x, int y, int width, in...
  function NOINLINE (line 76) | static NOINLINE void mb_mc_1xywh( x264_t *h, int x, int y, int width, in...
  function NOINLINE (line 112) | static NOINLINE void mb_mc_01xywh( x264_t *h, int x, int y, int width, i...
  function x264_mb_mc_8x8 (line 158) | void x264_mb_mc_8x8( x264_t *h, int i8 )
  function x264_mb_mc (line 200) | void x264_mb_mc( x264_t *h )
  function x264_macroblock_cache_allocate (line 248) | int x264_macroblock_cache_allocate( x264_t *h )
  function x264_macroblock_cache_free (line 348) | void x264_macroblock_cache_free( x264_t *h )
  function x264_macroblock_thread_allocate (line 353) | int x264_macroblock_thread_allocate( x264_t *h, int b_lookahead )
  function x264_macroblock_thread_free (line 408) | void x264_macroblock_thread_free( x264_t *h, int b_lookahead )
  function x264_macroblock_slice_init (line 423) | void x264_macroblock_slice_init( x264_t *h )
  function x264_macroblock_thread_init (line 501) | void x264_macroblock_thread_init( x264_t *h )
  function x264_prefetch_fenc (line 551) | void x264_prefetch_fenc( x264_t *h, x264_frame_t *fenc, int i_mb_x, int ...
  function NOINLINE (line 561) | NOINLINE void x264_copy_column8( pixel *dst, pixel *src )
  function ALWAYS_INLINE (line 568) | static ALWAYS_INLINE void macroblock_load_pic_pointers( x264_t *h, int m...
  function ALWAYS_INLINE (line 673) | static ALWAYS_INLINE void macroblock_cache_load_neighbours( x264_t *h, i...
  function ALWAYS_INLINE (line 855) | static ALWAYS_INLINE void macroblock_cache_load( x264_t *h, int mb_x, in...
  function x264_macroblock_cache_load_progressive (line 1354) | void x264_macroblock_cache_load_progressive( x264_t *h, int mb_x, int mb...
  function x264_macroblock_cache_load_interlaced (line 1359) | void x264_macroblock_cache_load_interlaced( x264_t *h, int mb_x, int mb_y )
  function macroblock_deblock_strength_mbaff (line 1364) | static void macroblock_deblock_strength_mbaff( x264_t *h, uint8_t (*bs)[...
  function x264_macroblock_deblock_strength (line 1438) | void x264_macroblock_deblock_strength( x264_t *h )
  function ALWAYS_INLINE (line 1624) | static ALWAYS_INLINE void macroblock_store_pic( x264_t *h, int mb_x, int...
  function ALWAYS_INLINE (line 1638) | static ALWAYS_INLINE void macroblock_backup_intra( x264_t *h, int mb_x, ...
  function x264_macroblock_cache_save (line 1680) | void x264_macroblock_cache_save( x264_t *h )
  function x264_macroblock_bipred_init (line 1883) | void x264_macroblock_bipred_init( x264_t *h )

FILE: common/macroblock.h
  type macroblock_position_e (line 31) | enum macroblock_position_e
  type mb_class_e (line 64) | enum mb_class_e
  type mb_partition_e (line 115) | enum mb_partition_e
  type cabac_ctx_block_cat_e (line 273) | enum cabac_ctx_block_cat_e
  function ALWAYS_INLINE (line 371) | static ALWAYS_INLINE uint32_t pack16to32( uint32_t a, uint32_t b )
  function ALWAYS_INLINE (line 379) | static ALWAYS_INLINE uint32_t pack8to16( uint32_t a, uint32_t b )
  function ALWAYS_INLINE (line 387) | static ALWAYS_INLINE uint32_t pack8to32( uint32_t a, uint32_t b, uint32_...
  function ALWAYS_INLINE (line 395) | static ALWAYS_INLINE uint32_t pack16to32_mask( int a, int b )
  function ALWAYS_INLINE (line 403) | static ALWAYS_INLINE uint64_t pack32to64( uint32_t a, uint32_t b )
  function ALWAYS_INLINE (line 420) | static ALWAYS_INLINE int x264_mb_predict_intra4x4_mode( x264_t *h, int i...
  function ALWAYS_INLINE (line 432) | static ALWAYS_INLINE int x264_mb_predict_non_zero_code( x264_t *h, int i...
  function ALWAYS_INLINE (line 454) | static ALWAYS_INLINE int x264_mb_transform_8x8_allowed( x264_t *h )

FILE: common/mc.c
  function pixel_avg (line 49) | static inline void pixel_avg( pixel *dst,  intptr_t i_dst_stride,
  function pixel_avg_wxh (line 63) | static inline void pixel_avg_wxh( pixel *dst,  intptr_t i_dst,
  function pixel_avg_weight_wxh (line 79) | static inline void pixel_avg_weight_wxh( pixel *dst,  intptr_t i_dst,
  function weight_cache (line 113) | static void weight_cache( x264_t *h, x264_weight_t *w )
  function mc_weight (line 119) | static void mc_weight( pixel *dst, intptr_t i_dst_stride, pixel *src, in...
  function mc_copy (line 162) | static void mc_copy( pixel *src, intptr_t i_src_stride, pixel *dst, intp...
  function hpel_filter (line 174) | static void hpel_filter( pixel *dsth, pixel *dstv, pixel *dstc, pixel *src,
  function mc_luma (line 198) | static void mc_luma( pixel *dst,    intptr_t i_dst_stride,
  function pixel (line 221) | static pixel *get_ref( pixel *dst,   intptr_t *i_dst_stride,
  function mc_chroma (line 252) | static void mc_chroma( pixel *dstu, pixel *dstv, intptr_t i_dst_stride,
  function x264_plane_copy_c (line 294) | void x264_plane_copy_c( pixel *dst, intptr_t i_dst,
  function x264_plane_copy_swap_c (line 305) | void x264_plane_copy_swap_c( pixel *dst, intptr_t i_dst,
  function x264_plane_copy_interleave_c (line 316) | void x264_plane_copy_interleave_c( pixel *dst,  intptr_t i_dst,
  function x264_plane_copy_deinterleave_c (line 328) | void x264_plane_copy_deinterleave_c( pixel *dsta, intptr_t i_dsta, pixel...
  function plane_copy_deinterleave_rgb_c (line 339) | static void plane_copy_deinterleave_rgb_c( pixel *dsta, intptr_t i_dsta,
  function ALWAYS_INLINE (line 356) | static ALWAYS_INLINE uint32_t v210_endian_fix32( uint32_t x )
  function plane_copy_deinterleave_v210_c (line 364) | static void plane_copy_deinterleave_v210_c( pixel *dsty, intptr_t i_dsty,
  function store_interleave_chroma (line 392) | static void store_interleave_chroma( pixel *dst, intptr_t i_dst, pixel *...
  function load_deinterleave_chroma_fenc (line 402) | static void load_deinterleave_chroma_fenc( pixel *dst, pixel *src, intpt...
  function load_deinterleave_chroma_fdec (line 407) | static void load_deinterleave_chroma_fdec( pixel *dst, pixel *src, intpt...
  function prefetch_fenc_null (line 412) | static void prefetch_fenc_null( pixel *pix_y,  intptr_t stride_y,
  function prefetch_ref_null (line 416) | static void prefetch_ref_null( pixel *pix, intptr_t stride, int parity )
  function memzero_aligned (line 419) | static void memzero_aligned( void * dst, size_t n )
  function integral_init4h (line 424) | static void integral_init4h( uint16_t *sum, pixel *pix, intptr_t stride )
  function integral_init8h (line 434) | static void integral_init8h( uint16_t *sum, pixel *pix, intptr_t stride )
  function integral_init4v (line 444) | static void integral_init4v( uint16_t *sum8, uint16_t *sum4, intptr_t st...
  function integral_init8v (line 452) | static void integral_init8v( uint16_t *sum8, intptr_t stride )
  function x264_frame_init_lowres (line 458) | void x264_frame_init_lowres( x264_t *h, x264_frame_t *frame )
  function frame_init_lowres_core (line 484) | static void frame_init_lowres_core( pixel *src0, pixel *dst0, pixel *dst...
  function mbtree_propagate_cost (line 511) | static void mbtree_propagate_cost( int16_t *dst, uint16_t *propagate_in,...
  function mbtree_propagate_list (line 527) | static void mbtree_propagate_list( x264_t *h, uint16_t *ref_costs, int16...
  function mbtree_fix8_pack (line 601) | static void mbtree_fix8_pack( uint16_t *dst, float *src, int count )
  function mbtree_fix8_unpack (line 607) | static void mbtree_fix8_unpack( float *dst, uint16_t *src, int count )
  function x264_mc_init (line 613) | void x264_mc_init( uint32_t cpu, x264_mc_functions_t *pf, int cpu_indepe...
  function x264_frame_filter (line 704) | void x264_frame_filter( x264_t *h, x264_frame_t *frame, int mb_y, int b_...

FILE: common/mc.h
  type x264_weight_t (line 233) | struct x264_weight_t
  type x264_weight_t (line 234) | struct x264_weight_t
  type x264_weight_t (line 235) | struct x264_weight_t
  type x264_mc_functions_t (line 267) | typedef struct

FILE: common/mips/dct-c.c
  function avc_dct4x4dc_msa (line 45) | static void avc_dct4x4dc_msa( int16_t *p_src, int16_t *p_dst,
  function avc_sub4x4_dct_msa (line 76) | static void avc_sub4x4_dct_msa( uint8_t *p_src, int32_t i_src_stride,
  function avc_zigzag_scan_4x4_frame_msa (line 121) | static void avc_zigzag_scan_4x4_frame_msa( int16_t pi_dct[16],
  function avc_idct4x4_addblk_msa (line 133) | static void avc_idct4x4_addblk_msa( uint8_t *p_dst, int16_t *p_src,
  function avc_idct4x4_addblk_dc_msa (line 151) | static void avc_idct4x4_addblk_dc_msa( uint8_t *p_dst, int16_t *p_src,
  function avc_idct8_addblk_msa (line 176) | static void avc_idct8_addblk_msa( uint8_t *p_dst, int16_t *p_src,
  function avc_idct4x4dc_msa (line 319) | static void avc_idct4x4dc_msa( int16_t *p_src, int32_t i_src_stride,
  function subtract_sum4x4_msa (line 346) | static int32_t subtract_sum4x4_msa( uint8_t *p_src, int32_t i_src_stride,
  function x264_dct4x4dc_msa (line 368) | void x264_dct4x4dc_msa( int16_t d[16] )
  function x264_idct4x4dc_msa (line 373) | void x264_idct4x4dc_msa( int16_t d[16] )
  function x264_add4x4_idct_msa (line 378) | void x264_add4x4_idct_msa( uint8_t *p_dst, int16_t pi_dct[16] )
  function x264_add8x8_idct_msa (line 383) | void x264_add8x8_idct_msa( uint8_t *p_dst, int16_t pi_dct[4][16] )
  function x264_add16x16_idct_msa (line 393) | void x264_add16x16_idct_msa( uint8_t *p_dst, int16_t pi_dct[16][16] )
  function x264_add8x8_idct8_msa (line 401) | void x264_add8x8_idct8_msa( uint8_t *p_dst, int16_t pi_dct[64] )
  function x264_add16x16_idct8_msa (line 406) | void x264_add16x16_idct8_msa( uint8_t *p_dst, int16_t pi_dct[4][64] )
  function x264_add8x8_idct_dc_msa (line 416) | void x264_add8x8_idct_dc_msa( uint8_t *p_dst, int16_t pi_dct[4] )
  function x264_add16x16_idct_dc_msa (line 426) | void x264_add16x16_idct_dc_msa( uint8_t *p_dst, int16_t pi_dct[16] )
  function x264_sub4x4_dct_msa (line 437) | void x264_sub4x4_dct_msa( int16_t p_dst[16], uint8_t *p_src,
  function x264_sub8x8_dct_msa (line 443) | void x264_sub8x8_dct_msa( int16_t p_dst[4][16], uint8_t *p_src,
  function x264_sub16x16_dct_msa (line 458) | void x264_sub16x16_dct_msa( int16_t p_dst[16][16],
  function x264_sub8x8_dct_dc_msa (line 470) | void x264_sub8x8_dct_dc_msa( int16_t pi_dct[4],
  function x264_sub8x16_dct_dc_msa (line 490) | void x264_sub8x16_dct_dc_msa( int16_t pi_dct[8],
  function x264_zigzag_scan_4x4_frame_msa (line 522) | void x264_zigzag_scan_4x4_frame_msa( int16_t pi_level[16], int16_t pi_dc...

FILE: common/mips/deblock-c.c
  function avc_loopfilter_luma_intra_edge_hor_msa (line 104) | static void avc_loopfilter_luma_intra_edge_hor_msa( uint8_t *p_data,
  function avc_loopfilter_luma_intra_edge_ver_msa (line 314) | static void avc_loopfilter_luma_intra_edge_ver_msa( uint8_t *p_data,
  function avc_lpf_cbcr_interleaved_intra_edge_hor_msa (line 580) | static void avc_lpf_cbcr_interleaved_intra_edge_hor_msa( uint8_t *p_chroma,
  function avc_lpf_cbcr_interleaved_intra_edge_ver_msa (line 654) | static void avc_lpf_cbcr_interleaved_intra_edge_ver_msa( uint8_t *p_chroma,
  function avc_loopfilter_luma_inter_edge_ver_msa (line 742) | static void avc_loopfilter_luma_inter_edge_ver_msa( uint8_t *p_data,
  function avc_loopfilter_luma_inter_edge_hor_msa (line 1069) | static void avc_loopfilter_luma_inter_edge_hor_msa( uint8_t *p_data,
  function avc_lpf_cbcr_interleaved_inter_edge_hor_msa (line 1266) | static void avc_lpf_cbcr_interleaved_inter_edge_hor_msa( uint8_t *p_chroma,
  function avc_lpf_cbcr_interleaved_inter_edge_ver_msa (line 1380) | static void avc_lpf_cbcr_interleaved_inter_edge_ver_msa( uint8_t *p_chroma,
  function avc_deblock_strength_msa (line 1532) | static void avc_deblock_strength_msa( uint8_t *nnz,
  function x264_deblock_v_luma_intra_msa (line 1852) | void x264_deblock_v_luma_intra_msa( uint8_t *p_pix, intptr_t i_stride,
  function x264_deblock_h_luma_intra_msa (line 1859) | void x264_deblock_h_luma_intra_msa( uint8_t *p_pix, intptr_t i_stride,
  function x264_deblock_v_chroma_intra_msa (line 1866) | void x264_deblock_v_chroma_intra_msa( uint8_t *p_pix, intptr_t i_stride,
  function x264_deblock_h_chroma_intra_msa (line 1873) | void x264_deblock_h_chroma_intra_msa( uint8_t *p_pix, intptr_t i_stride,
  function x264_deblock_h_luma_msa (line 1880) | void x264_deblock_h_luma_msa( uint8_t *p_pix, intptr_t i_stride,
  function x264_deblock_v_luma_msa (line 1900) | void x264_deblock_v_luma_msa( uint8_t *p_pix, intptr_t i_stride,
  function x264_deblock_v_chroma_msa (line 1920) | void x264_deblock_v_chroma_msa( uint8_t *p_pix, intptr_t i_stride,
  function x264_deblock_h_chroma_msa (line 1940) | void x264_deblock_h_chroma_msa( uint8_t *p_pix, intptr_t i_stride,
  function x264_deblock_strength_msa (line 1960) | void x264_deblock_strength_msa( uint8_t u_nnz[X264_SCAN8_SIZE],

FILE: common/mips/mc-c.c
  function avc_luma_hz_16w_msa (line 54) | static void avc_luma_hz_16w_msa( uint8_t *p_src, int32_t i_src_stride,
  function avc_luma_vt_16w_msa (line 141) | static void avc_luma_vt_16w_msa( uint8_t *p_src, int32_t i_src_stride,
  function avc_luma_mid_8w_msa (line 250) | static void avc_luma_mid_8w_msa( uint8_t *p_src, int32_t i_src_stride,
  function avc_luma_mid_16w_msa (line 334) | static void avc_luma_mid_16w_msa( uint8_t *p_src, int32_t i_src_stride,
  function avc_interleaved_chroma_hv_2x2_msa (line 349) | static void avc_interleaved_chroma_hv_2x2_msa( uint8_t *p_src,
  function avc_interleaved_chroma_hv_2x4_msa (line 402) | static void avc_interleaved_chroma_hv_2x4_msa( uint8_t *p_src,
  function avc_interleaved_chroma_hv_2w_msa (line 483) | static void avc_interleaved_chroma_hv_2w_msa( uint8_t *p_src,
  function avc_interleaved_chroma_hv_4x2_msa (line 510) | static void avc_interleaved_chroma_hv_4x2_msa( uint8_t *p_src,
  function avc_interleaved_chroma_hv_4x4mul_msa (line 561) | static void avc_interleaved_chroma_hv_4x4mul_msa( uint8_t *p_src,
  function avc_interleaved_chroma_hv_4w_msa (line 631) | static void avc_interleaved_chroma_hv_4w_msa( uint8_t *p_src,
  function avc_interleaved_chroma_hv_8w_msa (line 659) | static void avc_interleaved_chroma_hv_8w_msa( uint8_t *p_src,
  function avc_wgt_opscale_4x2_msa (line 745) | static void avc_wgt_opscale_4x2_msa( uint8_t *p_src, int32_t i_src_stride,
  function avc_wgt_opscale_4x4multiple_msa (line 793) | static void avc_wgt_opscale_4x4multiple_msa( uint8_t *p_src,
  function avc_wgt_opscale_4width_msa (line 844) | static void avc_wgt_opscale_4width_msa( uint8_t *p_src, int32_t i_src_st...
  function avc_wgt_opscale_8width_msa (line 863) | static void avc_wgt_opscale_8width_msa( uint8_t *p_src, int32_t i_src_st...
  function avc_wgt_opscale_16width_msa (line 906) | static void avc_wgt_opscale_16width_msa( uint8_t *p_src, int32_t i_src_s...
  function avc_biwgt_opscale_4x2_nw_msa (line 959) | static void avc_biwgt_opscale_4x2_nw_msa( uint8_t *p_src1_in,
  function avc_biwgt_opscale_4x4multiple_nw_msa (line 1001) | static void avc_biwgt_opscale_4x4multiple_nw_msa( uint8_t *p_src1_in,
  function avc_biwgt_opscale_4width_nw_msa (line 1052) | static void avc_biwgt_opscale_4width_nw_msa( uint8_t *p_src1_in,
  function avc_biwgt_opscale_8width_nw_msa (line 1083) | static void avc_biwgt_opscale_8width_nw_msa( uint8_t *p_src1_in,
  function avc_biwgt_opscale_16width_nw_msa (line 1136) | static void avc_biwgt_opscale_16width_nw_msa( uint8_t *p_src1_in,
  function avc_biwgt_opscale_4x2_msa (line 1193) | static void avc_biwgt_opscale_4x2_msa( uint8_t *p_src1_in,
  function avc_biwgt_opscale_4x4multiple_msa (line 1244) | static void avc_biwgt_opscale_4x4multiple_msa( uint8_t *p_src1_in,
  function avc_biwgt_opscale_4width_msa (line 1305) | static void avc_biwgt_opscale_4width_msa( uint8_t *p_src1_in,
  function avc_biwgt_opscale_8width_msa (line 1337) | static void avc_biwgt_opscale_8width_msa( uint8_t *p_src1_in,
  function avc_biwgt_opscale_16width_msa (line 1389) | static void avc_biwgt_opscale_16width_msa( uint8_t *p_src1_in,
  function copy_width4_msa (line 1450) | static void copy_width4_msa( uint8_t *p_src, int32_t i_src_stride,
  function copy_width8_msa (line 1471) | static void copy_width8_msa( uint8_t *p_src, int32_t i_src_stride,
  function copy_16multx8mult_msa (line 1569) | static void copy_16multx8mult_msa( uint8_t *p_src, int32_t i_src_stride,
  function copy_width16_msa (line 1598) | static void copy_width16_msa( uint8_t *p_src, int32_t i_src_stride,
  function avg_src_width4_msa (line 1640) | static void avg_src_width4_msa( uint8_t *p_src1, int32_t i_src1_stride,
  function avg_src_width8_msa (line 1668) | static void avg_src_width8_msa( uint8_t *p_src1, int32_t i_src1_stride,
  function avg_src_width16_msa (line 1697) | static void avg_src_width16_msa( uint8_t *p_src1, int32_t i_src1_stride,
  function memset_zero_16width_msa (line 1726) | static void memset_zero_16width_msa( uint8_t *p_src, int32_t i_stride,
  function core_plane_copy_interleave_msa (line 1741) | static void core_plane_copy_interleave_msa( uint8_t *p_src0, int32_t i_s...
  function core_plane_copy_deinterleave_msa (line 1846) | static void core_plane_copy_deinterleave_msa( uint8_t *p_src, int32_t i_...
  function core_plane_copy_deinterleave_rgb_msa (line 1978) | static void core_plane_copy_deinterleave_rgb_msa( uint8_t *p_src,
  function core_plane_copy_deinterleave_rgba_msa (line 2114) | static void core_plane_copy_deinterleave_rgba_msa( uint8_t *p_src,
  function core_store_interleave_chroma_msa (line 2321) | static void core_store_interleave_chroma_msa( uint8_t *p_src0, int32_t i...
  function core_frame_init_lowres_core_msa (line 2356) | static void core_frame_init_lowres_core_msa( uint8_t *p_src, int32_t i_s...
  function mc_copy_w16_msa (line 2463) | static void mc_copy_w16_msa( uint8_t *p_dst, intptr_t i_dst_stride,
  function mc_copy_w8_msa (line 2470) | static void mc_copy_w8_msa( uint8_t *p_dst, intptr_t i_dst_stride, uint8...
  function mc_copy_w4_msa (line 2476) | static void mc_copy_w4_msa( uint8_t *p_dst, intptr_t i_dst_stride, uint8...
  function pixel_avg_16x16_msa (line 2482) | static void pixel_avg_16x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
  function pixel_avg_16x8_msa (line 2510) | static void pixel_avg_16x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
  function pixel_avg_8x16_msa (line 2538) | static void pixel_avg_8x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
  function pixel_avg_8x8_msa (line 2564) | static void pixel_avg_8x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
  function pixel_avg_8x4_msa (line 2590) | static void pixel_avg_8x4_msa( uint8_t *p_pix1, intptr_t pix1_stride,
  function pixel_avg_4x16_msa (line 2616) | static void pixel_avg_4x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
  function pixel_avg_4x8_msa (line 2642) | static void pixel_avg_4x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
  function pixel_avg_4x4_msa (line 2668) | static void pixel_avg_4x4_msa( uint8_t *p_pix1, intptr_t pix1_stride,
  function pixel_avg_4x2_msa (line 2694) | static void pixel_avg_4x2_msa( uint8_t *p_pix1, intptr_t pix1_stride,
  function memzero_aligned_msa (line 2721) | static void memzero_aligned_msa( void *p_dst, size_t n )
  function mc_weight_w4_msa (line 2734) | static void mc_weight_w4_msa( uint8_t *p_dst, intptr_t i_dst_stride,
  function mc_weight_w8_msa (line 2746) | static void mc_weight_w8_msa( uint8_t *p_dst, intptr_t i_dst_stride,
  function mc_weight_w16_msa (line 2758) | static void mc_weight_w16_msa( uint8_t *p_dst, intptr_t i_dst_stride,
  function mc_weight_w20_msa (line 2770) | static void mc_weight_w20_msa( uint8_t *p_dst, intptr_t i_dst_stride,
  function mc_luma_msa (line 2780) | static void mc_luma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
  function mc_chroma_msa (line 2874) | static void mc_chroma_msa( uint8_t *p_dst_u, uint8_t *p_dst_v,
  function hpel_filter_msa (line 2915) | static void hpel_filter_msa( uint8_t *p_dsth, uint8_t *p_dst_v,
  function plane_copy_interleave_msa (line 2935) | static void plane_copy_interleave_msa( uint8_t *p_dst, intptr_t i_dst_st...
  function plane_copy_deinterleave_msa (line 2944) | static void plane_copy_deinterleave_msa( uint8_t *p_dst0, intptr_t i_dst...
  function plane_copy_deinterleave_rgb_msa (line 2953) | static void plane_copy_deinterleave_rgb_msa( uint8_t *p_dst0,
  function store_interleave_chroma_msa (line 2983) | static void store_interleave_chroma_msa( uint8_t *p_dst, intptr_t i_dst_...
  function load_deinterleave_chroma_fenc_msa (line 2991) | static void load_deinterleave_chroma_fenc_msa( uint8_t *p_dst, uint8_t *...
  function load_deinterleave_chroma_fdec_msa (line 3000) | static void load_deinterleave_chroma_fdec_msa( uint8_t *p_dst, uint8_t *...
  function frame_init_lowres_core_msa (line 3009) | static void frame_init_lowres_core_msa( uint8_t *p_src, uint8_t *p_dst0,
  function x264_mc_init_mips (line 3653) | void x264_mc_init_mips( uint32_t cpu, x264_mc_functions_t *pf  )

FILE: common/mips/pixel-c.c
  function sad_4width_msa (line 57) | static uint32_t sad_4width_msa( uint8_t *p_src, int32_t i_src_stride,
  function sad_8width_msa (line 85) | static uint32_t sad_8width_msa( uint8_t *p_src, int32_t i_src_stride,
  function sad_16width_msa (line 108) | static uint32_t sad_16width_msa( uint8_t *p_src, int32_t i_src_stride,
  function sad_4width_x3d_msa (line 134) | static void sad_4width_x3d_msa( uint8_t *p_src, int32_t i_src_stride,
  function sad_8width_x3d_msa (line 183) | static void sad_8width_x3d_msa( uint8_t *p_src, int32_t i_src_stride,
  function sad_16width_x3d_msa (line 224) | static void sad_16width_x3d_msa( uint8_t *p_src, int32_t i_src_stride,
  function sad_4width_x4d_msa (line 280) | static void sad_4width_x4d_msa( uint8_t *p_src, int32_t i_src_stride,
  function sad_8width_x4d_msa (line 342) | static void sad_8width_x4d_msa( uint8_t *p_src, int32_t i_src_stride,
  function sad_16width_x4d_msa (line 394) | static void sad_16width_x4d_msa( uint8_t *p_src, int32_t i_src_stride,
  function avc_pixel_var16width_msa (line 460) | static uint64_t avc_pixel_var16width_msa( uint8_t *p_pix, int32_t i_stride,
  function avc_pixel_var8width_msa (line 484) | static uint64_t avc_pixel_var8width_msa( uint8_t *p_pix, int32_t i_stride,
  function sse_diff_8width_msa (line 507) | static uint32_t sse_diff_8width_msa( uint8_t *p_src, int32_t i_src_stride,
  function sse_4width_msa (line 538) | static uint32_t sse_4width_msa( uint8_t *p_src, int32_t i_src_stride,
  function sse_8width_msa (line 567) | static uint32_t sse_8width_msa( uint8_t *p_src, int32_t i_src_stride,
  function sse_16width_msa (line 595) | static uint32_t sse_16width_msa( uint8_t *p_src, int32_t i_src_stride,
  function ssim_4x4x2_core_msa (line 636) | static void ssim_4x4x2_core_msa( const uint8_t *p_src, int32_t i_src_str...
  function pixel_satd_4width_msa (line 706) | static int32_t pixel_satd_4width_msa( uint8_t *p_src, int32_t i_src_stride,
  function pixel_satd_8width_msa (line 750) | static int32_t pixel_satd_8width_msa( uint8_t *p_src, int32_t i_src_stride,
  function sa8d_8x8_msa (line 801) | static int32_t sa8d_8x8_msa( uint8_t *p_src, int32_t i_src_stride,
  function pixel_hadamard_ac_8x8_msa (line 856) | static uint64_t pixel_hadamard_ac_8x8_msa( uint8_t *p_pix, int32_t i_str...
  function x264_pixel_sad_16x16_msa (line 951) | int32_t x264_pixel_sad_16x16_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_sad_16x8_msa (line 957) | int32_t x264_pixel_sad_16x8_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_sad_8x16_msa (line 963) | int32_t x264_pixel_sad_8x16_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_sad_8x8_msa (line 969) | int32_t x264_pixel_sad_8x8_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_sad_8x4_msa (line 975) | int32_t x264_pixel_sad_8x4_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_sad_4x16_msa (line 981) | int32_t x264_pixel_sad_4x16_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_sad_4x8_msa (line 987) | int32_t x264_pixel_sad_4x8_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_sad_4x4_msa (line 993) | int32_t x264_pixel_sad_4x4_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_sad_x4_16x16_msa (line 999) | void x264_pixel_sad_x4_16x16_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x4_16x8_msa (line 1010) | void x264_pixel_sad_x4_16x8_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x4_8x16_msa (line 1021) | void x264_pixel_sad_x4_8x16_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x4_8x8_msa (line 1032) | void x264_pixel_sad_x4_8x8_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x4_8x4_msa (line 1043) | void x264_pixel_sad_x4_8x4_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x4_4x8_msa (line 1054) | void x264_pixel_sad_x4_4x8_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x4_4x4_msa (line 1065) | void x264_pixel_sad_x4_4x4_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x3_16x16_msa (line 1076) | void x264_pixel_sad_x3_16x16_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x3_16x8_msa (line 1085) | void x264_pixel_sad_x3_16x8_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x3_8x16_msa (line 1094) | void x264_pixel_sad_x3_8x16_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x3_8x8_msa (line 1103) | void x264_pixel_sad_x3_8x8_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x3_8x4_msa (line 1112) | void x264_pixel_sad_x3_8x4_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x3_4x8_msa (line 1121) | void x264_pixel_sad_x3_4x8_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_sad_x3_4x4_msa (line 1130) | void x264_pixel_sad_x3_4x4_msa( uint8_t *p_src, uint8_t *p_ref0,
  function x264_pixel_ssd_16x16_msa (line 1139) | int32_t x264_pixel_ssd_16x16_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_ssd_16x8_msa (line 1145) | int32_t x264_pixel_ssd_16x8_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_ssd_8x16_msa (line 1151) | int32_t x264_pixel_ssd_8x16_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_ssd_8x8_msa (line 1157) | int32_t x264_pixel_ssd_8x8_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_ssd_8x4_msa (line 1163) | int32_t x264_pixel_ssd_8x4_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_ssd_4x16_msa (line 1169) | int32_t x264_pixel_ssd_4x16_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_ssd_4x8_msa (line 1175) | int32_t x264_pixel_ssd_4x8_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_pixel_ssd_4x4_msa (line 1181) | int32_t x264_pixel_ssd_4x4_msa( uint8_t *p_src, intptr_t i_src_stride,
  function x264_intra_sad_x3_4x4_msa (line 1187) | void x264_intra_sad_x3_4x4_msa( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_sad_x3_16x16_msa (line 1203) | void x264_intra_sad_x3_16x16_msa( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_sad_x3_8x8_msa (line 1219) | void x264_intra_sad_x3_8x8_msa( uint8_t *p_enc, uint8_t p_edge[36],
  function x264_intra_sad_x3_8x8c_msa (line 1237) | void x264_intra_sad_x3_8x8c_msa( uint8_t *p_enc, uint8_t *p_dec,
  function x264_ssim_4x4x2_core_msa (line 1253) | void x264_ssim_4x4x2_core_msa( const uint8_t *p_pix1, intptr_t i_stride1,
  function x264_pixel_hadamard_ac_8x8_msa (line 1260) | uint64_t x264_pixel_hadamard_ac_8x8_msa( uint8_t *p_pix, intptr_t i_stri...
  function x264_pixel_hadamard_ac_8x16_msa (line 1269) | uint64_t x264_pixel_hadamard_ac_8x16_msa( uint8_t *p_pix, intptr_t i_str...
  function x264_pixel_hadamard_ac_16x8_msa (line 1279) | uint64_t x264_pixel_hadamard_ac_16x8_msa( uint8_t *p_pix, intptr_t i_str...
  function x264_pixel_hadamard_ac_16x16_msa (line 1289) | uint64_t x264_pixel_hadamard_ac_16x16_msa( uint8_t *p_pix, intptr_t i_st...
  function x264_pixel_satd_4x4_msa (line 1301) | int32_t x264_pixel_satd_4x4_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_pixel_satd_4x8_msa (line 1307) | int32_t x264_pixel_satd_4x8_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_pixel_satd_4x16_msa (line 1313) | int32_t x264_pixel_satd_4x16_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_pixel_satd_8x4_msa (line 1319) | int32_t x264_pixel_satd_8x4_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_pixel_satd_8x8_msa (line 1325) | int32_t x264_pixel_satd_8x8_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_pixel_satd_8x16_msa (line 1331) | int32_t x264_pixel_satd_8x16_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_pixel_satd_16x8_msa (line 1337) | int32_t x264_pixel_satd_16x8_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_pixel_satd_16x16_msa (line 1349) | int32_t x264_pixel_satd_16x16_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_pixel_sa8d_8x8_msa (line 1361) | int32_t x264_pixel_sa8d_8x8_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_pixel_sa8d_16x16_msa (line 1369) | int32_t x264_pixel_sa8d_16x16_msa( uint8_t *p_pix1, intptr_t i_stride,
  function x264_intra_satd_x3_4x4_msa (line 1383) | void x264_intra_satd_x3_4x4_msa( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_satd_x3_16x16_msa (line 1399) | void x264_intra_satd_x3_16x16_msa( uint8_t *p_enc, uint8_t *p_dec,
  function x264_intra_sa8d_x3_8x8_msa (line 1415) | void x264_intra_sa8d_x3_8x8_msa( uint8_t *p_enc, uint8_t p_edge[36],
  function x264_intra_satd_x3_8x8c_msa (line 1433) | void x264_intra_satd_x3_8x8c_msa( uint8_t *p_enc, uint8_t *p_dec,
  function x264_pixel_var_16x16_msa (line 1449) | uint64_t x264_pixel_var_16x16_msa( uint8_t *p_pix, intptr_t i_stride )
  function x264_pixel_var_8x16_msa (line 1454) | uint64_t x264_pixel_var_8x16_msa( uint8_t *p_pix, intptr_t i_stride )
  function x264_pixel_var_8x8_msa (line 1459) | uint64_t x264_pixel_var_8x8_msa( uint8_t *p_pix, intptr_t i_stride )
  function x264_pixel_var2_8x16_msa (line 1464) | int32_t x264_pixel_var2_8x16_msa( uint8_t *p_pix1, intptr_t i_stride1,
  function x264_pixel_var2_8x8_msa (line 1478) | int32_t x264_pixel_var2_8x8_msa( uint8_t *p_pix1, intptr_t i_stride1,

FILE: common/mips/predict-c.c
  function intra_predict_vert_4x4_msa (line 31) | static void intra_predict_vert_4x4_msa( uint8_t *p_src, uint8_t *p_dst,
  function intra_predict_vert_8x8_msa (line 41) | static void intra_predict_vert_8x8_msa( uint8_t *p_src, uint8_t *p_dst,
  function intra_predict_vert_16x16_msa (line 53) | static void intra_predict_vert_16x16_msa( uint8_t *p_src, uint8_t *p_dst,
  function intra_predict_horiz_4x4_msa (line 65) | static void intra_predict_horiz_4x4_msa( uint8_t *p_src, int32_t i_src_s...
  function intra_predict_horiz_8x8_msa (line 78) | static void intra_predict_horiz_8x8_msa( uint8_t *p_src, int32_t i_src_s...
  function intra_predict_horiz_16x16_msa (line 97) | static void intra_predict_horiz_16x16_msa( uint8_t *p_src, int32_t i_src...
  function intra_predict_dc_4x4_msa (line 126) | static void intra_predict_dc_4x4_msa( uint8_t *p_src_top, uint8_t *p_src...
  function intra_predict_dc_8x8_msa (line 182) | static void intra_predict_dc_8x8_msa( uint8_t *p_src_top, uint8_t *p_src...
  function intra_predict_dc_16x16_msa (line 209) | static void intra_predict_dc_16x16_msa( uint8_t *p_src_top, uint8_t *p_s...
  function intra_predict_plane_8x8_msa (line 274) | static void intra_predict_plane_8x8_msa( uint8_t *p_src, int32_t i_stride )
  function intra_predict_plane_16x16_msa (line 344) | static void intra_predict_plane_16x16_msa( uint8_t *p_src, int32_t i_str...
  function intra_predict_dc_4blk_8x8_msa (line 413) | static void intra_predict_dc_4blk_8x8_msa( uint8_t *p_src, int32_t i_str...
  function intra_predict_ddl_8x8_msa (line 454) | static void intra_predict_ddl_8x8_msa( uint8_t *p_src, uint8_t *p_dst,
  function intra_predict_128dc_16x16_msa (line 501) | static void intra_predict_128dc_16x16_msa( uint8_t *p_dst,
  function x264_intra_predict_dc_16x16_msa (line 511) | void x264_intra_predict_dc_16x16_msa( uint8_t *p_src )
  function x264_intra_predict_dc_left_16x16_msa (line 517) | void x264_intra_predict_dc_left_16x16_msa( uint8_t *p_src )
  function x264_intra_predict_dc_top_16x16_msa (line 523) | void x264_intra_predict_dc_top_16x16_msa( uint8_t *p_src )
  function x264_intra_predict_dc_128_16x16_msa (line 529) | void x264_intra_predict_dc_128_16x16_msa( uint8_t *p_src )
  function x264_intra_predict_hor_16x16_msa (line 534) | void x264_intra_predict_hor_16x16_msa( uint8_t *p_src )
  function x264_intra_predict_vert_16x16_msa (line 540) | void x264_intra_predict_vert_16x16_msa( uint8_t *p_src )
  function x264_intra_predict_plane_16x16_msa (line 545) | void x264_intra_predict_plane_16x16_msa( uint8_t *p_src )
  function x264_intra_predict_dc_4blk_8x8_msa (line 550) | void x264_intra_predict_dc_4blk_8x8_msa( uint8_t *p_src )
  function x264_intra_predict_hor_8x8_msa (line 555) | void x264_intra_predict_hor_8x8_msa( uint8_t *p_src )
  function x264_intra_predict_vert_8x8_msa (line 561) | void x264_intra_predict_vert_8x8_msa( uint8_t *p_src )
  function x264_intra_predict_plane_8x8_msa (line 566) | void x264_intra_predict_plane_8x8_msa( uint8_t *p_src )
  function x264_intra_predict_ddl_8x8_msa (line 571) | void x264_intra_predict_ddl_8x8_msa( uint8_t *p_src, uint8_t pu_xyz[36] )
  function x264_intra_predict_dc_8x8_msa (line 576) | void x264_intra_predict_dc_8x8_msa( uint8_t *p_src, uint8_t pu_xyz[36] )
  function x264_intra_predict_h_8x8_msa (line 582) | void x264_intra_predict_h_8x8_msa( uint8_t *p_src, uint8_t pu_xyz[36] )
  function x264_intra_predict_v_8x8_msa (line 587) | void x264_intra_predict_v_8x8_msa( uint8_t *p_src, uint8_t pu_xyz[36] )
  function x264_intra_predict_dc_4x4_msa (line 592) | void x264_intra_predict_dc_4x4_msa( uint8_t *p_src )
  function x264_intra_predict_hor_4x4_msa (line 598) | void x264_intra_predict_hor_4x4_msa( uint8_t *p_src )
  function x264_intra_predict_vert_4x4_msa (line 604) | void x264_intra_predict_vert_4x4_msa( uint8_t *p_src )

FILE: common/mips/quant-c.c
  function avc_dequant_4x4_msa (line 31) | static void avc_dequant_4x4_msa( int16_t *p_dct, int32_t pi_dequant_mf[6...
  function avc_dequant_8x8_msa (line 88) | static void avc_dequant_8x8_msa( int16_t *p_dct, int32_t pi_dequant_mf[6...
  function avc_dequant_4x4_dc_msa (line 214) | static void avc_dequant_4x4_dc_msa( int16_t *p_dct,
  function avc_quant_4x4_msa (line 266) | static int32_t avc_quant_4x4_msa( int16_t *p_dct, uint16_t *p_mf,
  function avc_quant_8x8_msa (line 319) | static int32_t avc_quant_8x8_msa( int16_t *p_dct, uint16_t *p_mf,
  function avc_quant_4x4_dc_msa (line 455) | static int32_t avc_quant_4x4_dc_msa( int16_t *p_dct, int32_t i_mf,
  function avc_coeff_last64_msa (line 503) | static int32_t avc_coeff_last64_msa( int16_t *p_src )
  function avc_coeff_last16_msa (line 545) | static int32_t avc_coeff_last16_msa( int16_t *p_src )
  function x264_dequant_4x4_msa (line 574) | void x264_dequant_4x4_msa( int16_t *p_dct, int32_t pi_dequant_mf[6][16],
  function x264_dequant_8x8_msa (line 580) | void x264_dequant_8x8_msa( int16_t *p_dct, int32_t pi_dequant_mf[6][64],
  function x264_dequant_4x4_dc_msa (line 586) | void x264_dequant_4x4_dc_msa( int16_t *p_dct, int32_t pi_dequant_mf[6][16],
  function x264_quant_4x4_msa (line 592) | int32_t x264_quant_4x4_msa( int16_t *p_dct, uint16_t *p_mf, uint16_t *p_...
  function x264_quant_4x4x4_msa (line 597) | int32_t x264_quant_4x4x4_msa( int16_t p_dct[4][16],
  function x264_quant_8x8_msa (line 612) | int32_t x264_quant_8x8_msa( int16_t *p_dct, uint16_t *p_mf, uint16_t *p_...
  function x264_quant_4x4_dc_msa (line 617) | int32_t x264_quant_4x4_dc_msa( int16_t *p_dct, int32_t i_mf, int32_t i_b...
  function x264_coeff_last64_msa (line 622) | int32_t x264_coeff_last64_msa( int16_t *p_src )
  function x264_coeff_last16_msa (line 627) | int32_t x264_coeff_last16_msa( int16_t *p_src )

FILE: common/mvpred.c
  function x264_mb_predict_mv (line 30) | void x264_mb_predict_mv( x264_t *h, int i_list, int idx, int i_width, in...
  function x264_mb_predict_mv_16x16 (line 129) | void x264_mb_predict_mv_16x16( x264_t *h, int i_list, int i_ref, int16_t...
  function x264_mb_predict_mv_pskip (line 166) | void x264_mb_predict_mv_pskip( x264_t *h, int16_t mv[2] )
  function mb_predict_mv_direct16x16_temporal (line 183) | static int mb_predict_mv_direct16x16_temporal( x264_t *h )
  function ALWAYS_INLINE (line 289) | static ALWAYS_INLINE int mb_predict_mv_direct16x16_spatial( x264_t *h, i...
  function mb_predict_mv_direct16x16_spatial_interlaced (line 444) | static int mb_predict_mv_direct16x16_spatial_interlaced( x264_t *h )
  function mb_predict_mv_direct16x16_spatial_progressive (line 449) | static int mb_predict_mv_direct16x16_spatial_progressive( x264_t *h )
  function x264_mb_predict_mv_direct16x16 (line 454) | int x264_mb_predict_mv_direct16x16( x264_t *h, int *b_changed )
  function x264_mb_predict_mv_ref16x16 (line 519) | void x264_mb_predict_mv_ref16x16( x264_t *h, int i_list, int i_ref, int1...

FILE: common/opencl.c
  function x264_opencl_function_t (line 53) | x264_opencl_function_t *x264_opencl_load_library( void )
  function x264_opencl_close_library (line 104) | void x264_opencl_close_library( x264_opencl_function_t *ocl )
  function cl_program (line 122) | static cl_program opencl_cache_load( x264_t *h, const char *dev_name, co...
  function opencl_cache_save (line 174) | static void opencl_cache_save( x264_t *h, cl_program program, const char...
  function cl_program (line 222) | static cl_program opencl_compile( x264_t *h )
  function opencl_lookahead_alloc (line 328) | static int opencl_lookahead_alloc( x264_t *h )
  function opencl_error_notify (line 400) | static void CL_CALLBACK opencl_error_notify( const char *errinfo, const ...
  function x264_opencl_lookahead_init (line 411) | int x264_opencl_lookahead_init( x264_t *h )
  function opencl_lookahead_free (line 557) | static void opencl_lookahead_free( x264_t *h )
  function x264_opencl_lookahead_delete (line 596) | void x264_opencl_lookahead_delete( x264_t *h )
  function x264_opencl_frame_delete (line 620) | void x264_opencl_frame_delete( x264_frame_t *frame )
  function detect_switchable_graphics (line 669) | static int detect_switchable_graphics( void )

FILE: common/opencl.h
  type x264_opencl_function_t (line 677) | typedef struct
  type x264_opencl_t (line 720) | typedef struct
  type x264_frame_opencl_t (line 780) | typedef struct
  type x264_frame (line 794) | typedef struct x264_frame x264_frame;

FILE: common/opencl/x264-cl.h
  type pixel (line 13) | typedef uint8_t  pixel;
  type sum_t (line 14) | typedef uint16_t sum_t;
  type sum2_t (line 15) | typedef uint32_t sum2_t;
  function pixel (line 41) | inline pixel x264_clip_pixel( int x )
  function int2 (line 46) | inline int2 x264_median_mv( short2 a, short2 b, short2 c )
  function sum2_t (line 53) | inline sum2_t abs2( sum2_t a )
  function parallel_sum (line 106) | int parallel_sum( int value, int x, volatile local int *array )
  function mv_cost (line 127) | int mv_cost( uint2 mvd )

FILE: common/osdep.c
  function x264_mdate (line 43) | int64_t x264_mdate( void )
  function threading_destroy (line 64) | static void threading_destroy( void )
  function threading_init (line 74) | static int threading_init( void )
  function x264_threading_init (line 91) | int x264_threading_init( void )

FILE: common/osdep.h
  function x264_vsnprintf (line 83) | static inline int x264_vsnprintf( char *s, size_t n, const char *fmt, va...
  function x264_snprintf (line 106) | static inline int x264_snprintf( char *s, size_t n, const char *fmt, ... )
  function wchar_t (line 121) | static inline wchar_t *x264_utf8_to_utf16( const char *utf8 )
  function wchar_t (line 137) | static inline wchar_t *x264_utf8_to_utf16_try_buf( const char *utf8, wch...
  function FILE (line 144) | static inline FILE *x264_fopen_internal( const char *filename, const wch...
  function x264_rename (line 158) | static inline int x264_rename( const char *oldname, const char *newname )
  function x264_stat (line 184) | static inline int x264_stat( const char *path, x264_struct_stat *buf )
  function x264_vfprintf (line 209) | static inline int x264_vfprintf( FILE *stream, const char *format, va_li...
  function x264_is_regular_file_path (line 242) | static inline int x264_is_regular_file_path( const char *path )
  function x264_is_regular_file_path (line 261) | static inline int x264_is_regular_file_path( const char *filename )
  function x264_is_regular_file (line 270) | static inline int x264_is_regular_file( FILE *filehandle )
  function x264_pthread_create (line 369) | static inline int x264_pthread_create( x264_pthread_t *t, void *a, void ...
  function ALWAYS_INLINE (line 433) | static ALWAYS_INLINE int x264_pthread_fetch_and_add( int *val, int add, ...
  function ALWAYS_INLINE (line 463) | static ALWAYS_INLINE uint32_t endian_fix32( uint32_t x )
  function ALWAYS_INLINE (line 469) | static ALWAYS_INLINE uint32_t endian_fix32( uint32_t x )
  function ALWAYS_INLINE (line 475) | static ALWAYS_INLINE uint32_t endian_fix32( uint32_t x )
  function ALWAYS_INLINE (line 481) | static ALWAYS_INLINE uint64_t endian_fix64( uint64_t x )
  function ALWAYS_INLINE (line 487) | static ALWAYS_INLINE uint64_t endian_fix64( uint64_t x )
  function ALWAYS_INLINE (line 492) | static ALWAYS_INLINE uintptr_t endian_fix( uintptr_t x )
  function ALWAYS_INLINE (line 496) | static ALWAYS_INLINE uint16_t endian_fix16( uint16_t x )
  function ALWAYS_INLINE (line 503) | static ALWAYS_INLINE int x264_ctz_4bit( uint32_t x )
  function ALWAYS_INLINE (line 513) | static ALWAYS_INLINE int x264_clz( uint32_t x )
  function ALWAYS_INLINE (line 525) | static ALWAYS_INLINE int x264_ctz( uint32_t x )
  function ALWAYS_INLINE (line 541) | static ALWAYS_INLINE void x264_prefetch( void *p )

FILE: common/pixel.c
  function x264_pixel_ssd_wxh (line 112) | uint64_t x264_pixel_ssd_wxh( x264_pixel_function_t *pf, pixel *pix1, int...
  function pixel_ssd_nv12_core (line 153) | static void pixel_ssd_nv12_core( pixel *pixuv1, intptr_t stride1, pixel ...
  function x264_pixel_ssd_nv12 (line 167) | void x264_pixel_ssd_nv12( x264_pixel_function_t *pf, pixel *pix1, intptr...
  type sum_t (line 234) | typedef uint32_t sum_t;
  type sum2_t (line 235) | typedef uint64_t sum2_t;
  type sum_t (line 237) | typedef uint16_t sum_t;
  type sum2_t (line 238) | typedef uint32_t sum2_t;
  function ALWAYS_INLINE (line 255) | static ALWAYS_INLINE sum2_t abs2( sum2_t a )
  function NOINLINE (line 265) | static NOINLINE int x264_pixel_satd_4x4( pixel *pix1, intptr_t i_pix1, p...
  function NOINLINE (line 290) | static NOINLINE int x264_pixel_satd_8x4( pixel *pix1, intptr_t i_pix1, p...
  function NOINLINE (line 334) | static NOINLINE int sa8d_8x8( pixel *pix1, intptr_t i_pix1, pixel *pix2,...
  function x264_pixel_sa8d_8x8 (line 368) | static int x264_pixel_sa8d_8x8( pixel *pix1, intptr_t i_pix1, pixel *pix...
  function x264_pixel_sa8d_16x16 (line 374) | static int x264_pixel_sa8d_16x16( pixel *pix1, intptr_t i_pix1, pixel *p...
  function NOINLINE (line 383) | static NOINLINE uint64_t pixel_hadamard_ac( pixel *pix, intptr_t stride )
  function ssim_4x4x2_core (line 627) | static void ssim_4x4x2_core( const pixel *pix1, intptr_t stride1,
  function ssim_end1 (line 654) | static float ssim_end1( int s1, int s2, int ss, int s12 )
  function ssim_end4 (line 679) | static float ssim_end4( int sum0[5][4], int sum1[5][4], int width )
  function x264_pixel_ssim_wxh (line 690) | float x264_pixel_ssim_wxh( x264_pixel_function_t *pf,
  function pixel_vsad (line 716) | static int pixel_vsad( pixel *src, intptr_t stride, int height )
  function x264_field_vsad (line 725) | int x264_field_vsad( x264_t *h, int mb_x, int mb_y )
  function pixel_asd8 (line 747) | static int pixel_asd8( pixel *pix1, intptr_t stride1, pixel *pix2, intpt...
  function x264_pixel_ads4 (line 759) | static int x264_pixel_ads4( int enc_dc[4], uint16_t *sums, int delta,
  function x264_pixel_ads2 (line 776) | static int x264_pixel_ads2( int enc_dc[2], uint16_t *sums, int delta,
  function x264_pixel_ads1 (line 791) | static int x264_pixel_ads1( int enc_dc[1], uint16_t *sums, int delta,
  function x264_pixel_init (line 809) | void x264_pixel_init( uint32_t cpu, x264_pixel_function_t *pixf )

FILE: common/pixel.h
  type x264_pixel_function_t (line 78) | typedef struct

FILE: common/ppc/dct.c
  function x264_sub4x4_dct_altivec (line 44) | void x264_sub4x4_dct_altivec( int16_t dct[16], uint8_t *pix1, uint8_t *p...
  function x264_sub8x8_dct_altivec (line 66) | void x264_sub8x8_dct_altivec( int16_t dct[4][16], uint8_t *pix1, uint8_t...
  function x264_sub16x16_dct_altivec (line 105) | void x264_sub16x16_dct_altivec( int16_t dct[16][16], uint8_t *pix1, uint...
  function pix_diff (line 117) | static void pix_diff( uint8_t *p1, uint8_t *p2, vec_s16_t *diff, int i )
  function x264_sub8x8_dct_dc_altivec (line 138) | void x264_sub8x8_dct_dc_altivec( int16_t dct[4], uint8_t *pix1, uint8_t ...
  function x264_sub8x8_dct8_altivec (line 228) | void x264_sub8x8_dct8_altivec( int16_t dct[64], uint8_t *pix1, uint8_t *...
  function x264_sub16x16_dct8_altivec (line 273) | void x264_sub16x16_dct8_altivec( int16_t dct[4][64], uint8_t *pix1, uint...
  function x264_add8x8_idct_dc_altivec (line 296) | void x264_add8x8_idct_dc_altivec( uint8_t *p_dst, int16_t dct[4] )
  function x264_add16x16_idct_dc_altivec (line 382) | void x264_add16x16_idct_dc_altivec( uint8_t *p_dst, int16_t dct[16] )
  function x264_add4x4_idct_altivec (line 460) | void x264_add4x4_idct_altivec( uint8_t *dst, int16_t dct[16] )
  function x264_add8x8_idct_altivec (line 492) | void x264_add8x8_idct_altivec( uint8_t *p_dst, int16_t dct[4][16] )
  function x264_add16x16_idct_altivec (line 500) | void x264_add16x16_idct_altivec( uint8_t *p_dst, int16_t dct[16][16] )
  function x264_add8x8_idct8_altivec (line 574) | void x264_add8x8_idct8_altivec( uint8_t *dst, int16_t dct[64] )
  function x264_add16x16_idct8_altivec (line 617) | void x264_add16x16_idct8_altivec( uint8_t *dst, int16_t dct[4][64] )
  function x264_zigzag_scan_4x4_frame_altivec (line 625) | void x264_zigzag_scan_4x4_frame_altivec( int16_t level[16], int16_t dct[...
  function x264_zigzag_scan_4x4_field_altivec (line 643) | void x264_zigzag_scan_4x4_field_altivec( int16_t level[16], int16_t dct[...
  function x264_zigzag_scan_8x8_frame_altivec (line 660) | void x264_zigzag_scan_8x8_frame_altivec( int16_t level[64], int16_t dct[...
  function x264_zigzag_interleave_8x8_cavlc_altivec (line 735) | void x264_zigzag_interleave_8x8_cavlc_altivec( int16_t *dst, int16_t *sr...

FILE: common/ppc/deblock.c
  function write16x4 (line 49) | static inline void write16x4( uint8_t *dst, int dst_stride,
  function vec_u8_t (line 142) | static inline vec_u8_t diff_lt_altivec( register vec_u8_t x, register ve...
  function vec_u8_t (line 147) | static inline vec_u8_t h264_deblock_mask( register vec_u8_t p0, register...
  function vec_u8_t (line 163) | static inline vec_u8_t h264_deblock_q1( register vec_u8_t p0, register v...
  function x264_deblock_v_luma_altivec (line 266) | void x264_deblock_v_luma_altivec( uint8_t *pix, intptr_t stride, int alp...
  function x264_deblock_h_luma_altivec (line 284) | void x264_deblock_h_luma_altivec( uint8_t *pix, intptr_t stride, int alp...

FILE: common/ppc/mc.c
  function pixel_avg2_w4_altivec (line 35) | static inline void pixel_avg2_w4_altivec( uint8_t *dst,  intptr_t i_dst,
  function pixel_avg2_w8_altivec (line 57) | static inline void pixel_avg2_w8_altivec( uint8_t *dst,  intptr_t i_dst,
  function pixel_avg2_w16_altivec (line 77) | static inline void pixel_avg2_w16_altivec( uint8_t *dst,  intptr_t i_dst,
  function pixel_avg2_w20_altivec (line 96) | static inline void pixel_avg2_w20_altivec( uint8_t *dst,  intptr_t i_dst,
  function mc_copy_w16_altivec (line 127) | static void mc_copy_w16_altivec( uint8_t *dst, intptr_t i_dst,
  function mc_copy_w16_aligned_altivec (line 143) | static void mc_copy_w16_aligned_altivec( uint8_t *dst, intptr_t i_dst,
  function x264_plane_copy_swap_core_altivec (line 157) | void x264_plane_copy_swap_core_altivec( uint8_t *dst, intptr_t i_dst,
  function x264_plane_copy_interleave_core_altivec (line 173) | void x264_plane_copy_interleave_core_altivec( uint8_t *dst, intptr_t i_dst,
  function x264_store_interleave_chroma_altivec (line 190) | void x264_store_interleave_chroma_altivec( uint8_t *dst, intptr_t i_dst,
  function x264_plane_copy_deinterleave_altivec (line 203) | void x264_plane_copy_deinterleave_altivec( uint8_t *dstu, intptr_t i_dstu,
  function load_deinterleave_chroma_fenc_altivec (line 226) | static void load_deinterleave_chroma_fenc_altivec( uint8_t *dst, uint8_t...
  function x264_plane_copy_deinterleave_rgb_altivec (line 241) | void x264_plane_copy_deinterleave_rgb_altivec( uint8_t *dsta, intptr_t i...
  function mc_luma_altivec (line 304) | static void mc_luma_altivec( uint8_t *dst,    intptr_t i_dst_stride,
  function mc_chroma_2xh (line 396) | static void mc_chroma_2xh( uint8_t *dstu, uint8_t *dstv, intptr_t i_dst_...
  function mc_chroma_4xh_altivec (line 440) | static void mc_chroma_4xh_altivec( uint8_t *dstu, uint8_t *dstv, intptr_...
  function mc_chroma_8xh_altivec (line 531) | static void mc_chroma_8xh_altivec( uint8_t *dstu, uint8_t *dstv, intptr_...
  function mc_chroma_altivec (line 656) | static void mc_chroma_altivec( uint8_t *dstu, uint8_t *dstv, intptr_t i_...
  function x264_hpel_filter_altivec (line 814) | void x264_hpel_filter_altivec( uint8_t *dsth, uint8_t *dstv, uint8_t *ds...
  function frame_init_lowres_core_altivec (line 898) | static void frame_init_lowres_core_altivec( uint8_t *src0, uint8_t *dst0...
  function mc_weight_w2_altivec (line 1002) | static void mc_weight_w2_altivec( uint8_t *dst, intptr_t i_dst, uint8_t ...
  function mc_weight_w4_altivec (line 1047) | static void mc_weight_w4_altivec( uint8_t *dst, intptr_t i_dst, uint8_t ...
  function mc_weight_w8_altivec (line 1092) | static void mc_weight_w8_altivec( uint8_t *dst, intptr_t i_dst, uint8_t ...
  function mc_weight_w16_altivec (line 1137) | static void mc_weight_w16_altivec( uint8_t *dst, intptr_t i_dst, uint8_t...
  function mc_weight_w20_altivec (line 1188) | static void mc_weight_w20_altivec( uint8_t *dst, intptr_t i_dst, uint8_t...
  function x264_plane_copy_deinterleave_v210_altivec (line 1300) | void x264_plane_copy_deinterleave_v210_altivec( uint16_t *dsty, intptr_t...
  function x264_mc_init_altivec (line 1367) | void x264_mc_init_altivec( x264_mc_functions_t *pf )

FILE: common/ppc/pixel.c
  function ALWAYS_INLINE (line 117) | static ALWAYS_INLINE vec_s32_t add_abs_4( vec_s16_t a, vec_s16_t b,
  function pixel_satd_4x4_altivec (line 137) | static int pixel_satd_4x4_altivec( uint8_t *pix1, intptr_t i_pix1,
  function pixel_satd_4x8_altivec (line 174) | static int pixel_satd_4x8_altivec( uint8_t *pix1, intptr_t i_pix1,
  function ALWAYS_INLINE (line 217) | static ALWAYS_INLINE vec_s32_t add_abs_8( vec_s16_t a, vec_s16_t b,
  function pixel_satd_8x4_altivec (line 250) | static int pixel_satd_8x4_altivec( uint8_t *pix1, intptr_t i_pix1,
  function pixel_satd_8x8_altivec (line 293) | static int pixel_satd_8x8_altivec( uint8_t *pix1, intptr_t i_pix1,
  function pixel_satd_8x16_altivec (line 342) | static int pixel_satd_8x16_altivec( uint8_t *pix1, intptr_t i_pix1,
  function pixel_satd_16x8_altivec (line 412) | static int pixel_satd_16x8_altivec( uint8_t *pix1, intptr_t i_pix1,
  function pixel_satd_16x16_altivec (line 482) | static int pixel_satd_16x16_altivec( uint8_t *pix1, intptr_t i_pix1,
  function pixel_sad_x4_16x16_altivec (line 590) | static void pixel_sad_x4_16x16_altivec( uint8_t *fenc,
  function pixel_sad_x3_16x16_altivec (line 674) | static void pixel_sad_x3_16x16_altivec( uint8_t *fenc, uint8_t *pix0,
  function pixel_sad_x4_16x8_altivec (line 742) | static void pixel_sad_x4_16x8_altivec( uint8_t *fenc, uint8_t *pix0, uin...
  function pixel_sad_x3_16x8_altivec (line 899) | static void pixel_sad_x3_16x8_altivec( uint8_t *fenc, uint8_t *pix0,
  function pixel_ssd_16x16_altivec (line 1015) | static int pixel_ssd_16x16_altivec( uint8_t *pix1, intptr_t i_stride_pix1,
  function pixel_ssd_8x8_altivec (line 1069) | static int pixel_ssd_8x8_altivec( uint8_t *pix1, intptr_t i_stride_pix1,
  function pixel_var_16x16_altivec (line 1108) | static uint64_t pixel_var_16x16_altivec( uint8_t *pix, intptr_t i_stride )
  function pixel_var_8x8_altivec (line 1135) | static uint64_t pixel_var_8x8_altivec( uint8_t *pix, intptr_t i_stride )
  function pixel_sa8d_8x8_core_altivec (line 1233) | static int pixel_sa8d_8x8_core_altivec( uint8_t *pix1, intptr_t i_pix1,
  function pixel_sa8d_8x8_altivec (line 1299) | static int pixel_sa8d_8x8_altivec( uint8_t *pix1, intptr_t i_pix1,
  function pixel_sa8d_16x16_altivec (line 1307) | static int pixel_sa8d_16x16_altivec( uint8_t *pix1, intptr_t i_pix1,
  function pixel_hadamard_ac_altivec (line 1341) | static uint64_t pixel_hadamard_ac_altivec( uint8_t *pix, intptr_t stride...
  function pixel_hadamard_ac_16x16_altivec (line 1427) | static uint64_t pixel_hadamard_ac_16x16_altivec( uint8_t *pix, intptr_t ...
  function pixel_hadamard_ac_16x8_altivec (line 1439) | static uint64_t pixel_hadamard_ac_16x8_altivec( uint8_t *pix, intptr_t s...
  function pixel_hadamard_ac_8x16_altivec (line 1449) | static uint64_t pixel_hadamard_ac_8x16_altivec( uint8_t *pix, intptr_t s...
  function pixel_hadamard_ac_8x8_altivec (line 1457) | static uint64_t pixel_hadamard_ac_8x8_altivec( uint8_t *pix, intptr_t st...
  function ssim_4x4x2_core_altivec (line 1468) | static void ssim_4x4x2_core_altivec( const uint8_t *pix1, intptr_t stride1,

FILE: common/ppc/ppccommon.h
  type vec_u64_u (line 52) | typedef union {
  type vec_s64_u (line 57) | typedef union {
  type vec_u32_u (line 63) | typedef union {
  type vec_s32_u (line 68) | typedef union {
  type vec_u16_u (line 73) | typedef union {
  type vec_s16_u (line 78) | typedef union {
  type vec_u8_u (line 83) | typedef union {
  type vec_s8_u (line 88) | typedef union {

FILE: common/ppc/predict.c
  function predict_8x8c_p_altivec (line 32) | static void predict_8x8c_p_altivec( uint8_t *src )
  function predict_16x16_p_altivec (line 76) | static void predict_16x16_p_altivec( uint8_t *src )
  function predict_16x16_dc_altivec (line 126) | static void predict_16x16_dc_altivec( uint8_t *src )
  function predict_16x16_dc_left_altivec (line 141) | static void predict_16x16_dc_left_altivec( uint8_t *src )
  function predict_16x16_dc_top_altivec (line 153) | static void predict_16x16_dc_top_altivec( uint8_t *src )
  function predict_16x16_dc_128_altivec (line 165) | static void predict_16x16_dc_128_altivec( uint8_t *src )
  function predict_16x16_h_altivec (line 174) | static void predict_16x16_h_altivec( uint8_t *src )
  function predict_16x16_v_altivec (line 237) | static void predict_16x16_v_altivec( uint8_t *src )
  function x264_predict_16x16_init_altivec (line 257) | void x264_predict_16x16_init_altivec( x264_predict_t pf[7] )
  function x264_predict_8x8c_init_altivec (line 270) | void x264_predict_8x8c_init_altivec( x264_predict_t pf[7] )

FILE: common/ppc/quant.c
  function x264_quant_4x4_altivec (line 69) | int x264_quant_4x4_altivec( int16_t dct[16], uint16_t mf[16], uint16_t b...
  function x264_quant_4x4x4_altivec (line 93) | int x264_quant_4x4x4_altivec( dctcoef dcta[4][16], udctcoef mf[16], udct...
  function x264_quant_4x4_dc_altivec (line 325) | int x264_quant_4x4_dc_altivec( int16_t dct[16], int mf, int bias )
  function x264_quant_2x2_dc_altivec (line 372) | int x264_quant_2x2_dc_altivec( int16_t dct[4], int mf, int bias )
  function x264_quant_8x8_altivec (line 396) | int x264_quant_8x8_altivec( int16_t dct[64], uint16_t mf[64], uint16_t b...
  function x264_dequant_4x4_altivec (line 471) | void x264_dequant_4x4_altivec( int16_t dct[16], int dequant_mf[6][16], i...
  function x264_dequant_8x8_altivec (line 509) | void x264_dequant_8x8_altivec( int16_t dct[64], int dequant_mf[6][64], i...

FILE: common/predict.c
  function x264_predict_16x16_dc_c (line 67) | void x264_predict_16x16_dc_c( pixel *src )
  function predict_16x16_dc_left_c (line 80) | static void predict_16x16_dc_left_c( pixel *src )
  function predict_16x16_dc_top_c (line 90) | static void predict_16x16_dc_top_c( pixel *src )
  function predict_16x16_dc_128_c (line 100) | static void predict_16x16_dc_128_c( pixel *src )
  function x264_predict_16x16_h_c (line 104) | void x264_predict_16x16_h_c( pixel *src )
  function x264_predict_16x16_v_c (line 116) | void x264_predict_16x16_v_c( pixel *src )
  function x264_predict_16x16_p_c (line 132) | void x264_predict_16x16_p_c( pixel *src )
  function predict_8x8c_dc_128_c (line 167) | static void predict_8x8c_dc_128_c( pixel *src )
  function predict_8x8c_dc_left_c (line 176) | static void predict_8x8c_dc_left_c( pixel *src )
  function predict_8x8c_dc_top_c (line 202) | static void predict_8x8c_dc_top_c( pixel *src )
  function x264_predict_8x8c_dc_c (line 221) | void x264_predict_8x8c_dc_c( pixel *src )
  function x264_predict_8x8c_h_c (line 260) | void x264_predict_8x8c_h_c( pixel *src )
  function x264_predict_8x8c_v_c (line 270) | void x264_predict_8x8c_v_c( pixel *src )
  function x264_predict_8x8c_p_c (line 282) | void x264_predict_8x8c_p_c( pixel *src )
  function predict_8x16c_dc_128_c (line 314) | static void predict_8x16c_dc_128_c( pixel *src )
  function predict_8x16c_dc_left_c (line 323) | static void predict_8x16c_dc_left_c( pixel *src )
  function predict_8x16c_dc_top_c (line 342) | static void predict_8x16c_dc_top_c( pixel *src )
  function x264_predict_8x16c_dc_c (line 361) | void x264_predict_8x16c_dc_c( pixel *src )
  function x264_predict_8x16c_h_c (line 421) | void x264_predict_8x16c_h_c( pixel *src )
  function x264_predict_8x16c_v_c (line 431) | void x264_predict_8x16c_v_c( pixel *src )
  function x264_predict_8x16c_p_c (line 443) | void x264_predict_8x16c_p_c( pixel *src )
  function predict_4x4_dc_128_c (line 481) | static void predict_4x4_dc_128_c( pixel *src )
  function predict_4x4_dc_left_c (line 485) | static void predict_4x4_dc_left_c( pixel *src )
  function predict_4x4_dc_top_c (line 490) | static void predict_4x4_dc_top_c( pixel *src )
  function x264_predict_4x4_dc_c (line 495) | void x264_predict_4x4_dc_c( pixel *src )
  function x264_predict_4x4_h_c (line 501) | void x264_predict_4x4_h_c( pixel *src )
  function x264_predict_4x4_v_c (line 508) | void x264_predict_4x4_v_c( pixel *src )
  function predict_4x4_ddl_c (line 534) | static void predict_4x4_ddl_c( pixel *src )
  function predict_4x4_ddr_c (line 546) | static void predict_4x4_ddr_c( pixel *src )
  function predict_4x4_vr_c (line 560) | static void predict_4x4_vr_c( pixel *src )
  function predict_4x4_hd_c (line 577) | static void predict_4x4_hd_c( pixel *src )
  function predict_4x4_vl_c (line 594) | static void predict_4x4_vl_c( pixel *src )
  function predict_4x4_hu_c (line 610) | static void predict_4x4_hu_c( pixel *src )
  function predict_8x8_filter_c (line 632) | static void predict_8x8_filter_c( pixel *src, pixel edge[36], int i_neig...
  function predict_8x8_dc_128_c (line 700) | static void predict_8x8_dc_128_c( pixel *src, pixel edge[36] )
  function predict_8x8_dc_left_c (line 704) | static void predict_8x8_dc_left_c( pixel *src, pixel edge[36] )
  function predict_8x8_dc_top_c (line 710) | static void predict_8x8_dc_top_c( pixel *src, pixel edge[36] )
  function x264_predict_8x8_dc_c (line 716) | void x264_predict_8x8_dc_c( pixel *src, pixel edge[36] )
  function x264_predict_8x8_h_c (line 723) | void x264_predict_8x8_h_c( pixel *src, pixel edge[36] )
  function x264_predict_8x8_v_c (line 731) | void x264_predict_8x8_v_c( pixel *src, pixel edge[36] )
  function predict_8x8_ddl_c (line 741) | static void predict_8x8_ddl_c( pixel *src, pixel edge[36] )
  function predict_8x8_ddr_c (line 761) | static void predict_8x8_ddr_c( pixel *src, pixel edge[36] )
  function predict_8x8_vr_c (line 783) | static void predict_8x8_vr_c( pixel *src, pixel edge[36] )
  function predict_8x8_hd_c (line 811) | static void predict_8x8_hd_c( pixel *src, pixel edge[36] )
  function predict_8x8_vl_c (line 838) | static void predict_8x8_vl_c( pixel *src, pixel edge[36] )
  function predict_8x8_hu_c (line 865) | static void predict_8x8_hu_c( pixel *src, pixel edge[36] )
  function x264_predict_16x16_init (line 889) | void x264_predict_16x16_init( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x8c_init (line 936) | void x264_predict_8x8c_init( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x16c_init (line 977) | void x264_predict_8x16c_init( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x8_init (line 1000) | void x264_predict_8x8_init( uint32_t cpu, x264_predict8x8_t pf[12], x264...
  function x264_predict_4x4_init (line 1042) | void x264_predict_4x4_init( uint32_t cpu, x264_predict_t pf[12] )

FILE: common/predict.h
  type intra_chroma_pred_e (line 34) | enum intra_chroma_pred_e
  type intra16x16_pred_e (line 51) | enum intra16x16_pred_e
  type intra4x4_pred_e (line 68) | enum intra4x4_pred_e
  type intra8x8_pred_e (line 95) | enum intra8x8_pred_e

FILE: common/quant.c
  function quant_8x8 (line 59) | static int quant_8x8( dctcoef dct[64], udctcoef mf[64], udctcoef bias[64] )
  function quant_4x4 (line 67) | static int quant_4x4( dctcoef dct[16], udctcoef mf[16], udctcoef bias[16] )
  function quant_4x4x4 (line 75) | static int quant_4x4x4( dctcoef dct[4][16], udctcoef mf[16], udctcoef bi...
  function quant_4x4_dc (line 88) | static int quant_4x4_dc( dctcoef dct[16], int mf, int bias )
  function quant_2x2_dc (line 96) | static int quant_2x2_dc( dctcoef dct[4], int mf, int bias )
  function dequant_4x4 (line 112) | static void dequant_4x4( dctcoef dct[16], int dequant_mf[6][16], int i_qp )
  function dequant_8x8 (line 130) | static void dequant_8x8( dctcoef dct[64], int dequant_mf[6][64], int i_qp )
  function dequant_4x4_dc (line 148) | static void dequant_4x4_dc( dctcoef dct[16], int dequant_mf[6][16], int ...
  function idct_dequant_2x4_dc (line 185) | static void idct_dequant_2x4_dc( dctcoef dct[8], dctcoef dct4x4[8][16], ...
  function idct_dequant_2x4_dconly (line 199) | static void idct_dequant_2x4_dconly( dctcoef dct[8], int dequant_mf[6][1...
  function ALWAYS_INLINE (line 213) | static ALWAYS_INLINE void optimize_chroma_idct_dequant_2x4( dctcoef out[...
  function ALWAYS_INLINE (line 227) | static ALWAYS_INLINE void optimize_chroma_idct_dequant_2x2( dctcoef out[...
  function ALWAYS_INLINE (line 239) | static ALWAYS_INLINE int optimize_chroma_round( dctcoef *ref, dctcoef *d...
  function ALWAYS_INLINE (line 254) | static ALWAYS_INLINE int optimize_chroma_dc_internal( dctcoef *dct, int ...
  function optimize_chroma_2x2_dc (line 294) | static int optimize_chroma_2x2_dc( dctcoef dct[4], int dequant_mf )
  function optimize_chroma_2x4_dc (line 299) | static int optimize_chroma_2x4_dc( dctcoef dct[8], int dequant_mf )
  function denoise_dct (line 304) | static void denoise_dct( dctcoef *dct, uint32_t *sum, udctcoef *offset, ...
  function ALWAYS_INLINE (line 326) | static ALWAYS_INLINE int decimate_score_internal( dctcoef *dct, int i_max )
  function decimate_score15 (line 353) | static int decimate_score15( dctcoef *dct )
  function decimate_score16 (line 357) | static int decimate_score16( dctcoef *dct )
  function decimate_score64 (line 361) | static int decimate_score64( dctcoef *dct )
  function x264_quant_init (line 414) | void x264_quant_init( x264_t *h, uint32_t cpu, x264_quant_function_t *pf )

FILE: common/quant.h
  type x264_quant_function_t (line 30) | typedef struct

FILE: common/rectangle.h
  function ALWAYS_INLINE (line 28) | static ALWAYS_INLINE void x264_macroblock_cache_rect( void *dst, int w, ...
  function ALWAYS_INLINE (line 129) | static ALWAYS_INLINE void x264_macroblock_cache_mv( x264_t *h, int x, in...
  function ALWAYS_INLINE (line 137) | static ALWAYS_INLINE void x264_macroblock_cache_mvd( x264_t *h, int x, i...
  function ALWAYS_INLINE (line 145) | static ALWAYS_INLINE void x264_macroblock_cache_ref( x264_t *h, int x, i...
  function ALWAYS_INLINE (line 153) | static ALWAYS_INLINE void x264_macroblock_cache_skip( x264_t *h, int x, ...
  function ALWAYS_INLINE (line 157) | static ALWAYS_INLINE void x264_macroblock_cache_intra8x8_pred( x264_t *h...

FILE: common/set.c
  function x264_cqm_init (line 73) | int x264_cqm_init( x264_t *h )
  function x264_cqm_delete (line 300) | void x264_cqm_delete( x264_t *h )
  function cqm_parse_jmlist (line 307) | static int cqm_parse_jmlist( x264_t *h, const char *buf, const char *name,
  function x264_cqm_parse_file (line 351) | int x264_cqm_parse_file( x264_t *h, const char *filename )

FILE: common/set.h
  type cqm4_e (line 30) | enum cqm4_e
  type cqm8_e (line 37) | enum cqm8_e
  type x264_sps_t (line 45) | typedef struct
  type x264_pps_t (line 150) | typedef struct

FILE: common/tables.h
  type vlc_t (line 30) | typedef struct

FILE: common/threadpool.c
  type x264_threadpool_job_t (line 28) | typedef struct
  type x264_threadpool_t (line 35) | struct x264_threadpool_t
  function REALIGN_STACK (line 48) | REALIGN_STACK static void *threadpool_thread( x264_threadpool_t *pool )
  function x264_threadpool_init (line 70) | int x264_threadpool_init( x264_threadpool_t **p_pool, int threads )
  function x264_threadpool_run (line 106) | void x264_threadpool_run( x264_threadpool_t *pool, void *(*func)(void *)...
  function threadpool_list_delete (line 135) | static void threadpool_list_delete( x264_sync_frame_list_t *slist )
  function x264_threadpool_delete (line 145) | void x264_threadpool_delete( x264_threadpool_t *pool )

FILE: common/threadpool.h
  type x264_threadpool_t (line 29) | typedef struct x264_threadpool_t x264_threadpool_t;

FILE: common/vlc.c
  function x264_cavlc_init (line 33) | void x264_cavlc_init( x264_t *h )

FILE: common/win32thread.c
  function win32thread_worker (line 54) | static unsigned __stdcall win32thread_worker( void *arg )
  function x264_pthread_create (line 61) | int x264_pthread_create( x264_pthread_t *thread, const x264_pthread_attr...
  function x264_pthread_join (line 72) | int x264_pthread_join( x264_pthread_t thread, void **value_ptr )
  function x264_pthread_mutex_init (line 83) | int x264_pthread_mutex_init( x264_pthread_mutex_t *mutex, const x264_pth...
  function x264_pthread_mutex_destroy (line 88) | int x264_pthread_mutex_destroy( x264_pthread_mutex_t *mutex )
  function x264_pthread_mutex_lock (line 94) | int x264_pthread_mutex_lock( x264_pthread_mutex_t *mutex )
  function x264_pthread_mutex_unlock (line 111) | int x264_pthread_mutex_unlock( x264_pthread_mutex_t *mutex )
  function x264_win32_threading_destroy (line 117) | void x264_win32_threading_destroy( void )
  function x264_pthread_cond_init (line 124) | int x264_pthread_cond_init( x264_pthread_cond_t *cond, const x264_pthrea...
  function x264_pthread_cond_destroy (line 130) | int x264_pthread_cond_destroy( x264_pthread_cond_t *cond )
  function x264_pthread_cond_broadcast (line 135) | int x264_pthread_cond_broadcast( x264_pthread_cond_t *cond )
  function x264_pthread_cond_signal (line 141) | int x264_pthread_cond_signal( x264_pthread_cond_t *cond )
  function x264_pthread_cond_wait (line 147) | int x264_pthread_cond_wait( x264_pthread_cond_t *cond, x264_pthread_mute...
  function x264_win32_threading_init (line 152) | int x264_win32_threading_init( void )
  function x264_pthread_num_processors_np (line 157) | int x264_pthread_num_processors_np( void )
  type x264_win32_cond_t (line 176) | typedef struct
  function x264_pthread_cond_init (line 186) | int x264_pthread_cond_init( x264_pthread_cond_t *cond, const x264_pthrea...
  function x264_pthread_cond_destroy (line 215) | int x264_pthread_cond_destroy( x264_pthread_cond_t *cond )
  function x264_pthread_cond_broadcast (line 232) | int x264_pthread_cond_broadcast( x264_pthread_cond_t *cond )
  function x264_pthread_cond_signal (line 264) | int x264_pthread_cond_signal( x264_pthread_cond_t *cond )
  function x264_pthread_cond_wait (line 289) | int x264_pthread_cond_wait( x264_pthread_cond_t *cond, x264_pthread_mute...
  function x264_win32_threading_init (line 319) | int x264_win32_threading_init( void )
  function x264_pthread_num_processors_np (line 334) | int x264_pthread_num_processors_np( void )

FILE: common/win32thread.h
  type x264_pthread_t (line 33) | typedef struct
  type CRITICAL_SECTION (line 44) | typedef CRITICAL_SECTION x264_pthread_mutex_t;
  type CONDITION_VARIABLE (line 49) | typedef CONDITION_VARIABLE x264_pthread_cond_t;
  type x264_pthread_cond_t (line 51) | typedef struct

FILE: common/x86/deblock.h
  function ALWAYS_INLINE (line 133) | static ALWAYS_INLINE void x264_deblock_v_luma_mmx2( uint8_t *pix, intptr...
  function ALWAYS_INLINE (line 138) | static ALWAYS_INLINE void x264_deblock_v_luma_intra_mmx2( uint8_t *pix, ...

FILE: common/x86/mc-c.c
  function weight_cache_mmx2 (line 493) | static void weight_cache_mmx2( x264_t *h, x264_weight_t *w )
  function weight_cache_mmx2 (line 525) | static void weight_cache_mmx2( x264_t *h, x264_weight_t *w )
  function weight_cache_ssse3 (line 548) | static void weight_cache_ssse3( x264_t *h, x264_weight_t *w )
  function mbtree_propagate_list_avx512 (line 786) | static void mbtree_propagate_list_avx512( x264_t *h, uint16_t *ref_costs...
  function x264_mc_init_mmx (line 796) | void x264_mc_init_mmx( uint32_t cpu, x264_mc_functions_t *pf )

FILE: common/x86/predict-c.c
  function predict_8x8c_dc_left (line 295) | static void predict_8x8c_dc_left( uint8_t *src )
  function x264_predict_16x16_init_mmx (line 325) | void x264_predict_16x16_init_mmx( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x8c_init_mmx (line 384) | void x264_predict_8x8c_init_mmx( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x16c_init_mmx (line 442) | void x264_predict_8x16c_init_mmx( uint32_t cpu, x264_predict_t pf[7] )
  function x264_predict_8x8_init_mmx (line 493) | void x264_predict_8x8_init_mmx( uint32_t cpu, x264_predict8x8_t pf[12], ...
  function x264_predict_4x4_init_mmx (line 577) | void x264_predict_4x4_init_mmx( uint32_t cpu, x264_predict_t pf[12] )

FILE: common/x86/util.h
  type x264_union128_sse_t (line 36) | typedef union { __m128 i; uint64_t q[2]; uint32_t d[4]; uint16_t w[8]; u...
  type v4si (line 38) | typedef uint32_t v4si __attribute__((vector_size (16)));
  function ALWAYS_INLINE (line 45) | static ALWAYS_INLINE void x264_median_mv_mmx2( int16_t *dst, int16_t *a,...
  function ALWAYS_INLINE (line 64) | static ALWAYS_INLINE int x264_predictor_difference_mmx2( int16_t (*mvc)[...
  function ALWAYS_INLINE (line 101) | static ALWAYS_INLINE uint16_t x264_cabac_mvd_sum_mmx2(uint8_t *mvdleft, ...
  function ALWAYS_INLINE (line 128) | static ALWAYS_INLINE int x264_predictor_clip_mmx2( int16_t (*dst)[2], in...
  function ALWAYS_INLINE (line 191) | static ALWAYS_INLINE int x264_predictor_roundclip_mmx2( int16_t (*dst)[2...

FILE: encoder/analyse.c
  type x264_mb_analysis_list_t (line 35) | typedef struct
  type x264_mb_analysis_t (line 56) | typedef struct
  function init_costs (line 143) | static int init_costs( x264_t *h, float *logs, int qp )
  function x264_analyse_init_costs (line 179) | int x264_analyse_init_costs( x264_t *h )
  function x264_analyse_free_costs (line 204) | void x264_analyse_free_costs( x264_t *h )
  function x264_analyse_weight_frame (line 219) | void x264_analyse_weight_frame( x264_t *h, int end )
  function mb_analyse_load_costs (line 248) | static void mb_analyse_load_costs( x264_t *h, x264_mb_analysis_t *a )
  function mb_analyse_init_qp (line 255) | static void mb_analyse_init_qp( x264_t *h, x264_mb_analysis_t *a, int qp )
  function mb_analyse_init (line 294) | static void mb_analyse_init( x264_t *h, x264_mb_analysis_t *a, int qp )
  function ALWAYS_INLINE (line 530) | static ALWAYS_INLINE const int8_t *predict_16x16_mode_available( int i_n...
  function ALWAYS_INLINE (line 537) | static ALWAYS_INLINE const int8_t *predict_chroma_mode_available( int i_...
  function ALWAYS_INLINE (line 544) | static ALWAYS_INLINE const int8_t *predict_8x8_mode_available( int force...
  function ALWAYS_INLINE (line 552) | static ALWAYS_INLINE const int8_t *predict_4x4_mode_available( int force...
  function psy_trellis_init (line 561) | static inline void psy_trellis_init( x264_t *h, int do_both_dct )
  function mb_init_fenc_cache (line 570) | static inline void mb_init_fenc_cache( x264_t *h, int b_satd )
  function mb_analyse_intra_chroma (line 586) | static void mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a )
  function mb_analyse_intra (line 668) | static void mb_analyse_intra( x264_t *h, x264_mb_analysis_t *a, int i_sa...
  function intra_rd (line 982) | static void intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
  function intra_rd_refine (line 1016) | static void intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
  function mb_analyse_inter_p16x16 (line 1255) | static void mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a )
  function mb_analyse_inter_p8x8_mixed_ref (line 1334) | static void mb_analyse_inter_p8x8_mixed_ref( x264_t *h, x264_mb_analysis...
  function mb_analyse_inter_p8x8 (line 1425) | static void mb_analyse_inter_p8x8( x264_t *h, x264_mb_analysis_t *a )
  function mb_analyse_inter_p16x8 (line 1480) | static void mb_analyse_inter_p16x8( x264_t *h, x264_mb_analysis_t *a, in...
  function mb_analyse_inter_p8x16 (line 1546) | static void mb_analyse_inter_p8x16( x264_t *h, x264_mb_analysis_t *a, in...
  function ALWAYS_INLINE (line 1611) | static ALWAYS_INLINE int mb_analyse_inter_p4x4_chroma_internal( x264_t *...
  function mb_analyse_inter_p4x4_chroma (line 1675) | static int mb_analyse_inter_p4x4_chroma( x264_t *h, x264_mb_analysis_t *...
  function mb_analyse_inter_p4x4 (line 1685) | static void mb_analyse_inter_p4x4( x264_t *h, x264_mb_analysis_t *a, int...
  function mb_analyse_inter_p8x4 (line 1724) | static void mb_analyse_inter_p8x4( x264_t *h, x264_mb_analysis_t *a, int...
  function mb_analyse_inter_p4x8 (line 1760) | static void mb_analyse_inter_p4x8( x264_t *h, x264_mb_analysis_t *a, int...
  function ALWAYS_INLINE (line 1796) | static ALWAYS_INLINE int analyse_bi_chroma( x264_t *h, x264_mb_analysis_...
  function mb_analyse_inter_direct (line 1844) | static void mb_analyse_inter_direct( x264_t *h, x264_mb_analysis_t *a )
  function mb_analyse_inter_b16x16 (line 1890) | static void mb_analyse_inter_b16x16( x264_t *h, x264_mb_analysis_t *a )
  function mb_cache_mv_p8x8 (line 2076) | static inline void mb_cache_mv_p8x8( x264_t *h, x264_mb_analysis_t *a, i...
  function mb_load_mv_direct8x8 (line 2106) | static void mb_load_mv_direct8x8( x264_t *h, int idx )
  function mb_cache_mv_b8x8 (line 2142) | static inline void mb_cache_mv_b8x8( x264_t *h, x264_mb_analysis_t *a, i...
  function mb_cache_mv_b16x8 (line 2161) | static inline void mb_cache_mv_b16x8( x264_t *h, x264_mb_analysis_t *a, ...
  function mb_cache_mv_b8x16 (line 2165) | static inline void mb_cache_mv_b8x16( x264_t *h, x264_mb_analysis_t *a, ...
  function mb_analyse_inter_b8x8_mixed_ref (line 2171) | static void mb_analyse_inter_b8x8_mixed_ref( x264_t *h, x264_mb_analysis...
  function mb_analyse_inter_b8x8 (line 2283) | static void mb_analyse_inter_b8x8( x264_t *h, x264_mb_analysis_t *a )
  function mb_analyse_inter_b16x8 (line 2360) | static void mb_analyse_inter_b16x8( x264_t *h, x264_mb_analysis_t *a, in...
  function mb_analyse_inter_b8x16 (line 2454) | static void mb_analyse_inter_b8x16( x264_t *h, x264_mb_analysis_t *a, in...
  function mb_analyse_p_rd (line 2547) | static void mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
  function mb_analyse_b_rd (line 2622) | static void mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_sat...
  function refine_bidir (line 2692) | static void refine_bidir( x264_t *h, x264_mb_analysis_t *a )
  function mb_analyse_transform (line 2735) | static inline void mb_analyse_transform( x264_t *h )
  function mb_analyse_transform_rd (line 2773) | static inline void mb_analyse_transform_rd( x264_t *h, x264_mb_analysis_...
  function mb_analyse_qp_rd (line 2810) | static inline void mb_analyse_qp_rd( x264_t *h, x264_mb_analysis_t *a )
  function x264_macroblock_analyse (line 2918) | void x264_macroblock_analyse( x264_t *h )
  function analyse_update_cache (line 3734) | static void analyse_update_cache( x264_t *h, x264_mb_analysis_t *a  )

FILE: encoder/api.c
  type x264_api_t (line 58) | typedef struct x264_api_t
  function REALIGN_STACK (line 76) | REALIGN_STACK x264_t *x264_encoder_open( x264_param_t *param )
  function REALIGN_STACK (line 130) | REALIGN_STACK void x264_encoder_close( x264_t *h )
  function REALIGN_STACK (line 138) | REALIGN_STACK void x264_nal_encode( x264_t *h, uint8_t *dst, x264_nal_t ...
  function REALIGN_STACK (line 145) | REALIGN_STACK int x264_encoder_reconfig( x264_t *h, x264_param_t *param)
  function REALIGN_STACK (line 152) | REALIGN_STACK void x264_encoder_parameters( x264_t *h, x264_param_t *par...
  function REALIGN_STACK (line 159) | REALIGN_STACK int x264_encoder_headers( x264_t *h, x264_nal_t **pp_nal, ...
  function REALIGN_STACK (line 166) | REALIGN_STACK int x264_encoder_encode( x264_t *h, x264_nal_t **pp_nal, i...
  function REALIGN_STACK (line 173) | REALIGN_STACK int x264_encoder_delayed_frames( x264_t *h )
  function REALIGN_STACK (line 180) | REALIGN_STACK int x264_encoder_maximum_delayed_frames( x264_t *h )
  function REALIGN_STACK (line 187) | REALIGN_STACK void x264_encoder_intra_refresh( x264_t *h )
  function REALIGN_STACK (line 194) | REALIGN_STACK int x264_encoder_invalidate_reference( x264_t *h, int64_t ...

FILE: encoder/cabac.c
  function cabac_mb_type_intra (line 35) | static inline void cabac_mb_type_intra( x264_t *h, x264_cabac_t *cb, int...
  function cabac_field_decoding_flag (line 70) | static void cabac_field_decoding_flag( x264_t *h, x264_cabac_t *cb )
  function cabac_intra4x4_pred_mode (line 83) | static void cabac_intra4x4_pred_mode( x264_cabac_t *cb, int i_pred, int ...
  function cabac_intra_chroma_pred_mode (line 98) | static void cabac_intra_chroma_pred_mode( x264_t *h, x264_cabac_t *cb )
  function cabac_cbp_luma (line 118) | static void cabac_cbp_luma( x264_t *h, x264_cabac_t *cb )
  function cabac_cbp_chroma (line 129) | static void cabac_cbp_chroma( x264_t *h, x264_cabac_t *cb )
  function cabac_qp_delta (line 150) | static void cabac_qp_delta( x264_t *h, x264_cabac_t *cb )
  function x264_cabac_mb_skip (line 189) | void x264_cabac_mb_skip( x264_t *h, int b_skip )
  function cabac_subpartition_p (line 198) | static inline void cabac_subpartition_p( x264_cabac_t *cb, int i_sub )
  function ALWAYS_INLINE (line 215) | static ALWAYS_INLINE void cabac_subpartition_b( x264_cabac_t *cb, int i_...
  function ALWAYS_INLINE (line 235) | static ALWAYS_INLINE void cabac_transform_size( x264_t *h, x264_cabac_t ...
  function ALWAYS_INLINE (line 241) | static ALWAYS_INLINE void cabac_ref_internal( x264_t *h, x264_cabac_t *c...
  function NOINLINE (line 261) | static NOINLINE void cabac_ref_p( x264_t *h, x264_cabac_t *cb, int idx )
  function NOINLINE (line 265) | static NOINLINE void cabac_ref_b( x264_t *h, x264_cabac_t *cb, int i_lis...
  function ALWAYS_INLINE (line 270) | static ALWAYS_INLINE int cabac_mvd_cpn( x264_t *h, x264_cabac_t *cb, int...
  function NOINLINE (line 329) | static NOINLINE uint16_t cabac_mvd( x264_t *h, x264_cabac_t *cb, int i_l...
  function cabac_8x8_mvd (line 355) | static inline void cabac_8x8_mvd( x264_t *h, x264_cabac_t *cb, int i )
  function ALWAYS_INLINE (line 381) | static ALWAYS_INLINE void cabac_mb_header_i( x264_t *h, x264_cabac_t *cb...
  function ALWAYS_INLINE (line 435) | static ALWAYS_INLINE void cabac_mb_header_p( x264_t *h, x264_cabac_t *cb...
  function ALWAYS_INLINE (line 499) | static ALWAYS_INLINE void cabac_mb_header_b( x264_t *h, x264_cabac_t *cb...
  function ALWAYS_INLINE (line 612) | static ALWAYS_INLINE int cabac_cbf_ctxidxinc( x264_t *h, int i_cat, int ...
  function ALWAYS_INLINE (line 665) | static ALWAYS_INLINE void cabac_block_residual_internal( x264_t *h, x264...
  function x264_cabac_block_residual_c (line 750) | void x264_cabac_block_residual_c( x264_t *h, x264_cabac_t *cb, int ctx_b...
  function ALWAYS_INLINE (line 755) | static ALWAYS_INLINE void cabac_block_residual( x264_t *h, x264_cabac_t ...
  function cabac_block_residual_422_dc (line 763) | static void cabac_block_residual_422_dc( x264_t *h, x264_cabac_t *cb, in...
  function ALWAYS_INLINE (line 775) | static ALWAYS_INLINE void cabac_block_residual_internal( x264_t *h, x264...
  function x264_cabac_block_residual_8x8_rd_c (line 860) | void x264_cabac_block_residual_8x8_rd_c( x264_t *h, x264_cabac_t *cb, in...
  function x264_cabac_block_residual_rd_c (line 864) | void x264_cabac_block_residual_rd_c( x264_t *h, x264_cabac_t *cb, int ct...
  function ALWAYS_INLINE (line 869) | static ALWAYS_INLINE void cabac_block_residual_8x8( x264_t *h, x264_caba...
  function ALWAYS_INLINE (line 877) | static ALWAYS_INLINE void cabac_block_residual( x264_t *h, x264_cabac_t ...
  function cabac_block_residual_422_dc (line 886) | static void cabac_block_residual_422_dc( x264_t *h, x264_cabac_t *cb, in...
  function ALWAYS_INLINE (line 917) | static ALWAYS_INLINE void macroblock_write_cabac_internal( x264_t *h, x2...
  function x264_macroblock_write_cabac (line 1088) | void x264_macroblock_write_cabac( x264_t *h, x264_cabac_t *cb )
  function partition_size_cabac (line 1106) | static void partition_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, i...
  function subpartition_size_cabac (line 1171) | static void subpartition_size_cabac( x264_t *h, x264_cabac_t *cb, int i4...
  function partition_i8x8_size_cabac (line 1187) | static void partition_i8x8_size_cabac( x264_t *h, x264_cabac_t *cb, int ...
  function partition_i4x4_size_cabac (line 1203) | static void partition_i4x4_size_cabac( x264_t *h, x264_cabac_t *cb, int ...
  function chroma_size_cabac (line 1213) | static void chroma_size_cabac( x264_t *h, x264_cabac_t *cb )

FILE: encoder/cavlc.c
  function cavlc_block_residual_escape (line 70) | static inline int cavlc_block_residual_escape( x264_t *h, int i_suffix_l...
  function cavlc_block_residual_internal (line 121) | static int cavlc_block_residual_internal( x264_t *h, int ctx_block_cat, ...
  function cavlc_qp_delta (line 211) | static void cavlc_qp_delta( x264_t *h )
  function cavlc_mvd (line 241) | static void cavlc_mvd( x264_t *h, int i_list, int idx, int width )
  function cavlc_8x8_mvd (line 250) | static inline void cavlc_8x8_mvd( x264_t *h, int i )
  function ALWAYS_INLINE (line 274) | static ALWAYS_INLINE void cavlc_macroblock_luma_residual( x264_t *h, int...
  function ALWAYS_INLINE (line 293) | static ALWAYS_INLINE void cavlc_partition_luma_residual( x264_t *h, int ...
  function cavlc_mb_header_i (line 305) | static void cavlc_mb_header_i( x264_t *h, int i_mb_type, int i_mb_i_offs...
  function ALWAYS_INLINE (line 337) | static ALWAYS_INLINE void cavlc_mb_header_p( x264_t *h, int i_mb_type, i...
  function ALWAYS_INLINE (line 411) | static ALWAYS_INLINE void cavlc_mb_header_b( x264_t *h, int i_mb_type, i...
  function x264_macroblock_write_cavlc (line 487) | void x264_macroblock_write_cavlc( x264_t *h )
  function partition_size_cavlc (line 605) | static int partition_size_cavlc( x264_t *h, int i8, int i_pixel )
  function subpartition_size_cavlc (line 661) | static int subpartition_size_cavlc( x264_t *h, int i4, int i_pixel )
  function cavlc_intra4x4_pred_size (line 677) | static int cavlc_intra4x4_pred_size( x264_t *h, int i4, int i_mode )
  function partition_i8x8_size_cavlc (line 685) | static int partition_i8x8_size_cavlc( x264_t *h, int i8, int i_mode )
  function partition_i4x4_size_cavlc (line 695) | static int partition_i4x4_size_cavlc( x264_t *h, int i4, int i_mode )
  function chroma_size_cavlc (line 704) | static int chroma_size_cavlc( x264_t *h )

FILE: encoder/encoder.c
  function calc_psnr (line 56) | static double calc_psnr( double sqe, double size )
  function calc_ssim_db (line 65) | static double calc_ssim_db( double ssim )
  function threadpool_wait_all (line 74) | static int threadpool_wait_all( x264_t *h )
  function frame_dump (line 86) | static void frame_dump( x264_t *h )
  function slice_header_init (line 122) | static void slice_header_init( x264_t *h, x264_slice_header_t *sh,
  function slice_header_write (line 213) | static void slice_header_write( bs_t *s, x264_slice_header_t *sh, int i_...
  function bitstream_check_buffer_internal (line 368) | static int bitstream_check_buffer_internal( x264_t *h, int size, int b_c...
  function bitstream_check_buffer (line 403) | static int bitstream_check_buffer( x264_t *h )
  function bitstream_check_buffer_filler (line 409) | static int bitstream_check_buffer_filler( x264_t *h, int filler )
  function validate_parameters (line 423) | static int validate_parameters( x264_t *h, int b_open )
  function mbcmp_init (line 1409) | static void mbcmp_init( x264_t *h )
  function chroma_dsp_init (line 1429) | static void chroma_dsp_init( x264_t *h )
  function set_aspect_ratio (line 1468) | static void set_aspect_ratio( x264_t *h, x264_param_t *param, int initial )
  function x264_t (line 1507) | x264_t *x264_encoder_open( x264_param_t *param, void *api )
  function encoder_try_reconfig (line 1862) | static int encoder_try_reconfig( x264_t *h, x264_param_t *param, int *rc...
  function x264_encoder_reconfig_apply (line 1932) | int x264_encoder_reconfig_apply( x264_t *h, x264_param_t *param )
  function x264_encoder_reconfig (line 1955) | int x264_encoder_reconfig( x264_t *h, x264_param_t *param )
  function x264_encoder_parameters (line 1974) | void x264_encoder_parameters( x264_t *h, x264_param_t *param )
  function nal_start (line 1981) | static void nal_start( x264_t *h, int i_type, int i_ref_idc )
  function nal_check_buffer (line 1995) | static int nal_check_buffer( x264_t *h )
  function nal_end (line 2010) | static int nal_end( x264_t *h )
  function check_encapsulated_buffer (line 2025) | static int check_encapsulated_buffer( x264_t *h, x264_t *h0, int start,
  function encoder_encapsulate_nals (line 2051) | static int encoder_encapsulate_nals( x264_t *h, int start )
  function x264_encoder_headers (line 2096) | int x264_encoder_headers( x264_t *h, x264_nal_t **pp_nal, int *pi_nal )
  function reference_check_reorder (line 2138) | static inline void reference_check_reorder( x264_t *h )
  function weighted_reference_duplicate (line 2163) | static int weighted_reference_duplicate( x264_t *h, int i_ref, const x26...
  function weighted_pred_init (line 2202) | static void weighted_pred_init( x264_t *h )
  function reference_distance (line 2286) | static inline int reference_distance( x264_t *h, x264_frame_t *frame )
  function reference_build_list (line 2295) | static inline void reference_build_list( x264_t *h, int i_poc )
  function fdec_filter_row (line 2413) | static void fdec_filter_row( x264_t *h, int mb_y, int pass )
  function reference_update (line 2533) | static inline int reference_update( x264_t *h )
  function reference_reset (line 2563) | static inline void reference_reset( x264_t *h )
  function reference_hierarchy_reset (line 2571) | static inline void reference_hierarchy_reset( x264_t *h )
  function slice_init (line 2608) | static inline void slice_init( x264_t *h, int i_nal_type, int i_global_qp )
  type x264_bs_bak_t (line 2677) | typedef struct
  function ALWAYS_INLINE (line 2689) | static ALWAYS_INLINE void bitstream_backup( x264_t *h, x264_bs_bak_t *ba...
  function ALWAYS_INLINE (line 2723) | static ALWAYS_INLINE void bitstream_restore( x264_t *h, x264_bs_bak_t *b...
  function slice_write (line 2752) | static intptr_t slice_write( x264_t *h )
  function thread_sync_context (line 3132) | static void thread_sync_context( x264_t *dst, x264_t *src )
  function thread_sync_stat (line 3153) | static void thread_sync_stat( x264_t *dst, x264_t *src )
  function threaded_slices_write (line 3219) | static int threaded_slices_write( x264_t *h )
  function x264_encoder_intra_refresh (line 3280) | void x264_encoder_intra_refresh( x264_t *h )
  function x264_encoder_invalidate_reference (line 3286) | int x264_encoder_invalidate_reference( x264_t *h, int64_t pts )
  function x264_encoder_encode (line 3323) | int     x264_encoder_encode( x264_t *h,
  function encoder_frame_end (line 3904) | static int encoder_frame_end( x264_t *h, x264_t *thread_current,
  function print_intra (line 4182) | static void print_intra( int64_t *i_mb_count, double i_count, int b_prin...
  function x264_encoder_close (line 4196) | void    x264_encoder_close  ( x264_t *h )
  function x264_encoder_delayed_frames (line 4579) | int x264_encoder_delayed_frames( x264_t *h )
  function x264_encoder_maximum_delayed_frames (line 4600) | int x264_encoder_maximum_delayed_frames( x264_t *h )

FILE: encoder/lookahead.c
  function lookahead_shift (line 42) | static void lookahead_shift( x264_sync_frame_list_t *dst, x264_sync_fram...
  function lookahead_update_last_nonb (line 59) | static void lookahead_update_last_nonb( x264_t *h, x264_frame_t *new_nonb )
  function lookahead_slicetype_decide (line 68) | static void lookahead_slicetype_decide( x264_t *h )
  function REALIGN_STACK (line 90) | REALIGN_STACK static void *lookahead_thread( x264_t *h )
  function x264_lookahead_init (line 132) | int x264_lookahead_init( x264_t *h, int i_slicetype_length )
  function x264_lookahead_delete (line 171) | void x264_lookahead_delete( x264_t *h )
  function x264_lookahead_put_frame (line 192) | void x264_lookahead_put_frame( x264_t *h, x264_frame_t *frame )
  function x264_lookahead_is_empty (line 200) | int x264_lookahead_is_empty( x264_t *h )
  function lookahead_encoder_shift (line 210) | static void lookahead_encoder_shift( x264_t *h )
  function x264_lookahead_get_frames (line 223) | void x264_lookahead_get_frames( x264_t *h )

FILE: encoder/macroblock.c
  function zigzag_scan_2x2_dc (line 35) | static inline void zigzag_scan_2x2_dc( dctcoef level[4], dctcoef dct[4] )
  function zigzag_scan_2x4_dc (line 44) | static inline void zigzag_scan_2x4_dc( dctcoef level[8], dctcoef dct[8] )
  function idct_dequant_2x2_dc (line 63) | static inline void idct_dequant_2x2_dc( dctcoef dct[4], dctcoef dct4x4[4...
  function idct_dequant_2x2_dconly (line 72) | static inline void idct_dequant_2x2_dconly( dctcoef dct[4], int dequant_...
  function dct2x2dc (line 82) | static inline void dct2x2dc( dctcoef d[4], dctcoef dct4x4[4][16] )
  function ALWAYS_INLINE (line 98) | static ALWAYS_INLINE int array_non_zero( dctcoef *v, int i_count )
  function mb_encode_i16x16 (line 126) | static void mb_encode_i16x16( x264_t *h, int p, int i_qp )
  function ALWAYS_INLINE (line 245) | static ALWAYS_INLINE int mb_optimize_chroma_dc( x264_t *h, dctcoef *dct_...
  function ALWAYS_INLINE (line 259) | static ALWAYS_INLINE void mb_encode_chroma_internal( x264_t *h, int b_in...
  function x264_mb_encode_chroma (line 492) | void x264_mb_encode_chroma( x264_t *h, int b_inter, int i_qp )
  function macroblock_encode_skip (line 500) | static void macroblock_encode_skip( x264_t *h )
  function x264_predict_lossless_chroma (line 526) | void x264_predict_lossless_chroma( x264_t *h, int i_mode )
  function x264_predict_lossless_4x4 (line 555) | void x264_predict_lossless_4x4( x264_t *h, pixel *p_dst, int p, int idx,...
  function x264_predict_lossless_8x8 (line 575) | void x264_predict_lossless_8x8( x264_t *h, pixel *p_dst, int p, int idx,...
  function x264_predict_lossless_16x16 (line 595) | void x264_predict_lossless_16x16( x264_t *h, int p, int i_mode )
  function ALWAYS_INLINE (line 618) | static ALWAYS_INLINE void macroblock_encode_internal( x264_t *h, int pla...
  function x264_macroblock_encode (line 974) | void x264_macroblock_encode( x264_t *h )
  function ALWAYS_INLINE (line 988) | static ALWAYS_INLINE int macroblock_probe_skip_internal( x264_t *h, int ...
  function x264_macroblock_probe_skip (line 1129) | int x264_macroblock_probe_skip( x264_t *h, int b_bidir )
  function x264_noise_reduction_update (line 1146) | void x264_noise_reduction_update( x264_t *h )
  function ALWAYS_INLINE (line 1179) | static ALWAYS_INLINE void macroblock_encode_p8x8_internal( x264_t *h, in...
  function x264_macroblock_encode_p8x8 (line 1370) | void x264_macroblock_encode_p8x8( x264_t *h, int i8 )
  function ALWAYS_INLINE (line 1385) | static ALWAYS_INLINE void macroblock_encode_p4x4_internal( x264_t *h, in...
  function x264_macroblock_encode_p4x4 (line 1419) | void x264_macroblock_encode_p4x4( x264_t *h, int i8 )

FILE: encoder/macroblock.h
  function ALWAYS_INLINE (line 90) | static ALWAYS_INLINE int x264_quant_4x4( x264_t *h, dctcoef dct[16], int...
  function ALWAYS_INLINE (line 101) | static ALWAYS_INLINE int x264_quant_8x8( x264_t *h, dctcoef dct[64], int...
  function ALWAYS_INLINE (line 132) | static ALWAYS_INLINE void x264_mb_encode_i4x4( x264_t *h, int p, int idx...
  function ALWAYS_INLINE (line 168) | static ALWAYS_INLINE void x264_mb_encode_i8x8( x264_t *h, int p, int idx...

FILE: encoder/me.c
  function x264_me_search_ref (line 182) | void x264_me_search_ref( x264_t *h, x264_me_t *m, int16_t (*mvc)[2], int...
  function x264_me_refine_qpel (line 801) | void x264_me_refine_qpel( x264_t *h, x264_me_t *m )
  function x264_me_refine_qpel_refdupe (line 812) | void x264_me_refine_qpel_refdupe( x264_t *h, x264_me_t *m, int *p_halfpe...
  function refine_subpel (line 865) | static void refine_subpel( x264_t *h, x264_me_t *m, int hpel_iters, int ...
  function ALWAYS_INLINE (line 1027) | static ALWAYS_INLINE void me_refine_bidir( x264_t *h, x264_me_t *m0, x26...
  function x264_me_refine_bidir_satd (line 1180) | void x264_me_refine_bidir_satd( x264_t *h, x264_me_t *m0, x264_me_t *m1,...
  function x264_me_refine_bidir_rd (line 1185) | void x264_me_refine_bidir_rd( x264_t *h, x264_me_t *m0, x264_me_t *m1, i...
  function x264_me_refine_qpel_rd (line 1233) | void x264_me_refine_qpel_rd( x264_t *h, x264_me_t *m, int i_lambda2, int...

FILE: encoder/ratecontrol.c
  type ratecontrol_entry_t (line 36) | typedef struct
  type predictor_t (line 63) | typedef struct
  type x264_ratecontrol_t (line 72) | struct x264_ratecontrol_t
  function qp2qscale (line 203) | static inline float qp2qscale( float qp )
  function qscale2qp (line 207) | static inline float qscale2qp( float qscale )
  function qscale2bits (line 216) | static inline double qscale2bits( ratecontrol_entry_t *rce, double qscale )
  function ALWAYS_INLINE (line 225) | static ALWAYS_INLINE uint32_t ac_energy_var( uint64_t sum_ssd, int shift...
  function ALWAYS_INLINE (line 237) | static ALWAYS_INLINE uint32_t ac_energy_plane( x264_t *h, int mb_x, int ...
  function NOINLINE (line 260) | static NOINLINE uint32_t ac_energy_mb( x264_t *h, int mb_x, int mb_y, x2...
  function x264_adaptive_quant_frame (line 304) | void x264_adaptive_quant_frame( x264_t *h, x264_frame_t *frame, float *q...
  function macroblock_tree_rescale_init (line 417) | static int macroblock_tree_rescale_init( x264_t *h, x264_ratecontrol_t *...
  function macroblock_tree_rescale_destroy (line 490) | static void macroblock_tree_rescale_destroy( x264_ratecontrol_t *rc )
  function ALWAYS_INLINE (line 501) | static ALWAYS_INLINE float tapfilter( float *src, int pos, int max, int ...
  function macroblock_tree_rescale (line 509) | static void macroblock_tree_rescale( x264_t *h, x264_ratecontrol_t *rc, ...
  function x264_macroblock_tree_read (line 541) | int x264_macroblock_tree_read( x264_t *h, x264_frame_t *frame, float *qu...
  function x264_reference_build_list_optimal (line 585) | int x264_reference_build_list_optimal( x264_t *h )
  function x264_ratecontrol_init_reconfigurable (line 632) | void x264_ratecontrol_init_reconfigurable( x264_t *h, int b_init )
  function x264_ratecontrol_new (line 744) | int x264_ratecontrol_new( x264_t *h )
  function parse_zone (line 1219) | static int parse_zone( x264_t *h, x264_zone_t *z, char *p )
  function parse_zones (line 1263) | static int parse_zones( x264_t *h )
  function x264_zone_t (line 1333) | static x264_zone_t *get_zone( x264_t *h, int frame_num )
  function x264_ratecontrol_summary (line 1345) | void x264_ratecontrol_summary( x264_t *h )
  function x264_ratecontrol_delete (line 1358) | void x264_ratecontrol_delete( x264_t *h )
  function accum_p_qp_update (line 1410) | static void accum_p_qp_update( x264_t *h, float qp )
  function x264_ratecontrol_zone_init (line 1422) | void x264_ratecontrol_zone_init( x264_t *h )
  function x264_ratecontrol_start (line 1432) | void x264_ratecontrol_start( x264_t *h, int i_force_qp, int overhead )
  function predict_row_size (line 1540) | static float predict_row_size( x264_t *h, int y, float qscale )
  function row_bits_so_far (line 1569) | static int row_bits_so_far( x264_t *h, int y )
  function predict_row_size_to_end (line 1577) | static float predict_row_size_to_end( x264_t *h, int y, float qp )
  function x264_ratecontrol_mb (line 1590) | int x264_ratecontrol_mb( x264_t *h, int bits )
  function x264_ratecontrol_qp (line 1748) | int x264_ratecontrol_qp( x264_t *h )
  function x264_ratecontrol_mb_qp (line 1754) | int x264_ratecontrol_mb_qp( x264_t *h )
  function x264_ratecontrol_slice_type (line 1771) | int x264_ratecontrol_slice_type( x264_t *h, int frame_num )
  function x264_ratecontrol_set_weights (line 1812) | void x264_ratecontrol_set_weights( x264_t *h, x264_frame_t *frm )
  function x264_ratecontrol_end (line 1829) | int x264_ratecontrol_end( x264_t *h, int bits, int *filler )
  function get_qscale (line 2003) | static double get_qscale(x264_t *h, ratecontrol_entry_t *rce, double rat...
  function get_diff_limited_q (line 2037) | static double get_diff_limited_q(x264_t *h, ratecontrol_entry_t *rce, do...
  function predict_size (line 2109) | static float predict_size( predictor_t *p, float q, float var )
  function update_predictor (line 2114) | static void update_predictor( predictor_t *p, float q, float var, float ...
  function update_vbv (line 2137) | static int update_vbv( x264_t *h, int bits )
  function x264_hrd_fullness (line 2194) | void x264_hrd_fullness( x264_t *h )
  function update_vbv_plan (line 2217) | static void update_vbv_plan( x264_t *h, int overhead )
  function clip_qscale (line 2242) | static double clip_qscale( x264_t *h, int pict_type, double q )
  function vbv_pass1 (line 2266) | static double vbv_pass1( x264_t *h, int pict_type, double q )
  function rate_estimate_qscale (line 2400) | static float rate_estimate_qscale( x264_t *h )
  function threads_normalize_predictors (line 2665) | static void threads_normalize_predictors( x264_t *h )
  function x264_threads_distribute_ratecontrol (line 2675) | void x264_threads_distribute_ratecontrol( x264_t *h )
  function x264_threads_merge_ratecontrol (line 2729) | void x264_threads_merge_ratecontrol( x264_t *h )
  function x264_thread_sync_ratecontrol (line 2754) | void x264_thread_sync_ratecontrol( x264_t *cur, x264_t *prev, x264_t *ne...
  function find_underflow (line 2805) | static int find_underflow( x264_t *h, double *fills, int *t0, int *t1, i...
  function fix_underflow (line 2836) | static int fix_underflow( x264_t *h, int t0, int t1, double adjustment, ...
  function count_expected_bits (line 2855) | static double count_expected_bits( x264_t *h )
  function vbv_pass2 (line 2868) | static int vbv_pass2( x264_t *h, double all_available_bits )
  function init_pass2 (line 2932) | static int init_pass2( x264_t *h )

FILE: encoder/rdo.c
  function ALWAYS_INLINE (line 75) | static ALWAYS_INLINE uint64_t cached_hadamard( x264_t *h, int size, int ...
  function ALWAYS_INLINE (line 94) | static ALWAYS_INLINE int cached_satd( x264_t *h, int size, int x, int y )
  function ssd_plane (line 123) | static inline int ssd_plane( x264_t *h, int size, int p, int x, int y )
  function ssd_mb (line 150) | static inline int ssd_mb( x264_t *h )
  function rd_cost_mb (line 162) | static int rd_cost_mb( x264_t *h, int i_lambda2 )
  function rd_cost_subpart (line 201) | static uint64_t rd_cost_subpart( x264_t *h, int i_lambda2, int i4, int i...
  function x264_rd_cost_part (line 233) | uint64_t x264_rd_cost_part( x264_t *h, int i_lambda2, int i4, int i_pixel )
  function rd_cost_i8x8 (line 279) | static uint64_t rd_cost_i8x8( x264_t *h, int i_lambda2, int i8, int i_mo...
  function rd_cost_i4x4 (line 315) | static uint64_t rd_cost_i4x4( x264_t *h, int i_lambda2, int i4, int i_mo...
  function rd_cost_chroma (line 349) | static uint64_t rd_cost_chroma( x264_t *h, int i_lambda2, int i_mode, in...
  function x264_rdo_init (line 384) | void x264_rdo_init( void )
  type trellis_node_t (line 417) | typedef struct
  type trellis_level_t (line 424) | typedef struct
  function NOINLINE (line 462) | static NOINLINE
  function ALWAYS_INLINE (line 494) | static ALWAYS_INLINE
  function NOINLINE (line 537) | static NOINLINE
  function NOINLINE (line 553) | static NOINLINE
  function NOINLINE (line 577) | static NOINLINE
  function NOINLINE (line 591) | static NOINLINE
  function NOINLINE (line 608) | static NOINLINE
  function NOINLINE (line 623) | static NOINLINE
  function ALWAYS_INLINE (line 641) | static ALWAYS_INLINE

FILE: encoder/set.c
  function transpose (line 36) | static void transpose( uint8_t *buf, int w )
  function scaling_list_write (line 43) | static void scaling_list_write( bs_t *s, x264_sps_t *sps, int idx )
  function x264_sei_write (line 80) | void x264_sei_write( bs_t *s, uint8_t *payload, int payload_size, int pa...
  function x264_sps_init (line 101) | void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
  function x264_sps_init_reconfigurable (line 249) | void x264_sps_init_reconfigurable( x264_sps_t *sps, x264_param_t *param )
  function x264_sps_init_scaling_list (line 267) | void x264_sps_init_scaling_list( x264_sps_t *sps, x264_param_t *param )
  function x264_sps_write (line 305) | void x264_sps_write( bs_t *s, x264_sps_t *sps )
  function x264_pps_init (line 479) | void x264_pps_init( x264_pps_t *pps, int i_id, x264_param_t *param, x264...
  function x264_pps_write (line 505) | void x264_pps_write( bs_t *s, x264_sps_t *sps, x264_pps_t *pps )
  function x264_sei_recovery_point_write (line 574) | void x264_sei_recovery_point_write( x264_t *h, bs_t *s, int recovery_fra...
  function x264_sei_version_write (line 593) | int x264_sei_version_write( x264_t *h, bs_t *s )
  function x264_sei_buffering_period_write (line 625) | void x264_sei_buffering_period_write( x264_t *h, bs_t *s )
  function x264_sei_pic_timing_write (line 647) | void x264_sei_pic_timing_write( x264_t *h, bs_t *s )
  function x264_sei_frame_packing_write (line 678) | void x264_sei_frame_packing_write( x264_t *h, bs_t *s )
  function x264_sei_mastering_display_write (line 720) | void x264_sei_mastering_display_write( x264_t *h, bs_t *s )
  function x264_sei_content_light_level_write (line 745) | void x264_sei_content_light_level_write( x264_t *h, bs_t *s )
  function x264_sei_alternative_transfer_write (line 762) | void x264_sei_alternative_transfer_write( x264_t *h, bs_t *s )
  function x264_filler_write (line 778) | void x264_filler_write( x264_t *h, bs_t *s, int filler )
  function x264_sei_dec_ref_pic_marking_write (line 789) | void x264_sei_dec_ref_pic_marking_write( x264_t *h, bs_t *s )
  function x264_sei_avcintra_umid_write (line 821) | int x264_sei_avcintra_umid_write( x264_t *h, bs_t *s )
  function x264_sei_avcintra_vanc_write (line 849) | int x264_sei_avcintra_vanc_write( x264_t *h, bs_t *s, int len )
  function x264_validate_levels (line 876) | int x264_validate_levels( x264_t *h, int verbose )

FILE: encoder/slicetype-cl.c
  function x264_opencl_flush (line 58) | void x264_opencl_flush( x264_t *h )
  function x264_opencl_lowres_init (line 82) | int x264_opencl_lowres_init( x264_t *h, x264_frame_t *fenc, int lambda )
  function optimal_launch_dims (line 291) | static void optimal_launch_dims( x264_t *h, size_t *gdims, size_t *ldims...
  function x264_opencl_motionsearch (line 349) | int x264_opencl_motionsearch( x264_t *h, x264_frame_t **frames, int b, i...
  function x264_opencl_finalize_cost (line 540) | int x264_opencl_finalize_cost( x264_t *h, int lambda, x264_frame_t **fra...
  function x264_opencl_slicetype_prep (line 653) | void x264_opencl_slicetype_prep( x264_t *h, x264_frame_t **frames, int n...
  function x264_opencl_slicetype_end (line 715) | void x264_opencl_slicetype_end( x264_t *h )
  function x264_opencl_precalculate_frame_cost (line 730) | int x264_opencl_precalculate_frame_cost( x264_t *h, x264_frame_t **frame...

FILE: encoder/slicetype.c
  function lowres_context_init (line 45) | static void lowres_context_init( x264_t *h, x264_mb_analysis_t *a )
  function weight_get_h264 (line 64) | static void weight_get_h264( int weight_nonh264, int offset, x264_weight...
  function NOINLINE (line 77) | static NOINLINE pixel *weight_cost_init_luma( x264_t *h, x264_frame_t *f...
  function NOINLINE (line 111) | static NOINLINE void weight_cost_init_chroma( x264_t *h, x264_frame_t *f...
  function NOINLINE (line 142) | static NOINLINE pixel *weight_cost_init_chroma444( x264_t *h, x264_frame...
  function weight_slice_header_cost (line 170) | static int weight_slice_header_cost( x264_t *h, x264_weight_t *w, int b_...
  function weight_cost_luma (line 191) | static NOINLINE unsigned int weight_cost_luma( x264_t *h, x264_frame_t *...
  function weight_cost_chroma (line 224) | static NOINLINE unsigned int weight_cost_chroma( x264_t *h, x264_frame_t...
  function weight_cost_chroma444 (line 257) | static NOINLINE unsigned int weight_cost_chroma444( x264_t *h, x264_fram...
  function x264_weights_analyse (line 284) | void x264_weights_analyse( x264_t *h, x264_frame_t *fenc, x264_frame_t *...
  function slicetype_mb_cost (line 514) | static void slicetype_mb_cost( x264_t *h, x264_mb_analysis_t *a,
  type x264_slicetype_slice_t (line 799) | typedef struct
  function slicetype_slice_cost (line 814) | static void slicetype_slice_cost( x264_slicetype_slice_t *s )
  function slicetype_frame_cost (line 836) | static int slicetype_frame_cost( x264_t *h, x264_mb_analysis_t *a,
  function slicetype_frame_cost_recalculate (line 999) | static int slicetype_frame_cost_recalculate( x264_t *h, x264_frame_t **f...
  function macroblock_tree_finish (line 1029) | static void macroblock_tree_finish( x264_t *h, x264_frame_t *frame, floa...
  function macroblock_tree_propagate (line 1051) | static void macroblock_tree_propagate( x264_t *h, x264_frame_t **frames,...
  function macroblock_tree (line 1091) | static void macroblock_tree( x264_t *h, x264_mb_analysis_t *a, x264_fram...
  function vbv_frame_cost (line 1186) | static int vbv_frame_cost( x264_t *h, x264_mb_analysis_t *a, x264_frame_...
  function calculate_durations (line 1199) | static void calculate_durations( x264_t *h, x264_frame_t *cur_frame, x26...
  function vbv_lookahead (line 1225) | static void vbv_lookahead( x264_t *h, x264_mb_analysis_t *a, x264_frame_...
  function slicetype_path_cost (line 1288) | static uint64_t slicetype_path_cost( x264_t *h, x264_mb_analysis_t *a, x...
  function slicetype_path (line 1333) | static void slicetype_path( x264_t *h, x264_mb_analysis_t *a, x264_frame...
  function scenecut_internal (line 1384) | static int scenecut_internal( x264_t *h, x264_mb_analysis_t *a, x264_fra...
  function scenecut (line 1430) | static int scenecut( x264_t *h, x264_mb_analysis_t *a, x264_frame_t **fr...
  function x264_slicetype_analyse (line 1473) | void x264_slicetype_analyse( x264_t *h, int intra_minigop )
  function x264_slicetype_decide (line 1745) | void x264_slicetype_decide( x264_t *h )
  function x264_rc_analyse_slice (line 1976) | int x264_rc_analyse_slice( x264_t *h )

FILE: example.c
  function main (line 45) | int main( int argc, char **argv )

FILE: extras/avisynth_c.h
  type BYTE (line 257) | typedef uint8_t  BYTE;
  type AVS_ScriptEnvironment (line 601) | struct AVS_ScriptEnvironment {
  function AVSC_INLINE (line 636) | AVSC_INLINE int avs_has_video(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 639) | AVSC_INLINE int avs_has_audio(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 642) | AVSC_INLINE int avs_is_rgb(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 645) | AVSC_INLINE int avs_is_rgb24(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 648) | AVSC_INLINE int avs_is_rgb32(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 651) | AVSC_INLINE int avs_is_yuv(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 654) | AVSC_INLINE int avs_is_yuy2(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 668) | AVSC_INLINE int avs_is_yv24(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 671) | AVSC_INLINE int avs_is_yv16(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 674) | AVSC_INLINE int avs_is_yv12(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 677) | AVSC_INLINE int avs_is_yv411(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 680) | AVSC_INLINE int avs_is_y8(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 699) | AVSC_INLINE int avs_is_property(const AVS_VideoInfo * p, int property)
  function AVSC_INLINE (line 704) | AVSC_INLINE int avs_is_planar(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 709) | AVSC_INLINE int avs_is_field_based(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 714) | AVSC_INLINE int avs_is_parity_known(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 719) | AVSC_INLINE int avs_is_bff(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 724) | AVSC_INLINE int avs_is_tff(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 729) | AVSC_INLINE int avs_samples_per_second(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 732) | AVSC_INLINE int avs_bytes_per_channel_sample(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 744) | AVSC_INLINE int avs_bytes_per_audio_sample(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 747) | AVSC_INLINE int64_t avs_audio_samples_from_frames(const AVS_VideoInfo * ...
  function AVSC_INLINE (line 750) | AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, i...
  function AVSC_INLINE (line 753) | AVSC_INLINE int64_t avs_audio_samples_from_bytes(const AVS_VideoInfo * p...
  function AVSC_INLINE (line 756) | AVSC_INLINE int64_t avs_bytes_from_audio_samples(const AVS_VideoInfo * p...
  function AVSC_INLINE (line 759) | AVSC_INLINE int avs_audio_channels(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 762) | AVSC_INLINE int avs_sample_type(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 767) | AVSC_INLINE void avs_set_property(AVS_VideoInfo * p, int property)
  function AVSC_INLINE (line 770) | AVSC_INLINE void avs_clear_property(AVS_VideoInfo * p, int property)
  function AVSC_INLINE (line 773) | AVSC_INLINE void avs_set_field_based(AVS_VideoInfo * p, int isfieldbased)
  function AVSC_INLINE (line 776) | AVSC_INLINE void avs_set_fps(AVS_VideoInfo * p, unsigned numerator, unsi...
  function AVSC_INLINE (line 786) | AVSC_INLINE int avs_is_same_colorspace(const AVS_VideoInfo * x, const AV...
  type AVS_VideoFrameBuffer (line 841) | typedef struct AVS_VideoFrameBuffer {
  type AVS_VideoFrame (line 857) | typedef struct AVS_VideoFrame {
  function AVSC_INLINE (line 883) | AVSC_INLINE int avs_get_pitch_p(const AVS_VideoFrame * p, int plane)
  function AVSC_INLINE (line 894) | AVSC_INLINE int avs_get_row_size_p(const AVS_VideoFrame * p, int plane)
  function AVSC_INLINE (line 905) | AVSC_INLINE int avs_get_height_p(const AVS_VideoFrame * p, int plane)
  function AVSC_INLINE (line 916) | AVSC_INLINE const BYTE * avs_get_read_ptr_p(const AVS_VideoFrame * p, in...
  function AVSC_INLINE (line 942) | AVSC_INLINE int avs_get_pitch(const AVS_VideoFrame * p)
  function AVSC_INLINE (line 945) | AVSC_INLINE int avs_get_row_size(const AVS_VideoFrame * p)
  function AVSC_INLINE (line 948) | AVSC_INLINE int avs_get_height(const AVS_VideoFrame * p)
  function AVSC_INLINE (line 951) | AVSC_INLINE const BYTE* avs_get_read_ptr(const AVS_VideoFrame * p)
  function AVSC_INLINE (line 956) | AVSC_INLINE BYTE* avs_get_write_ptr(const AVS_VideoFrame * p)
  function AVSC_INLINE (line 962) | AVSC_INLINE void avs_release_frame(AVS_VideoFrame * f)
  function AVSC_INLINE (line 968) | AVSC_INLINE AVS_VideoFrame * avs_copy_frame(AVS_VideoFrame * f)
  type AVS_Map (line 974) | typedef struct AVS_Map {
  type AVS_Value (line 993) | typedef struct AVS_Value AVS_Value;
  type AVS_Value (line 994) | struct AVS_Value {
  function AVSC_INLINE (line 1027) | AVSC_INLINE int avs_defined(AVS_Value v) { return v.type != 'v'; }
  function AVSC_INLINE (line 1028) | AVSC_INLINE int avs_is_clip(AVS_Value v) { return v.type == 'c'; }
  function AVSC_INLINE (line 1029) | AVSC_INLINE int avs_is_bool(AVS_Value v) { return v.type == 'b'; }
  function AVSC_INLINE (line 1030) | AVSC_INLINE int avs_is_int(AVS_Value v) { return v.type == 'i'; }
  function AVSC_INLINE (line 1031) | AVSC_INLINE int avs_is_float(AVS_Value v) { return v.type == 'f' || v.ty...
  function AVSC_INLINE (line 1032) | AVSC_INLINE int avs_is_string(AVS_Value v) { return v.type == 's'; }
  function AVSC_INLINE (line 1033) | AVSC_INLINE int avs_is_array(AVS_Value v) { return v.type == 'a'; }
  function AVSC_INLINE (line 1034) | AVSC_INLINE int avs_is_error(AVS_Value v) { return v.type == 'e'; }
  function AVSC_INLINE (line 1036) | AVSC_INLINE int avs_as_bool(AVS_Value v)
  function AVSC_INLINE (line 1038) | AVSC_INLINE int avs_as_int(AVS_Value v)
  function AVSC_INLINE (line 1040) | AVSC_INLINE const char * avs_as_string(AVS_Value v)
  function AVSC_INLINE (line 1042) | AVSC_INLINE double avs_as_float(AVS_Value v)
  function AVSC_INLINE (line 1044) | AVSC_INLINE const char * avs_as_error(AVS_Value v)
  function AVSC_INLINE (line 1046) | AVSC_INLINE const AVS_Value * avs_as_array(AVS_Value v)
  function AVSC_INLINE (line 1048) | AVSC_INLINE int avs_array_size(AVS_Value v)
  function AVSC_INLINE (line 1050) | AVSC_INLINE AVS_Value avs_array_elt(AVS_Value v, int index)
  function AVSC_INLINE (line 1055) | AVSC_INLINE AVS_Value avs_new_value_bool(int v0)
  function AVSC_INLINE (line 1057) | AVSC_INLINE AVS_Value avs_new_value_int(int v0)
  function AVSC_INLINE (line 1059) | AVSC_INLINE AVS_Value avs_new_value_string(const char * v0)
  function AVSC_INLINE (line 1061) | AVSC_INLINE AVS_Value avs_new_value_float(float v0)
  function AVSC_INLINE (line 1063) | AVSC_INLINE AVS_Value avs_new_value_error(const char * v0)
  function AVSC_INLINE (line 1067) | AVSC_INLINE AVS_Value avs_new_value_clip(AVS_Clip * v0)
  function AVSC_INLINE (line 1070) | AVSC_INLINE AVS_Value avs_new_value_array(AVS_Value * v0, int size)
  type AVS_FilterInfo (line 1105) | typedef struct AVS_FilterInfo AVS_FilterInfo;
  type AVS_FilterInfo (line 1106) | struct AVS_FilterInfo
  function AVSC_INLINE (line 1223) | AVSC_INLINE AVS_VideoFrame * avs_new_video_frame(AVS_ScriptEnvironment *...
  function AVSC_INLINE (line 1229) | AVSC_INLINE AVS_VideoFrame * avs_new_frame(AVS_ScriptEnvironment * env,
  type AVS_Library (line 1359) | typedef struct AVS_Library AVS_Library;
  type AVS_Library (line 1371) | struct AVS_Library {
  function AVSC_INLINE (line 1515) | AVSC_INLINE int avs_is_xx_fallback_return_false(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 1521) | AVSC_INLINE int avs_num_components_fallback(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 1537) | AVSC_INLINE int avs_component_size_fallback(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 1543) | AVSC_INLINE int avs_bits_per_component_fallback(const AVS_VideoInfo * p)
  function AVSC_INLINE (line 1554) | AVSC_INLINE AVS_Library * avs_load_library() {
  function AVSC_INLINE (line 1759) | AVSC_INLINE void avs_free_library(AVS_Library *library) {

FILE: extras/cl.h
  type _cl_platform_id (line 35) | struct _cl_platform_id
  type _cl_device_id (line 36) | struct _cl_device_id
  type _cl_context (line 37) | struct _cl_context
  type _cl_command_queue (line 38) | struct _cl_command_queue
  type _cl_mem (line 39) | struct _cl_mem
  type _cl_program (line 40) | struct _cl_program
  type _cl_kernel (line 41) | struct _cl_kernel
  type _cl_event (line 42) | struct _cl_event
  type _cl_sampler (line 43) | struct _cl_sampler
  type cl_uint (line 45) | typedef cl_uint             cl_bool;
  type cl_ulong (line 46) | typedef cl_ulong            cl_bitfield;
  type cl_bitfield (line 47) | typedef cl_bitfield         cl_device_type;
  type cl_uint (line 48) | typedef cl_uint             cl_platform_info;
  type cl_uint (line 49) | typedef cl_uint             cl_device_info;
  type cl_bitfield (line 50) | typedef cl_bitfield         cl_device_fp_config;
  type cl_uint (line 51) | typedef cl_uint             cl_device_mem_cache_type;
  type cl_uint (line 52) | typedef cl_uint             cl_device_local_mem_type;
  type cl_bitfield (line 53) | typedef cl_bitfield         cl_device_exec_capabilities;
  type cl_bitfield (line 54) | typedef cl_bitfield         cl_command_queue_properties;
  type cl_device_partition_property (line 55) | typedef intptr_t            cl_device_partition_property;
  type cl_bitfield (line 56) | typedef cl_bitfield         cl_device_affinity_domain;
  type cl_context_properties (line 58) | typedef intptr_t            cl_context_properties;
  type cl_uint (line 59) | typedef cl_uint             cl_context_info;
  type cl_uint (line 60) | typedef cl_uint             cl_command_queue_info;
  type cl_uint (line 61) | typedef cl_uint             cl_channel_order;
  type cl_uint (line 62) | typedef cl_uint             cl_channel_type;
  type cl_bitfield (line 63) | typedef cl_bitfield         cl_mem_flags;
  type cl_uint (line 64) | typedef cl_uint             cl_mem_object_type;
  type cl_uint (line 65) | typedef cl_uint             cl_mem_info;
  type cl_bitfield (line 66) | typedef cl_bitfield         cl_mem_migration_flags;
  type cl_uint (line 67) | typedef cl_uint             cl_image_info;
  type cl_uint (line 68) | typedef cl_uint             cl_buffer_create_type;
  type cl_uint (line 69) | typedef cl_uint             cl_addressing_mode;
  type cl_uint (line 70) | typedef cl_uint             cl_filter_mode;
  type cl_uint (line 71) | typedef cl_uint             cl_sampler_info;
  type cl_bitfield (line 72) | typedef cl_bitfield         cl_map_flags;
  type cl_uint (line 73) | typedef cl_uint             cl_program_info;
  type cl_uint (line 74) | typedef cl_uint             cl_program_build_info;
  type cl_uint (line 75) | typedef cl_uint             cl_program_binary_type;
  type cl_int (line 76) | typedef cl_int              cl_build_status;
  type cl_uint (line 77) | typedef cl_uint             cl_kernel_info;
  type cl_uint (line 78) | typedef cl_uint             cl_kernel_arg_info;
  type cl_uint (line 79) | typedef cl_uint             cl_kernel_arg_address_qualifier;
  type cl_uint (line 80) | typedef cl_uint             cl_kernel_arg_access_qualifier;
  type cl_bitfield (line 81) | typedef cl_bitfield         cl_kernel_arg_type_qualifier;
  type cl_uint (line 82) | typedef cl_uint             cl_kernel_work_group_info;
  type cl_uint (line 83) | typedef cl_uint             cl_event_info;
  type cl_uint (line 84) | typedef cl_uint             cl_command_type;
  type cl_uint (line 85) | typedef cl_uint             cl_profiling_info;
  type cl_image_format (line 88) | typedef struct _cl_image_format {
  type cl_image_desc (line 93) | typedef struct _cl_image_desc {
  type cl_buffer_region (line 106) | typedef struct _cl_buffer_region {

FILE: extras/cl_platform.h
  type cl_char (line 137) | typedef signed   __int8         cl_char;
  type cl_uchar (line 138) | typedef unsigned __int8         cl_uchar;
  type cl_short (line 139) | typedef signed   __int16        cl_short;
  type cl_ushort (line 140) | typedef unsigned __int16        cl_ushort;
  type cl_int (line 141) | typedef signed   __int32        cl_int;
  type cl_uint (line 142) | typedef unsigned __int32        cl_uint;
  type cl_long (line 143) | typedef signed   __int64        cl_long;
  type cl_ulong (line 144) | typedef unsigned __int64        cl_ulong;
  type cl_half (line 146) | typedef unsigned __int16        cl_half;
  type cl_float (line 147) | typedef float                   cl_float;
  type cl_double (line 148) | typedef double                  cl_double;
  type cl_char (line 228) | typedef int8_t          cl_char;
  type cl_uchar (line 229) | typedef uint8_t         cl_uchar;
  type cl_short (line 230) | typedef int16_t         cl_short    __attribute__((aligned(2)));
  type cl_ushort (line 231) | typedef uint16_t        cl_ushort   __attribute__((aligned(2)));
  type cl_int (line 232) | typedef int32_t         cl_int      __attribute__((aligned(4)));
  type cl_uint (line 233) | typedef uint32_t        cl_uint     __attribute__((aligned(4)));
  type cl_long (line 234) | typedef int64_t         cl_long     __attribute__((aligned(8)));
  type cl_ulong (line 235) | typedef uint64_t        cl_ulong    __attribute__((aligned(8)));
  type cl_half (line 237) | typedef uint16_t        cl_half     __attribute__((aligned(2)));
  type cl_float (line 238) | typedef float           cl_float    __attribute__((aligned(4)));
  type cl_double (line 239) | typedef double          cl_double   __attribute__((aligned(8)));
  type cl_GLuint (line 326) | typedef unsigned int cl_GLuint;
  type cl_GLint (line 327) | typedef int          cl_GLint;
  type cl_GLenum (line 328) | typedef unsigned int cl_GLenum;
  type __cl_uchar16 (line 349) | typedef vector unsigned char     __cl_uchar16;
  type __cl_char16 (line 350) | typedef vector signed char       __cl_char16;
  type __cl_ushort8 (line 351) | typedef vector unsigned short    __cl_ushort8;
  type __cl_short8 (line 352) | typedef vector signed short      __cl_short8;
  type __cl_uint4 (line 353) | typedef vector unsigned int      __cl_uint4;
  type __cl_int4 (line 354) | typedef vector signed int        __cl_int4;
  type vector (line 355) | typedef vector float             __cl_float4;
  type __cl_float4 (line 372) | typedef float __cl_float4   __attribute__((vector_size(16)));
  type __m128 (line 374) | typedef __m128 __cl_float4;
  type cl_uchar (line 386) | typedef cl_uchar    __cl_uchar16    __attribute__((vector_size(16)));
  type cl_char (line 387) | typedef cl_char     __cl_char16     __attribute__((vector_size(16)));
  type cl_ushort (line 388) | typedef cl_ushort   __cl_ushort8    __attribute__((vector_size(16)));
  type cl_short (line 389) | typedef cl_short    __cl_short8     __attribute__((vector_size(16)));
  type cl_uint (line 390) | typedef cl_uint     __cl_uint4      __attribute__((vector_size(16)));
  type cl_int (line 391) | typedef cl_int      __cl_int4       __attribute__((vector_size(16)));
  type cl_ulong (line 392) | typedef cl_ulong    __cl_ulong2     __attribute__((vector_size(16)));
  type cl_long (line 393) | typedef cl_long     __cl_long2      __attribute__((vector_size(16)));
  type cl_double (line 394) | typedef cl_double   __cl_double2    __attribute__((vector_size(16)));
  type __m128i (line 396) | typedef __m128i __cl_uchar16;
  type __m128i (line 397) | typedef __m128i __cl_char16;
  type __m128i (line 398) | typedef __m128i __cl_ushort8;
  type __m128i (line 399) | typedef __m128i __cl_short8;
  type __m128i (line 400) | typedef __m128i __cl_uint4;
  type __m128i (line 401) | typedef __m128i __cl_int4;
  type __m128i (line 402) | typedef __m128i __cl_ulong2;
  type __m128i (line 403) | typedef __m128i __cl_long2;
  type __m128d (line 404) | typedef __m128d __cl_double2;
  type cl_uchar (line 420) | typedef cl_uchar    __cl_uchar8     __attribute__((vector_size(8)));
  type cl_char (line 421) | typedef cl_char     __cl_char8      __attribute__((vector_size(8)));
  type cl_ushort (line 422) | typedef cl_ushort   __cl_ushort4    __attribute__((vector_size(8)));
  type cl_short (line 423) | typedef cl_short    __cl_short4     __attribute__((vector_size(8)));
  type cl_uint (line 424) | typedef cl_uint     __cl_uint2      __attribute__((vector_size(8)));
  type cl_int (line 425) | typedef cl_int      __cl_int2       __attribute__((vector_size(8)));
  type cl_ulong (line 426) | typedef cl_ulong    __cl_ulong1     __attribute__((vector_size(8)));
  type cl_long (line 427) | typedef cl_long     __cl_long1      __attribute__((vector_size(8)));
  type cl_float (line 428) | typedef cl_float    __cl_float2     __attribute__((vector_size(8)));
  type __m64 (line 430) | typedef __m64       __cl_uchar8;
  type __m64 (line 431) | typedef __m64       __cl_char8;
  type __m64 (line 432) | typedef __m64       __cl_ushort4;
  type __m64 (line 433) | typedef __m64       __cl_short4;
  type __m64 (line 434) | typedef __m64       __cl_uint2;
  type __m64 (line 435) | typedef __m64       __cl_int2;
  type __m64 (line 436) | typedef __m64       __cl_ulong1;
  type __m64 (line 437) | typedef __m64       __cl_long1;
  type __m64 (line 438) | typedef __m64       __cl_float2;
  type cl_float (line 458) | typedef cl_float    __cl_float8     __attribute__((vector_size(32)));
  type cl_double (line 459) | typedef cl_double   __cl_double4    __attribute__((vector_size(32)));
  type __m256 (line 461) | typedef __m256      __cl_float8;
  type __m256d (line 462) | typedef __m256d     __cl_double4;
  type cl_char2 (line 493) | typedef union
  type cl_char4 (line 506) | typedef union
  type cl_char4 (line 523) | typedef  cl_char4  cl_char3;
  type cl_char8 (line 525) | typedef union
  type cl_char16 (line 544) | typedef union
  type cl_uchar2 (line 568) | typedef union
  type cl_uchar4 (line 581) | typedef union
  type cl_uchar4 (line 598) | typedef  cl_uchar4  cl_uchar3;
  type cl_uchar8 (line 600) | typedef union
  type cl_uchar16 (line 619) | typedef union
  type cl_short2 (line 643) | typedef union
  type cl_short4 (line 656) | typedef union
  type cl_short4 (line 673) | typedef  cl_short4  cl_short3;
  type cl_short8 (line 675) | typedef union
  type cl_short16 (line 694) | typedef union
  type cl_ushort2 (line 718) | typedef union
  type cl_ushort4 (line 731) | typedef union
  type cl_ushort4 (line 748) | typedef  cl_ushort4  cl_ushort3;
  type cl_ushort8 (line 750) | typedef union
  type cl_ushort16 (line 769) | typedef union
  type cl_int2 (line 792) | typedef union
  type cl_int4 (line 805) | typedef union
  type cl_int4 (line 822) | typedef  cl_int4  cl_int3;
  type cl_int8 (line 824) | typedef union
  type cl_int16 (line 843) | typedef union
  type cl_uint2 (line 867) | typedef union
  type cl_uint4 (line 880) | typedef union
  type cl_uint4 (line 897) | typedef  cl_uint4  cl_uint3;
  type cl_uint8 (line 899) | typedef union
  type cl_uint16 (line 918) | typedef union
  type cl_long2 (line 941) | typedef union
  type cl_long4 (line 954) | typedef union
  type cl_long4 (line 971) | typedef  cl_long4  cl_long3;
  type cl_long8 (line 973) | typedef union
  type cl_long16 (line 992) | typedef union
  type cl_ulong2 (line 1016) | typedef union
  type cl_ulong4 (line 1029) | typedef union
  type cl_ulong4 (line 1046) | typedef  cl_ulong4  cl_ulong3;
  type cl_ulong8 (line 1048) | typedef union
  type cl_ulong16 (line 1067) | typedef union
  type cl_float2 (line 1092) | typedef union
  type cl_float4 (line 1105) | typedef union
  type cl_float4 (line 1122) | typedef  cl_float4  cl_float3;
  type cl_float8 (line 1124) | typedef union
  type cl_float16 (line 1143) | typedef union
  type cl_double2 (line 1167) | typedef union
  type cl_double4 (line 1180) | typedef union
  type cl_double4 (line 1197) | typedef  cl_double4  cl_double3;
  type cl_double8 (line 1199) | typedef union
  type cl_double16 (line 1218) | typedef union

FILE: extras/getopt.c
  function exchange (line 298) | static void
  function _getopt_internal (line 505) | int
  function getopt (line 971) | int
  function getopt_long (line 983) | int getopt_long (argc, argv, optstring, long_options, opt_index)
  function main (line 1000) | int

FILE: extras/getopt.h
  type option (line 93) | struct option
  type option (line 151) | struct option
  type option (line 154) | struct option
  type option (line 159) | struct option

FILE: extras/intel_dispatcher.h
  function x264_intel_dispatcher_override (line 36) | static void x264_intel_dispatcher_override( void )

FILE: extras/inttypes.h
  type imaxdiv_t (line 47) | typedef struct {
  function _inline (line 256) | static

FILE: extras/stdint.h
  type __int64 (line 33) | typedef __int64  int64_t;
  type int_least8_t (line 37) | typedef signed char int_least8_t;
  type uint_least8_t (line 38) | typedef unsigned char   uint_least8_t;
  type int_least16_t (line 39) | typedef short  int_least16_t;
  type uint_least16_t (line 40) | typedef unsigned short  uint_least16_t;
  type int_least32_t (line 41) | typedef int  int_least32_t;
  type uint_least32_t (line 42) | typedef unsigned   uint_least32_t;
  type __int64 (line 43) | typedef __int64  int_least64_t;
  type uint_least64_t (line 44) | typedef unsigned __int64   uint_least64_t;
  type int_fast8_t (line 50) | typedef char int_fast8_t;
  type uint_fast8_t (line 51) | typedef unsigned char uint_fast8_t;
  type int_fast16_t (line 52) | typedef short  int_fast16_t;
  type uint_fast16_t (line 53) | typedef unsigned short  uint_fast16_t;
  type int_fast32_t (line 54) | typedef int  int_fast32_t;
  type uint_fast32_t (line 55) | typedef unsigned  int  uint_fast32_t;
  type __int64 (line 56) | typedef __int64  int_fast64_t;
  type uint_fast64_t (line 57) | typedef unsigned __int64   uint_fast64_t;
  type __int64 (line 64) | typedef __int64  intmax_t;
  type uintmax_t (line 65) | typedef unsigned __int64   uintmax_t;

FILE: filters/filters.c
  function x264_otob (line 114) | int x264_otob( const char *str, int def )
  function x264_otof (line 121) | double x264_otof( const char *str, double def )
  function x264_otoi (line 134) | int x264_otoi( const char *str, int def )

FILE: filters/video/cache.c
  type cache_hnd_t (line 39) | typedef struct
  function init (line 53) | static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *...
  function fill_cache (line 84) | static void fill_cache( cache_hnd_t *h, int frame )
  function get_frame (line 120) | static int get_frame( hnd_t handle, cli_pic_t *output, int frame )
  function release_frame (line 132) | static int release_frame( hnd_t handle, cli_pic_t *pic, int frame )
  function free_filter (line 138) | static void free_filter( hnd_t handle )

FILE: filters/video/crop.c
  type crop_hnd_t (line 34) | typedef struct
  function help (line 43) | static void help( int longhelp )
  function handle_opts (line 51) | static int handle_opts( crop_hnd_t *h, video_info_t *info, char **opts, ...
  function init (line 65) | static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *...
  function get_frame (line 107) | static int get_frame( hnd_t handle, cli_pic_t *output, int frame )
  function release_frame (line 124) | static int release_frame( hnd_t handle, cli_pic_t *pic, int frame )
  function free_filter (line 132) | static void free_filter( hnd_t handle )

FILE: filters/video/depth.c
  type depth_hnd_t (line 40) | typedef struct
  function depth_filter_csp_is_supported (line 51) | static int depth_filter_csp_is_supported( int csp )
  function csp_num_interleaved (line 69) | static int csp_num_interleaved( int csp, int plane )
  function dither_image (line 108) | static void dither_image( cli_image_t *out, cli_image_t *img, int16_t *e...
  function scale_image (line 146) | static void scale_image( cli_image_t *output, cli_image_t *img )
  function get_frame (line 168) | static int get_frame( hnd_t handle, cli_pic_t *output, int frame )
  function release_frame (line 188) | static int release_frame( hnd_t handle, cli_pic_t *pic, int frame )
  function free_filter (line 194) | static void free_filter( hnd_t handle )
  function init (line 202) | static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *...

FILE: filters/video/fix_vfr_pts.c
  type fix_vfr_pts_hnd_t (line 34) | typedef struct
  function init (line 51) | static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *...
  function get_frame (line 69) | static int get_frame( hnd_t handle, cli_pic_t *output, int frame )
  function release_frame (line 118) | static int release_frame( hnd_t handle, cli_pic_t *pic, int frame )
  function free_filter (line 127) | static void free_filter( hnd_t handle )

FILE: filters/video/internal.c
  function x264_cli_plane_copy (line 30) | void x264_cli_plane_copy( uint8_t *dst, int i_dst, uint8_t *src, int i_s...
  function x264_cli_pic_copy (line 40) | int x264_cli_pic_copy( cli_pic_t *out, cli_pic_t *in )

FILE: filters/video/resize.c
  function full_check (line 33) | static int full_check( video_info_t *info, x264_param_t *param )
  type frame_prop_t (line 53) | typedef struct
  type resizer_hnd_t (line 61) | typedef struct
  function help (line 82) | static void help( int longhelp )
  function convert_method_to_flag (line 114) | static uint32_t convert_method_to_flag( const char *name )
  function convert_csp_to_pix_fmt (line 144) | static int convert_csp_to_pix_fmt( int csp )
  function pix_number_of_planes (line 171) | static int pix_number_of_planes( const AVPixFmtDescriptor *pix_desc )
  function pick_closest_supported_csp (line 182) | static int pick_closest_supported_csp( int csp )
  function handle_opts (line 222) | static int handle_opts( const char * const *optlist, char **opts, video_...
  function init_sws_context (line 368) | static int init_sws_context( resizer_hnd_t *h )
  function check_resizer (line 396) | static int check_resizer( resizer_hnd_t *h, cli_pic_t *in )
  function init (line 418) | static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *...
  function get_frame (line 543) | static int get_frame( hnd_t handle, cli_pic_t *output, int frame )
  function release_frame (line 567) | static int release_frame( hnd_t handle, cli_pic_t *pic, int frame )
  function free_filter (line 573) | static void free_filter( hnd_t handle )
  function init (line 585) | static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *...

FILE: filters/video/select_every.c
  type selvry_hnd_t (line 33) | typedef struct
  function help (line 47) | static void help( int longhelp )
  function init (line 58) | static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *...
  function get_frame (line 129) | static int get_frame( hnd_t handle, cli_pic_t *output, int frame )
  function release_frame (line 143) | static int release_frame( hnd_t handle, cli_pic_t *pic, int frame )
  function free_filter (line 150) | static void free_filter( hnd_t handle )

FILE: filters/video/source.c
  type source_hnd_t (line 31) | typedef struct
  function init (line 40) | static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *...
  function get_frame (line 57) | static int get_frame( hnd_t handle, cli_pic_t *output, int frame )
  function release_frame (line 68) | static int release_frame( hnd_t handle, cli_pic_t *pic, int frame )
  function free_filter (line 76) | static void free_filter( hnd_t handle )

FILE: filters/video/video.c
  function register_vid_filter (line 30) | static void register_vid_filter( cli_vid_filter_t *new_filter )
  function x264_register_vid_filters (line 45) | void x264_register_vid_filters( void )
  function x264_init_vid_filter (line 65) | int x264_init_vid_filter( const char *name, hnd_t *handle, cli_vid_filte...
  function x264_vid_filter_help (line 78) | void x264_vid_filter_help( int longhelp )

FILE: filters/video/video.h
  type cli_vid_filter_t (line 32) | typedef struct cli_vid_filter_t cli_vid_filter_t;
  type cli_vid_filter_t (line 34) | struct cli_vid_filter_t

FILE: input/avs.c
  type avs_hnd_t (line 78) | typedef struct
  function custom_avs_load_library (line 120) | static int custom_avs_load_library( avs_hnd_t *h )
  function avs_build_filter_sequence (line 185) | static void avs_build_filter_sequence( char *filename_ext, const char *f...
  function AVS_Value (line 203) | static AVS_Value update_clip( avs_hnd_t *h, const AVS_VideoInfo **vi, AV...
  function get_avs_version (line 212) | static float get_avs_version( avs_hnd_t *h )
  function open_file (line 269) | static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t ...
  function picture_alloc (line 504) | static int picture_alloc( cli_pic_t *pic, hnd_t handle, int csp, int wid...
  function read_frame (line 521) | static int read_frame( cli_pic_t *pic, hnd_t handle, int i_frame )
  function release_frame (line 539) | static int release_frame( cli_pic_t *pic, hnd_t handle )
  function picture_clean (line 546) | static void picture_clean( cli_pic_t *pic, hnd_t handle )
  function close_file (line 551) | static int close_file( hnd_t handle )

FILE: input/ffms.c
  type ffms_hnd_t (line 39) | typedef struct
  function update_progress (line 49) | static int FFMS_CC update_progress( int64_t current, int64_t total, void...
  function handle_jpeg (line 67) | static int handle_jpeg( int csp, int *fullrange )
  function open_file (line 78) | static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t ...
  function picture_alloc (line 172) | static int picture_alloc( cli_pic_t *pic, hnd_t handle, int csp, int wid...
  function read_frame (line 181) | static int read_frame( cli_pic_t *pic, hnd_t handle, int i_frame )
  function picture_clean (line 210) | static void picture_clean( cli_pic_t *pic, hnd_t handle )
  function close_file (line 215) | static int close_file( hnd_t handle )

FILE: input/input.c
  function x264_cli_csp_is_invalid (line 54) | int x264_cli_csp_is_invalid( int csp )
  function x264_cli_csp_depth_factor (line 61) | int x264_cli_csp_depth_factor( int csp )
  function x264_cli_pic_plane_size (line 68) | int64_t x264_cli_pic_plane_size( int csp, int width, int height, int pla...
  function x264_cli_pic_size (line 79) | int64_t x264_cli_pic_size( int csp, int width, int height )
  function cli_pic_init_internal (line 90) | static int cli_pic_init_internal( cli_pic_t *pic, int csp, int width, in...
  function x264_cli_pic_alloc (line 120) | int x264_cli_pic_alloc( cli_pic_t *pic, int csp, int width, int height )
  function x264_cli_pic_alloc_aligned (line 125) | int x264_cli_pic_alloc_aligned( cli_pic_t *pic, int csp, int width, int ...
  function x264_cli_pic_init_noalloc (line 130) | int x264_cli_pic_init_noalloc( cli_pic_t *pic, int csp, int width, int h...
  function x264_cli_pic_clean (line 135) | void x264_cli_pic_clean( cli_pic_t *pic )
  function x264_cli_csp_t (line 142) | const x264_cli_csp_t *x264_cli_get_csp( int csp )
  function x264_cli_mmap_init (line 150) | int x264_cli_mmap_init( cli_mmap_t *h, FILE *fh )
  function x264_cli_munmap (line 254) | int x264_cli_munmap( cli_mmap_t *h, void *addr, int64_t size )
  function x264_cli_mmap_close (line 269) | void x264_cli_mmap_close( cli_mmap_t *h )

FILE: input/input.h
  type cli_input_opt_t (line 38) | typedef struct
  type video_info_t (line 54) | typedef struct
  type cli_image_t (line 74) | typedef struct
  type cli_pic_t (line 84) | typedef struct
  type cli_input_t (line 92) | typedef struct
  type x264_cli_csp_t (line 117) | typedef struct
  type cli_mmap_t (line 139) | typedef struct

FILE: input/lavf.c
  type lavf_hnd_t (line 40) | typedef struct
  function handle_jpeg (line 53) | static int handle_jpeg( int csp, int *fullrange )
  function AVCodecContext (line 64) | static AVCodecContext *codec_from_stream( AVStream *stream )
  function read_frame_internal (line 83) | static int read_frame_internal( cli_pic_t *p_pic, lavf_hnd_t *h, int i_f...
  function open_file (line 171) | static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t ...
  function picture_alloc (line 250) | static int picture_alloc( cli_pic_t *pic, hnd_t handle, int csp, int wid...
  function read_frame (line 259) | static int read_frame( cli_pic_t *pic, hnd_t handle, int i_frame )
  function picture_clean (line 264) | static void picture_clean( cli_pic_t *pic, hnd_t handle )
  function close_file (line 269) | static int close_file( hnd_t handle )

FILE: input/raw.c
  type raw_hnd_t (line 32) | typedef struct
  function open_file (line 43) | static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t ...
  function read_frame_internal (line 113) | static int read_frame_internal( cli_pic_t *pic, raw_hnd_t *h, int bit_de...
  function read_frame (line 141) | static int read_frame( cli_pic_t *pic, hnd_t handle, int i_frame )
  function release_frame (line 171) | static int release_frame( cli_pic_t *pic, hnd_t handle )
  function picture_alloc (line 179) | static int picture_alloc( cli_pic_t *pic, hnd_t handle, int csp, int wid...
  function picture_clean (line 185) | static void picture_clean( cli_pic_t *pic, hnd_t handle )
  function close_file (line 194) | static int close_file( hnd_t handle )

FILE: input/thread.c
  type thread_hnd_t (line 32) | typedef struct
  type thread_input_arg_t (line 43) | typedef struct thread_input_arg_t
  function open_file (line 51) | static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t ...
  function read_frame_thread_int (line 73) | static void read_frame_thread_int( thread_input_arg_t *i )
  function read_frame (line 78) | static int read_frame( cli_pic_t *p_pic, hnd_t handle, int i_frame )
  function release_frame (line 111) | static int release_frame( cli_pic_t *pic, hnd_t handle )
  function picture_alloc (line 119) | static int picture_alloc( cli_pic_t *pic, hnd_t handle, int csp, int wid...
  function picture_clean (line 125) | static void picture_clean( cli_pic_t *pic, hnd_t handle )
  function close_file (line 131) | static int close_file( hnd_t handle )

FILE: input/timecode.c
  type timecode_hnd_t (line 30) | typedef struct
  function sigexp10 (line 44) | static inline double sigexp10( double value, double *exponent )
  function correct_fps (line 54) | static double correct_fps( double fps, timecode_hnd_t *h )
  function try_mkv_timebase_den (line 79) | static int try_mkv_timebase_den( double *fpss, timecode_hnd_t *h, int lo...
  function parse_tcfile (line 96) | static int parse_tcfile( FILE *tcfile_in, timecode_hnd_t *h, video_info_...
  function open_file (line 344) | static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t ...
  function get_frame_pts (line 397) | static int64_t get_frame_pts( timecode_hnd_t *h, int frame, int real_fra...
  function read_frame (line 417) | static int read_frame( cli_pic_t *pic, hnd_t handle, int frame )
  function release_frame (line 429) | static int release_frame( cli_pic_t *pic, hnd_t handle )
  function picture_alloc (line 437) | static int picture_alloc( cli_pic_t *pic, hnd_t handle, int csp, int wid...
  function picture_clean (line 443) | static void picture_clean( cli_pic_t *pic, hnd_t handle )
  function close_file (line 449) | static int close_file( hnd_t handle )

FILE: input/y4m.c
  type y4m_hnd_t (line 31) | typedef struct
  function parse_csp_and_depth (line 48) | static int parse_csp_and_depth( char *csp_name, int *bit_depth )
  function open_file (line 70) | static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t ...
  function read_frame_internal (line 249) | static int read_frame_internal( cli_pic_t *pic, y4m_hnd_t *h, int bit_de...
  function read_frame (line 305) | static int read_frame( cli_pic_t *pic, hnd_t handle, int i_frame )
  function release_frame (line 335) | static int release_frame( cli_pic_t *pic, hnd_t handle )
  function picture_alloc (line 343) | static int picture_alloc( cli_pic_t *pic, hnd_t handle, int csp, int wid...
  function picture_clean (line 349) | static void picture_clean( cli_pic_t *pic, hnd_t handle )
  function close_file (line 358) | static int close_file( hnd_t handle )

FILE: output/flv.c
  type flv_hnd_t (line 35) | typedef struct
  function write_header (line 65) | static int write_header( flv_buffer *c )
  function open_file (line 76) | static int open_file( char *psz_filename, hnd_t *p_handle, cli_output_op...
  function set_param (line 103) | static int set_param( hnd_t handle, x264_param_t *p_param )
  function write_headers (line 169) | static int write_headers( hnd_t handle, x264_nal_t *p_nal )
  function write_frame (line 227) | static int write_frame( hnd_t handle, uint8_t *p_nalu, int i_size, x264_...
  function rewrite_amf_double (line 304) | static int rewrite_amf_double( FILE *fp, uint64_t position, double value )
  function close_file (line 317) | static int close_file( hnd_t handle, int64_t largest_pts, int64_t second...

FILE: output/flv_bytestream.c
  function flv_dbl2int (line 29) | uint64_t flv_dbl2int( double value )
  function flv_put_byte (line 36) | void flv_put_byte( flv_buffer *c, uint8_t b )
  function flv_put_be32 (line 41) | void flv_put_be32( flv_buffer *c, uint32_t val )
  function flv_put_be64 (line 49) | void flv_put_be64( flv_buffer *c, uint64_t val )
  function flv_put_be16 (line 55) | void flv_put_be16( flv_buffer *c, uint16_t val )
  function flv_put_be24 (line 61) | void flv_put_be24( flv_buffer *c, uint32_t val )
  function flv_put_tag (line 67) | void flv_put_tag( flv_buffer *c, const char *tag )
  function flv_put_amf_string (line 73) | void flv_put_amf_string( flv_buffer *c, const char *str )
  function flv_put_amf_double (line 80) | void flv_put_amf_double( flv_buffer *c, double d )
  function flv_buffer (line 88) | flv_buffer *flv_create_writer( const char *filename )
  function flv_append_data (line 107) | int flv_append_data( flv_buffer *c, uint8_t *data, unsigned size )
  function flv_rewrite_amf_be24 (line 133) | void flv_rewrite_amf_be24( flv_buffer *c, unsigned length, unsigned start )
  function flv_flush_data (line 140) | int flv_flush_data( flv_buffer *c )

FILE: output/flv_bytestream.h
  type AMFDataType (line 97) | typedef enum
  type flv_buffer (line 114) | typedef struct flv_buffer

FILE: output/matroska.c
  type mkv_hnd_t (line 29) | typedef struct
  function open_file (line 46) | static int open_file( char *psz_filename, hnd_t *p_handle, cli_output_op...
  function set_param (line 70) | static int set_param( hnd_t handle, x264_param_t *p_param )
  function write_headers (line 116) | static int write_headers( hnd_t handle, x264_nal_t *p_nal )
  function write_frame (line 182) | static int write_frame( hnd_t handle, uint8_t *p_nalu, int i_size, x264_...
  function close_file (line 206) | static int close_file( hnd_t handle, int64_t largest_pts, int64_t second...

FILE: output/matroska_ebml.c
  type mk_context (line 36) | struct mk_context
  type mk_context (line 46) | typedef struct mk_context mk_context;
  type mk_writer (line 48) | struct mk_writer
  function mk_context (line 66) | static mk_context *mk_create_context( mk_writer *w, mk_context *parent, ...
  function mk_append_context_data (line 95) | static int mk_append_context_data( mk_context *c, const void *data, unsi...
  function mk_write_id (line 121) | static int mk_write_id( mk_context *c, unsigned id )
  function mk_write_size (line 134) | static int mk_write_size( mk_context *c, unsigned size )
  function mk_flush_context_id (line 161) | static int mk_flush_context_id( mk_context *c )
  function mk_flush_context_data (line 176) | static int mk_flush_context_data( mk_context *c )
  function mk_close_context (line 191) | static int mk_close_context( mk_context *c, unsigned *off )
  function mk_destroy_contexts (line 213) | static void mk_destroy_contexts( mk_writer *w )
  function mk_write_string (line 234) | static int mk_write_string( mk_context *c, unsigned id, const char *str )
  function mk_write_bin (line 244) | static int mk_write_bin( mk_context *c, unsigned id, const void *data, u...
  function mk_write_uint (line 252) | static int mk_write_uint( mk_context *c, unsigned id, uint64_t ui )
  function mk_write_float_raw (line 265) | static int mk_write_float_raw( mk_context *c, float f )
  function mk_write_float (line 283) | static int mk_write_float( mk_context *c, unsigned id, float f )
  function mk_writer (line 291) | mk_writer *mk_create_writer( const char *filename )
  function mk_write_header (line 320) | int mk_write_header( mk_writer *w, const char *writing_app,
  function mk_close_cluster (line 397) | static int mk_close_cluster( mk_writer *w )
  function mk_flush_frame (line 407) | static int mk_flush_frame( mk_writer *w )
  function mk_start_frame (line 456) | int mk_start_frame( mk_writer *w )
  function mk_set_frame_flags (line 468) | int mk_set_frame_flags( mk_writer *w, int64_t timestamp, int keyframe, i...
  function mk_add_frame_data (line 483) | int mk_add_frame_data( mk_writer *w, const void *data, unsigned size )
  function mk_close (line 495) | int mk_close( mk_writer *w, int64_t last_delta )

FILE: output/matroska_ebml.h
  type mk_writer (line 35) | typedef struct mk_writer mk_writer;

FILE: output/mp4.c
  type mp4_hnd_t (line 30) | typedef struct
  function recompute_bitrate_mp4 (line 48) | static void recompute_bitrate_mp4( GF_ISOFile *p_file, int i_track )
  function close_file (line 101) | static int close_file( hnd_t handle, int64_t largest_pts, int64_t second...
  function open_file (line 166) | static int open_file( char *psz_filename, hnd_t *p_handle, cli_output_op...
  function set_param (line 196) | static int set_param( hnd_t handle, x264_param_t *p_param )
  function check_buffer (line 243) | static int check_buffer( mp4_hnd_t *p_mp4, int needed_size )
  function write_headers (line 256) | static int write_headers( hnd_t handle, x264_nal_t *p_nal )
  function write_frame (line 308) | static int write_frame( hnd_t handle, uint8_t *p_nalu, int i_size, x264_...

FILE: output/mp4_lsmash.c
  type mp4_hnd_t (line 66) | typedef struct
  function remove_mp4_hnd (line 93) | static void remove_mp4_hnd( hnd_t handle )
  function close_file (line 107) | static int close_file( hnd_t handle, int64_t largest_pts, int64_t second...
  function open_file (line 163) | static int open_file( char *psz_filename, hnd_t *p_handle, cli_output_op...
  function set_param (line 202) | static int set_param( hnd_t handle, x264_param_t *p_param )
  function write_headers (line 294) | static int write_headers( hnd_t handle, x264_nal_t *p_nal )
  function write_frame (line 357) | static int write_frame( hnd_t handle, uint8_t *p_nalu, int i_size, x264_...

FILE: output/output.h
  type cli_output_opt_t (line 32) | typedef struct
  type cli_output_t (line 37) | typedef struct

FILE: output/raw.c
  function open_file (line 29) | static int open_file( char *psz_filename, hnd_t *p_handle, cli_output_op...
  function set_param (line 39) | static int set_param( hnd_t handle, x264_param_t *p_param )
  function write_headers (line 44) | static int write_headers( hnd_t handle, x264_nal_t *p_nal )
  function write_frame (line 53) | static int write_frame( hnd_t handle, uint8_t *p_nalu, int i_size, x264_...
  function close_file (line 60) | static int close_file( hnd_t handle, int64_t largest_pts, int64_t second...

FILE: tools/checkasm.c
  type bench_t (line 74) | typedef struct
  type bench_func_t (line 82) | typedef struct
  function read_time (line 103) | static inline uint32_t read_time(void)
  function bench_t (line 129) | static bench_t* get_bench( const char *name, uint32_t cpu )
  function cmp_nop (line 144) | static int cmp_nop( const void *a, const void *b )
  function cmp_bench (line 149) | static int cmp_bench( const void *a, const void *b )
  function print_bench (line 165) | static void print_bench(void)
  function check_pixel (line 369) | static int check_pixel( uint32_t cpu_ref, uint32_t cpu_new )
  function check_dct (line 898) | static int check_dct( uint32_t cpu_ref, uint32_t cpu_new )
  function check_mc (line 1234) | static int check_mc( uint32_t cpu_ref, uint32_t cpu_new )
  type plane_spec (line 1498) | struct plane_spec {
  function check_deblock (line 1966) | static int check_deblock( uint32_t cpu_ref, uint32_t cpu_new )
  function check_bitstream (line 2827) | static int check_bitstream( uint32_t cpu_ref, uint32_t cpu_new )
  function check_all_funcs (line 2877) | static int check_all_funcs( uint32_t cpu_ref, uint32_t cpu_new )
  function add_flags (line 2889) | static int add_flags( uint32_t *cpu_ref, uint32_t *cpu_new, uint32_t fla...
  function check_all_flags (line 2903) | static int check_all_flags( void )
  function REALIGN_STACK (line 3040) | REALIGN_STACK int main( int argc, char **argv )

FILE: tools/digress/__init__.py
  function digress (line 7) | def digress(fixture):

FILE: tools/digress/cli.py
  function dispatchable (line 15) | def dispatchable(func):
  class Dispatcher (line 22) | class Dispatcher(object):
    method __init__ (line 26) | def __init__(self, fixture):
    method _monkey_print_help (line 30) | def _monkey_print_help(self, optparse, *args, **kwargs):
    method _enable_flush (line 53) | def _enable_flush(self):
    method _populate_parser (line 56) | def _populate_parser(self):
    method _select_cases (line 86) | def _select_cases(self, *cases):
    method _get_commands (line 89) | def _get_commands(self):
    method _run_command (line 98) | def _run_command(self, name, *args):
    method pre_dispatch (line 131) | def pre_dispatch(self):
    method dispatch (line 134) | def dispatch(self):

FILE: tools/digress/comparers.py
  function compare_direct (line 10) | def compare_direct(value_a, value_b):
  function compare_pass (line 14) | def compare_pass(value_a, value_b):
  function compare_tolerance (line 19) | def compare_tolerance(tolerance):
  function compare_files (line 29) | def compare_files(file_a, file_b):

FILE: tools/digress/errors.py
  class DigressError (line 5) | class DigressError(Exception):
  class NoSuchTestError (line 10) | class NoSuchTestError(DigressError):
  class DisabledTestError (line 15) | class DisabledTestError(DigressError):
  class SkippedTestError (line 20) | class SkippedTestError(DigressError):
  class DisabledCaseError (line 25) | class DisabledCaseError(DigressError):
  class SkippedCaseError (line 30) | class SkippedCaseError(DigressError):
  class FailedTestError (line 35) | class FailedTestError(DigressError):
  class ComparisonError (line 40) | class ComparisonError(DigressError):
  class IncomparableError (line 45) | class IncomparableError(DigressError):
  class AlreadyRunError (line 50) | class AlreadyRunError(DigressError):
  class SCMError (line 55) | class SCMError(DigressError):
    method __init__ (line 59) | def __init__(self, message):
    method __str__ (line 62) | def __str__(self):

FILE: tools/digress/scm/dummy.py
  function checkout (line 7) | def checkout(revision):
  function current_rev (line 13) | def current_rev():
  function revisions (line 19) | def revisions(rev_a, rev_b):
  function stash (line 25) | def stash():
  function unstash (line 31) | def unstash():
  function bisect (line 37) | def bisect(command, revision):

FILE: tools/digress/scm/git.py
  function checkout (line 12) | def checkout(revision):
  function rev_parse (line 27) | def rev_parse(ref):
  function current_rev (line 39) | def current_rev():
  function current_branch (line 45) | def current_branch():
  function revisions (line 61) | def revisions(rev_a, rev_b):
  function stash (line 76) | def stash():
  function unstash (line 91) | def unstash():
  function bisect (line 98) | def bisect(*args):
  function dirty (line 108) | def dirty():

FILE: tools/digress/testing.py
  class depends (line 27) | class depends(object):
    method __init__ (line 31) | def __init__(self, *test_names):
    method __call__ (line 34) | def __call__(self, func):
  class _skipped (line 38) | class _skipped(object):
    method __init__ (line 42) | def __init__(self, reason=""):
    method __call__ (line 45) | def __call__(self, func):
  class disabled (line 51) | class disabled(object):
    method __init__ (line 55) | def __init__(self, reason=""):
    method __call__ (line 58) | def __call__(self, func):
  class comparer (line 64) | class comparer(object):
    method __init__ (line 68) | def __init__(self, comparer_):
    method __call__ (line 71) | def __call__(self, func):
  class Fixture (line 75) | class Fixture(object):
    method _skip_case (line 81) | def _skip_case(self, case, depend):
    method _run_case (line 90) | def _run_case(self, case, results):
    method flush (line 111) | def flush(self, revision=None):
    method run (line 140) | def run(self, revision=None):
    method bisect (line 214) | def bisect(self, good_rev, bad_rev=None):
    method multicompare (line 296) | def multicompare(self, rev_a=None, rev_b=None, mode="waterfall"):
    method compare (line 404) | def compare(self, rev_a, rev_b=None):
    method list (line 444) | def list(self):
    method register_case (line 453) | def register_case(self, case):
  class Case (line 457) | class Case(object):
    method _get_test_by_name (line 461) | def _get_test_by_name(self, test_name):
    method _run_test (line 466) | def _run_test(self, test, results):
    method run (line 560) | def run(self):

FILE: tools/test_x264.py
  function compare_yuv_output (line 54) | def compare_yuv_output(width, height):
  function program_exists (line 138) | def program_exists(program):
  class x264 (line 155) | class x264(Fixture):
  class Compile (line 158) | class Compile(Case):
    method test_configure (line 160) | def test_configure(self):
    method test_make (line 176) | def test_make(self):
  function _YUVOutputComparisonFactory (line 188) | def _YUVOutputComparisonFactory():
  class Regression (line 292) | class Regression(Case):
    method __init__ (line 298) | def __init__(self):
    method test_psnr (line 302) | def test_psnr(self):
    method test_ssim (line 327) | def test_ssim(self):
  function _generate_random_commandline (line 352) | def _generate_random_commandline():
  class Dispatcher (line 367) | class Dispatcher(_Dispatcher):
    method _populate_parser (line 374) | def _populate_parser(self):
    method pre_dispatch (line 453) | def pre_dispatch(self):

FILE: x264.c
  function x264_cli_set_console_title (line 84) | void x264_cli_set_console_title( const char *title )
  function get_argv_utf8 (line 92) | static int get_argv_utf8( int *argc_ptr, char ***argv_ptr )
  function sigint_handler (line 124) | static void sigint_handler( int a )
  type cli_opt_t (line 129) | typedef struct {
  type cli_pulldown_t (line 223) | typedef struct
  type pulldown_type_e (line 230) | enum pulldown_type_e
  function x264_cli_log (line 270) | void x264_cli_log( const char *name, int i_level, const char *fmt, ... )
  function x264_cli_printf (line 300) | void x264_cli_printf( int i_level, const char *fmt, ... )
  function print_version_info (line 310) | static void print_version_info( void )
  function REALIGN_STACK (line 362) | REALIGN_STACK int main( int argc, char **argv )
  function print_csp_name_internal (line 444) | static void print_csp_name_internal( const char *name, size_t *line_len,...
  function print_csp_names (line 464) | static void print_csp_names( int longhelp )
  function help (line 484) | static void help( x264_param_t *defaults, int longhelp )
  type OptionsOPT (line 979) | typedef enum
  type option (line 1016) | struct option
  function select_output (line 1189) | static int select_output( const char *muxer, char *filename, x264_param_...
  function select_input (line 1228) | static int select_input( const char *demuxer, char *used_demuxer, char *...
  function init_vid_filters (line 1305) | static int init_vid_filters( char *sequence, hnd_t *handle, video_info_t...
  function parse_enum_name (line 1368) | static int parse_enum_name( const char *arg, const char * const *names, ...
  function parse_enum_value (line 1379) | static int parse_enum_value( const char *arg, const char * const *names,...
  function parse (line 1390) | static int parse( int argc, char **argv, x264_param_t *param, cli_opt_t ...
  function parse_qpfile (line 1805) | static void parse_qpfile( cli_opt_t *opt, x264_picture_t *pic, int i_fra...
  function encode_frame (line 1855) | static int encode_frame( x264_t *h, hnd_t hout, x264_picture_t *pic, int...
  function print_status (line 1875) | static int64_t print_status( int64_t i_start, int64_t i_previous, int i_...
  function convert_cli_to_lib_pic (line 1903) | static void convert_cli_to_lib_pic( x264_picture_t *lib, cli_pic_t *cli )
  function encode (line 1923) | static int encode( x264_param_t *param, cli_opt_t *opt )

FILE: x264.h
  type x264_t (line 80) | typedef struct x264_t x264_t;
  type nal_unit_type_e (line 86) | enum nal_unit_type_e
  type nal_priority_e (line 101) | enum nal_priority_e
  type x264_nal_t (line 114) | typedef struct x264_nal_t
  type x264_zone_t (line 306) | typedef struct x264_zone_t
  type x264_param_t (line 315) | typedef struct x264_param_t
  type x264_level_t (line 633) | typedef struct x264_level_t
  type pic_struct_e (line 757) | enum pic_struct_e
  type x264_hrd_t (line 770) | typedef struct x264_hrd_t
  type x264_sei_payload_t (line 788) | typedef struct x264_sei_payload_t
  type x264_sei_t (line 795) | typedef struct x264_sei_t
  type x264_image_t (line 803) | typedef struct x264_image_t
  type x264_image_properties_t (line 811) | typedef struct x264_image_properties_t
  type x264_picture_t (line 867) | typedef struct x264_picture_t

FILE: x264cli.h
  function gcd (line 50) | static inline uint64_t gcd( uint64_t a, uint64_t b )
  function lcm (line 62) | static inline uint64_t lcm( uint64_t a, uint64_t b )
  type range_enum (line 99) | typedef enum

FILE: x264dll.c
  function BOOL (line 30) | BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvRese...
Condensed preview — 270 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (6,118K chars).
[
  {
    "path": ".gitignore",
    "chars": 373,
    "preview": "*~\n*.a\n*.d\n*.diff\n*.orig\n*.rej\n*.dll*\n*.exe\n*.def\n*.lib\n*.pdb\n*.mo\n*.o\n*.patch\n*.pc\n*.pot\n*.so*\n*.dylib\n.*.swp\n.depend\n."
  },
  {
    "path": ".gitlab-ci.yml",
    "chars": 10362,
    "preview": "stages:\n    - build\n    - test\n    - release\n\n.variables-debian-amd64: &variables-debian-amd64\n    _TRIPLET: \"\"\n    _PLA"
  },
  {
    "path": "AUTHORS",
    "chars": 1999,
    "preview": "# Contributors to x264\n#\n# The format of this file was inspired by the Linux kernel CREDITS file.\n# Authors are listed a"
  },
  {
    "path": "COPYING",
    "chars": 17992,
    "preview": "\t\t    GNU GENERAL PUBLIC LICENSE\n\t\t       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc."
  },
  {
    "path": "Makefile",
    "chars": 13724,
    "preview": "# Makefile\n\ninclude config.mak\n\nvpath %.c $(SRCPATH)\nvpath %.h $(SRCPATH)\nvpath %.S $(SRCPATH)\nvpath %.asm $(SRCPATH)\nvp"
  },
  {
    "path": "autocomplete.c",
    "chars": 10641,
    "preview": "/*****************************************************************************\n * autocomplete: x264cli shell autocomple"
  },
  {
    "path": "common/aarch64/asm-offsets.c",
    "chars": 2510,
    "preview": "/*****************************************************************************\n * asm-offsets.c: check asm offsets for a"
  },
  {
    "path": "common/aarch64/asm-offsets.h",
    "chars": 1674,
    "preview": "/*****************************************************************************\n * asm-offsets.h: asm offsets for aarch64"
  },
  {
    "path": "common/aarch64/asm.S",
    "chars": 9054,
    "preview": "/*****************************************************************************\n * asm.S: AArch64 utility macros\n *******"
  },
  {
    "path": "common/aarch64/bitstream-a.S",
    "chars": 2637,
    "preview": "/*****************************************************************************\n * bitstream-a.S: aarch64 bitstream funct"
  },
  {
    "path": "common/aarch64/bitstream.h",
    "chars": 1439,
    "preview": "/*****************************************************************************\n * bitstream.h: aarch64 bitstream functio"
  },
  {
    "path": "common/aarch64/cabac-a.S",
    "chars": 4405,
    "preview": "/*****************************************************************************\n * cabac-a.S: aarch64 cabac\n ************"
  },
  {
    "path": "common/aarch64/dct-a-common.S",
    "chars": 1727,
    "preview": "/****************************************************************************\n * dct-a-common.S: aarch64 transform and z"
  },
  {
    "path": "common/aarch64/dct-a-sve.S",
    "chars": 3257,
    "preview": "/****************************************************************************\n * dct-a-sve.S: aarch64 transform and zigz"
  },
  {
    "path": "common/aarch64/dct-a-sve2.S",
    "chars": 3009,
    "preview": "/****************************************************************************\n * dct-a-sve2.S: aarch64 transform and zig"
  },
  {
    "path": "common/aarch64/dct-a.S",
    "chars": 33080,
    "preview": "/****************************************************************************\n * dct-a.S: aarch64 transform and zigzag\n "
  },
  {
    "path": "common/aarch64/dct.h",
    "chars": 5783,
    "preview": "/*****************************************************************************\n * dct.h: aarch64 transform and zigzag\n *"
  },
  {
    "path": "common/aarch64/deblock-a-common.S",
    "chars": 1731,
    "preview": "/*****************************************************************************\n * deblock-a-common.S: aarch64 deblocking"
  },
  {
    "path": "common/aarch64/deblock-a-sve.S",
    "chars": 3691,
    "preview": "/*****************************************************************************\n * deblock-a-sve.S: aarch64 deblocking\n *"
  },
  {
    "path": "common/aarch64/deblock-a.S",
    "chars": 29163,
    "preview": "/*****************************************************************************\n * deblock.S: aarch64 deblocking\n *******"
  },
  {
    "path": "common/aarch64/deblock.h",
    "chars": 3921,
    "preview": "/*****************************************************************************\n * deblock.h: aarch64 deblocking\n *******"
  },
  {
    "path": "common/aarch64/mc-a-common.S",
    "chars": 2207,
    "preview": "/****************************************************************************\n * mc-a-common.S: aarch64 motion compensat"
  },
  {
    "path": "common/aarch64/mc-a-sve.S",
    "chars": 3227,
    "preview": "/*****************************************************************************\n * mc-a-sve.S: aarch64 motion compensatio"
  },
  {
    "path": "common/aarch64/mc-a.S",
    "chars": 115095,
    "preview": "/*****************************************************************************\n * mc.S: aarch64 motion compensation\n ***"
  },
  {
    "path": "common/aarch64/mc-c.c",
    "chars": 18010,
    "preview": "/*****************************************************************************\n * mc-c.c: aarch64 motion compensation\n *"
  },
  {
    "path": "common/aarch64/mc.h",
    "chars": 1410,
    "preview": "/*****************************************************************************\n * mc.h: aarch64 motion compensation\n ***"
  },
  {
    "path": "common/aarch64/pixel-a-common.S",
    "chars": 1829,
    "preview": "/****************************************************************************\n * pixel-a-common.S: aarch64 pixel metrics"
  },
  {
    "path": "common/aarch64/pixel-a-sve.S",
    "chars": 15335,
    "preview": "/*****************************************************************************\n * pixel-a-sve.S: aarch64 pixel metrics\n "
  },
  {
    "path": "common/aarch64/pixel-a.S",
    "chars": 87049,
    "preview": "/*****************************************************************************\n * pixel.S: aarch64 pixel metrics\n ******"
  },
  {
    "path": "common/aarch64/pixel.h",
    "chars": 10333,
    "preview": "/*****************************************************************************\n * pixel.h: aarch64 pixel metrics\n ******"
  },
  {
    "path": "common/aarch64/predict-a.S",
    "chars": 28714,
    "preview": "/*****************************************************************************\n * predict.S: aarch64 intra prediction\n *"
  },
  {
    "path": "common/aarch64/predict-c.c",
    "chars": 4214,
    "preview": "/*****************************************************************************\n * predict.c: aarch64 intra prediction\n *"
  },
  {
    "path": "common/aarch64/predict.h",
    "chars": 6585,
    "preview": "/*****************************************************************************\n * predict.h: aarch64 intra prediction\n *"
  },
  {
    "path": "common/aarch64/quant-a.S",
    "chars": 32124,
    "preview": "/****************************************************************************\n * quant.S: arm quantization and level-run"
  },
  {
    "path": "common/aarch64/quant.h",
    "chars": 4596,
    "preview": "/*****************************************************************************\n * quant.h: arm quantization and level-ru"
  },
  {
    "path": "common/arm/asm.S",
    "chars": 5886,
    "preview": "/*****************************************************************************\n * asm.S: arm utility macros\n ***********"
  },
  {
    "path": "common/arm/bitstream-a.S",
    "chars": 2598,
    "preview": "/*****************************************************************************\n * bitstream-a.S: arm bitstream functions"
  },
  {
    "path": "common/arm/bitstream.h",
    "chars": 1427,
    "preview": "/*****************************************************************************\n * bitstream.h: arm bitstream functions\n "
  },
  {
    "path": "common/arm/cpu-a.S",
    "chars": 3492,
    "preview": "/*****************************************************************************\n * cpu-a.S: arm cpu detection\n **********"
  },
  {
    "path": "common/arm/dct-a.S",
    "chars": 24178,
    "preview": "/****************************************************************************\n * dct-a.S: arm transform and zigzag\n ****"
  },
  {
    "path": "common/arm/dct.h",
    "chars": 3559,
    "preview": "/*****************************************************************************\n * dct.h: arm transform and zigzag\n *****"
  },
  {
    "path": "common/arm/deblock-a.S",
    "chars": 25097,
    "preview": "/*****************************************************************************\n * deblock.S: arm deblocking\n ***********"
  },
  {
    "path": "common/arm/deblock.h",
    "chars": 3739,
    "preview": "/*****************************************************************************\n * deblock.h: arm deblocking\n ***********"
  },
  {
    "path": "common/arm/mc-a.S",
    "chars": 55663,
    "preview": "/*****************************************************************************\n * mc.S: arm motion compensation\n *******"
  },
  {
    "path": "common/arm/mc-c.c",
    "chars": 17458,
    "preview": "/*****************************************************************************\n * mc-c.c: arm motion compensation\n *****"
  },
  {
    "path": "common/arm/mc.h",
    "chars": 1383,
    "preview": "/*****************************************************************************\n * mc.h: arm motion compensation\n *******"
  },
  {
    "path": "common/arm/pixel-a.S",
    "chars": 40408,
    "preview": "/*****************************************************************************\n * pixel.S: arm pixel metrics\n **********"
  },
  {
    "path": "common/arm/pixel.h",
    "chars": 9406,
    "preview": "/*****************************************************************************\n * pixel.h: arm pixel metrics\n **********"
  },
  {
    "path": "common/arm/predict-a.S",
    "chars": 22113,
    "preview": "/*****************************************************************************\n * predict.S: arm intra prediction\n *****"
  },
  {
    "path": "common/arm/predict-c.c",
    "chars": 3965,
    "preview": "/*****************************************************************************\n * predict.c: arm intra prediction\n *****"
  },
  {
    "path": "common/arm/predict.h",
    "chars": 5797,
    "preview": "/*****************************************************************************\n * predict.h: arm intra prediction\n *****"
  },
  {
    "path": "common/arm/quant-a.S",
    "chars": 15171,
    "preview": "/****************************************************************************\n * quant.S: arm quantization and level-run"
  },
  {
    "path": "common/arm/quant.h",
    "chars": 3530,
    "preview": "/*****************************************************************************\n * quant.h: arm quantization and level-ru"
  },
  {
    "path": "common/base.c",
    "chars": 55348,
    "preview": "/*****************************************************************************\n * base.c: misc common functions (bit dep"
  },
  {
    "path": "common/base.h",
    "chars": 11521,
    "preview": "/*****************************************************************************\n * base.h: misc common functions (bit dep"
  },
  {
    "path": "common/bitstream.c",
    "chars": 5493,
    "preview": "/*****************************************************************************\n * bitstream.c: bitstream writing\n ******"
  },
  {
    "path": "common/bitstream.h",
    "chars": 8957,
    "preview": "/*****************************************************************************\n * bitstream.h: bitstream writing\n ******"
  },
  {
    "path": "common/cabac.c",
    "chars": 6131,
    "preview": "/*****************************************************************************\n * cabac.c: arithmetic coder\n ***********"
  },
  {
    "path": "common/cabac.h",
    "chars": 5118,
    "preview": "/*****************************************************************************\n * cabac.h: arithmetic coder\n ***********"
  },
  {
    "path": "common/common.c",
    "chars": 1836,
    "preview": "/*****************************************************************************\n * common.c: misc common functions\n *****"
  },
  {
    "path": "common/common.h",
    "chars": 28904,
    "preview": "/*****************************************************************************\n * common.h: misc common functions\n *****"
  },
  {
    "path": "common/cpu.c",
    "chars": 19411,
    "preview": "/*****************************************************************************\n * cpu.c: cpu detection\n ****************"
  },
  {
    "path": "common/cpu.h",
    "chars": 2151,
    "preview": "/*****************************************************************************\n * cpu.h: cpu detection\n ****************"
  },
  {
    "path": "common/dct.c",
    "chars": 37694,
    "preview": "/*****************************************************************************\n * dct.c: transform and zigzag\n *********"
  },
  {
    "path": "common/dct.h",
    "chars": 3279,
    "preview": "/*****************************************************************************\n * dct.h: transform and zigzag\n *********"
  },
  {
    "path": "common/deblock.c",
    "chars": 36007,
    "preview": "/*****************************************************************************\n * deblock.c: deblocking\n ***************"
  },
  {
    "path": "common/frame.c",
    "chars": 32892,
    "preview": "/*****************************************************************************\n * frame.c: frame handling\n *************"
  },
  {
    "path": "common/frame.h",
    "chars": 13019,
    "preview": "/*****************************************************************************\n * frame.h: frame handling\n *************"
  },
  {
    "path": "common/loongarch/dct-a.S",
    "chars": 67692,
    "preview": "/*****************************************************************************\n * dct-a.S: LoongArch transform and zigza"
  },
  {
    "path": "common/loongarch/dct.h",
    "chars": 4953,
    "preview": "/*****************************************************************************\n * dct.h: loongarch transform and zigzag\n"
  },
  {
    "path": "common/loongarch/deblock-a.S",
    "chars": 57891,
    "preview": "/*****************************************************************************\n * deblock-a.S: loongarch deblock functio"
  },
  {
    "path": "common/loongarch/deblock.h",
    "chars": 2975,
    "preview": "/*****************************************************************************\n * deblock.h: loongarch deblock\n ********"
  },
  {
    "path": "common/loongarch/loongson_asm.S",
    "chars": 22216,
    "preview": "/*********************************************************************\n * Copyright (c) 2022-2024 Loongson Technology Co"
  },
  {
    "path": "common/loongarch/loongson_util.S",
    "chars": 1734,
    "preview": "/*****************************************************************************\n * loongson_util.S: loongson utility macr"
  },
  {
    "path": "common/loongarch/mc-a.S",
    "chars": 97931,
    "preview": "/*****************************************************************************\n * mc-a.S: LoongArch motion compensation\n"
  },
  {
    "path": "common/loongarch/mc-c.c",
    "chars": 14913,
    "preview": "/*****************************************************************************\n * mc-c.c: loongarch motion compensation\n"
  },
  {
    "path": "common/loongarch/mc.h",
    "chars": 13032,
    "preview": "/*****************************************************************************\n * mc.h: loongarch motion compensation\n *"
  },
  {
    "path": "common/loongarch/pixel-a.S",
    "chars": 128184,
    "preview": "/*****************************************************************************\n * pixel-a.S: LoongArch pixel metrics\n **"
  },
  {
    "path": "common/loongarch/pixel-c.c",
    "chars": 9849,
    "preview": "/*****************************************************************************\n * pixel-c.c: loongarch pixel metrics\n **"
  },
  {
    "path": "common/loongarch/pixel.h",
    "chars": 21096,
    "preview": "/*****************************************************************************\n * pixel.h: loongarch pixel metrics\n ****"
  },
  {
    "path": "common/loongarch/predict-a.S",
    "chars": 51573,
    "preview": "/*****************************************************************************\n * predict-a.S: loongarch predict functio"
  },
  {
    "path": "common/loongarch/predict-c.c",
    "chars": 4187,
    "preview": "/*****************************************************************************\n * predict-c.c: loongarch intra predictio"
  },
  {
    "path": "common/loongarch/predict.h",
    "chars": 6585,
    "preview": "/*****************************************************************************\n * predict.h: loongarch intra prediction\n"
  },
  {
    "path": "common/loongarch/quant-a.S",
    "chars": 41598,
    "preview": "/*****************************************************************************\n * quant-a.S: LoongArch quantization and "
  },
  {
    "path": "common/loongarch/quant.h",
    "chars": 5056,
    "preview": "/*****************************************************************************\n * quant.h: loongarch quantization and le"
  },
  {
    "path": "common/loongarch/sad-a.S",
    "chars": 98510,
    "preview": "/*****************************************************************************\n * sad-a.S: loongarch sad functions\n ****"
  },
  {
    "path": "common/macroblock.c",
    "chars": 82194,
    "preview": "/*****************************************************************************\n * macroblock.c: macroblock common functi"
  },
  {
    "path": "common/macroblock.h",
    "chars": 16327,
    "preview": "/*****************************************************************************\n * macroblock.h: macroblock common functi"
  },
  {
    "path": "common/mc.c",
    "chars": 27213,
    "preview": "/*****************************************************************************\n * mc.c: motion compensation\n ***********"
  },
  {
    "path": "common/mc.h",
    "chars": 15414,
    "preview": "/*****************************************************************************\n * mc.h: motion compensation\n ***********"
  },
  {
    "path": "common/mips/dct-c.c",
    "chars": 21112,
    "preview": "/*****************************************************************************\n * dct-c.c: msa transform and zigzag\n ***"
  },
  {
    "path": "common/mips/dct.h",
    "chars": 3398,
    "preview": "/*****************************************************************************\n * dct.h: msa transform and zigzag\n *****"
  },
  {
    "path": "common/mips/deblock-c.c",
    "chars": 80217,
    "preview": "/*****************************************************************************\n * deblock-c.c: msa deblocking\n *********"
  },
  {
    "path": "common/mips/deblock.h",
    "chars": 2977,
    "preview": "/*****************************************************************************\n * deblock.h: msa deblocking\n ***********"
  },
  {
    "path": "common/mips/macros.h",
    "chars": 100679,
    "preview": "/*****************************************************************************\n * macros.h: msa macros\n ****************"
  },
  {
    "path": "common/mips/mc-c.c",
    "chars": 152760,
    "preview": "/*****************************************************************************\n * mc-c.c: msa motion compensation\n *****"
  },
  {
    "path": "common/mips/mc.h",
    "chars": 1387,
    "preview": "/*****************************************************************************\n * mc.h: msa motion compensation\n *******"
  },
  {
    "path": "common/mips/pixel-c.c",
    "chars": 55757,
    "preview": "/*****************************************************************************\n * pixel-c.c: msa pixel metrics\n ********"
  },
  {
    "path": "common/mips/pixel.h",
    "chars": 14753,
    "preview": "/*****************************************************************************\n * pixel.h: msa pixel metrics\n **********"
  },
  {
    "path": "common/mips/predict-c.c",
    "chars": 20457,
    "preview": "/*****************************************************************************\n * predict-c.c: msa intra prediction\n ***"
  },
  {
    "path": "common/mips/predict.h",
    "chars": 3884,
    "preview": "/*****************************************************************************\n * predict.h: msa intra prediction\n *****"
  },
  {
    "path": "common/mips/quant-c.c",
    "chars": 23794,
    "preview": "/*****************************************************************************\n * quant-c.c: msa quantization and level-"
  },
  {
    "path": "common/mips/quant.h",
    "chars": 2655,
    "preview": "/*****************************************************************************\n * quant.h: msa quantization and level-ru"
  },
  {
    "path": "common/mvpred.c",
    "chars": 22715,
    "preview": "/*****************************************************************************\n * mvpred.c: motion vector prediction\n **"
  },
  {
    "path": "common/opencl/bidir.cl",
    "chars": 10149,
    "preview": "/* Mode selection routines, select the least SATD cost mode for each lowres\n * macroblock.  When measuring B slices, thi"
  },
  {
    "path": "common/opencl/downscale.cl",
    "chars": 5413,
    "preview": "/*\n * downscale lowres luma: full-res buffer to down scale image, and to packed hpel image\n *\n * --\n *\n * fenc_img is an"
  },
  {
    "path": "common/opencl/intra.cl",
    "chars": 48354,
    "preview": "/* Lookahead lowres intra analysis\n *\n * Each intra analysis function has been implemented twice, once for scalar GPUs\n "
  },
  {
    "path": "common/opencl/motionsearch.cl",
    "chars": 9028,
    "preview": "/* Hierarchical (iterative) OpenCL lowres motion search */\n\ninline int find_downscale_mb_xy( int x, int y, int mb_width,"
  },
  {
    "path": "common/opencl/subpel.cl",
    "chars": 9192,
    "preview": "/* OpenCL lowres subpel Refine */\n\n/* Each thread performs 8x8 SAD.  4 threads per MB, so the 4 DIA HPEL offsets are\n * "
  },
  {
    "path": "common/opencl/weightp.cl",
    "chars": 1717,
    "preview": "/* Weightp filter a downscaled image into a temporary output buffer.\n * This kernel is launched once for each scale.\n *\n"
  },
  {
    "path": "common/opencl/x264-cl.h",
    "chars": 3479,
    "preview": "#pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics : enable\n\nconstant sampler_t sampler = CLK_NORMALIZED_COORD"
  },
  {
    "path": "common/opencl.c",
    "chars": 25762,
    "preview": "/*****************************************************************************\n * opencl.c: OpenCL initialization and ke"
  },
  {
    "path": "common/opencl.h",
    "chars": 29846,
    "preview": "/*****************************************************************************\n * opencl.h: OpenCL structures and define"
  },
  {
    "path": "common/osdep.c",
    "chars": 3249,
    "preview": "/*****************************************************************************\n * osdep.c: platform-specific code\n *****"
  },
  {
    "path": "common/osdep.h",
    "chars": 17005,
    "preview": "/*****************************************************************************\n * osdep.h: platform-specific code\n *****"
  },
  {
    "path": "common/pixel.c",
    "chars": 64065,
    "preview": "/*****************************************************************************\n * pixel.c: pixel metrics\n **************"
  },
  {
    "path": "common/pixel.h",
    "chars": 7731,
    "preview": "/*****************************************************************************\n * pixel.c: pixel metrics\n **************"
  },
  {
    "path": "common/ppc/dct.c",
    "chars": 35135,
    "preview": "/*****************************************************************************\n * dct.c: ppc transform and zigzag\n *****"
  },
  {
    "path": "common/ppc/dct.h",
    "chars": 3914,
    "preview": "/*****************************************************************************\n * dct.h: ppc transform and zigzag\n *****"
  },
  {
    "path": "common/ppc/deblock.c",
    "chars": 17251,
    "preview": "/*****************************************************************************\n * deblock.c: ppc deblocking\n ***********"
  },
  {
    "path": "common/ppc/deblock.h",
    "chars": 1627,
    "preview": "/*****************************************************************************\n * deblock.h: ppc deblocking\n ***********"
  },
  {
    "path": "common/ppc/mc.c",
    "chars": 53365,
    "preview": "/*****************************************************************************\n * mc.c: ppc motion compensation\n *******"
  },
  {
    "path": "common/ppc/mc.h",
    "chars": 1382,
    "preview": "/*****************************************************************************\n * mc.h: ppc motion compensation\n *******"
  },
  {
    "path": "common/ppc/pixel.c",
    "chars": 65626,
    "preview": "/*****************************************************************************\n * pixel.c: ppc pixel metrics\n **********"
  },
  {
    "path": "common/ppc/pixel.h",
    "chars": 1398,
    "preview": "/*****************************************************************************\n * pixel.h: ppc pixel metrics\n **********"
  },
  {
    "path": "common/ppc/ppccommon.h",
    "chars": 12892,
    "preview": "/*****************************************************************************\n * ppccommon.h: ppc utility macros\n *****"
  },
  {
    "path": "common/ppc/predict.c",
    "chars": 9069,
    "preview": "/*****************************************************************************\n * predict.c: ppc intra prediction\n *****"
  },
  {
    "path": "common/ppc/predict.h",
    "chars": 1597,
    "preview": "/*****************************************************************************\n * predict.h: ppc intra prediction\n *****"
  },
  {
    "path": "common/ppc/quant.c",
    "chars": 21241,
    "preview": "/*****************************************************************************\n * quant.c: ppc quantization\n ***********"
  },
  {
    "path": "common/ppc/quant.h",
    "chars": 2306,
    "preview": "/*****************************************************************************\n * quant.h: ppc quantization\n ***********"
  },
  {
    "path": "common/predict.c",
    "chars": 32151,
    "preview": "/*****************************************************************************\n * predict.c: intra prediction\n *********"
  },
  {
    "path": "common/predict.h",
    "chars": 6065,
    "preview": "/*****************************************************************************\n * predict.h: intra prediction\n *********"
  },
  {
    "path": "common/quant.c",
    "chars": 31367,
    "preview": "/*****************************************************************************\n * quant.c: quantization and level-run\n *"
  },
  {
    "path": "common/quant.h",
    "chars": 3754,
    "preview": "/*****************************************************************************\n * quant.h: quantization and level-run\n *"
  },
  {
    "path": "common/rectangle.c",
    "chars": 2080,
    "preview": "/*****************************************************************************\n * rectangle.c: rectangle filling\n ******"
  },
  {
    "path": "common/rectangle.h",
    "chars": 5858,
    "preview": "/*****************************************************************************\n * rectangle.h: rectangle filling\n ******"
  },
  {
    "path": "common/set.c",
    "chars": 14096,
    "preview": "/*****************************************************************************\n * set.c: quantization init\n ************"
  },
  {
    "path": "common/set.h",
    "chars": 4713,
    "preview": "/*****************************************************************************\n * set.h: quantization init\n ************"
  },
  {
    "path": "common/tables.c",
    "chars": 115507,
    "preview": "/*****************************************************************************\n * tables.c: const tables\n **************"
  },
  {
    "path": "common/tables.h",
    "chars": 4125,
    "preview": "/*****************************************************************************\n * tables.h: const tables\n **************"
  },
  {
    "path": "common/threadpool.c",
    "chars": 5320,
    "preview": "/*****************************************************************************\n * threadpool.c: thread pooling\n ********"
  },
  {
    "path": "common/threadpool.h",
    "chars": 2066,
    "preview": "/*****************************************************************************\n * threadpool.h: thread pooling\n ********"
  },
  {
    "path": "common/vlc.c",
    "chars": 3873,
    "preview": "/*****************************************************************************\n * vlc.c : vlc tables\n ******************"
  },
  {
    "path": "common/win32thread.c",
    "chars": 12314,
    "preview": "/*****************************************************************************\n * win32thread.c: windows threading\n ****"
  },
  {
    "path": "common/win32thread.h",
    "chars": 2985,
    "preview": "/*****************************************************************************\n * win32thread.h: windows threading\n ****"
  },
  {
    "path": "common/x86/bitstream-a.asm",
    "chars": 3825,
    "preview": ";*****************************************************************************\n;* bitstream-a.asm: x86 bitstream functio"
  },
  {
    "path": "common/x86/bitstream.h",
    "chars": 5027,
    "preview": "/*****************************************************************************\n * bitstream.h: x86 bitstream functions\n "
  },
  {
    "path": "common/x86/cabac-a.asm",
    "chars": 20597,
    "preview": ";*****************************************************************************\n;* cabac-a.asm: x86 cabac\n;**************"
  },
  {
    "path": "common/x86/const-a.asm",
    "chars": 2994,
    "preview": ";*****************************************************************************\n;* const-a.asm: x86 global constants\n;***"
  },
  {
    "path": "common/x86/cpu-a.asm",
    "chars": 3179,
    "preview": ";*****************************************************************************\n;* cpu-a.asm: x86 cpu utilities\n;********"
  },
  {
    "path": "common/x86/dct-32.asm",
    "chars": 16696,
    "preview": ";*****************************************************************************\n;* dct-32.asm: x86_32 transform and zigza"
  },
  {
    "path": "common/x86/dct-64.asm",
    "chars": 11532,
    "preview": ";*****************************************************************************\n;* dct-64.asm: x86_64 transform and zigza"
  },
  {
    "path": "common/x86/dct-a.asm",
    "chars": 68871,
    "preview": ";*****************************************************************************\n;* dct-a.asm: x86 transform and zigzag\n;*"
  },
  {
    "path": "common/x86/dct.h",
    "chars": 16908,
    "preview": "/*****************************************************************************\n * dct.h: x86 transform and zigzag\n *****"
  },
  {
    "path": "common/x86/deblock-a.asm",
    "chars": 64012,
    "preview": ";*****************************************************************************\n;* deblock-a.asm: x86 deblocking\n;*******"
  },
  {
    "path": "common/x86/deblock.h",
    "chars": 10409,
    "preview": "/*****************************************************************************\n * deblock.h: x86 deblocking\n ***********"
  },
  {
    "path": "common/x86/mc-a.asm",
    "chars": 49314,
    "preview": ";*****************************************************************************\n;* mc-a.asm: x86 motion compensation\n;***"
  },
  {
    "path": "common/x86/mc-a2.asm",
    "chars": 76174,
    "preview": ";*****************************************************************************\n;* mc-a2.asm: x86 motion compensation\n;**"
  },
  {
    "path": "common/x86/mc-c.c",
    "chars": 55021,
    "preview": "/*****************************************************************************\n * mc-c.c: x86 motion compensation\n *****"
  },
  {
    "path": "common/x86/mc.h",
    "chars": 1435,
    "preview": "/*****************************************************************************\n * mc.h: x86 motion compensation\n *******"
  },
  {
    "path": "common/x86/pixel-32.asm",
    "chars": 10961,
    "preview": ";*****************************************************************************\n;* pixel-32.asm: x86_32 pixel metrics\n;**"
  },
  {
    "path": "common/x86/pixel-a.asm",
    "chars": 145071,
    "preview": ";*****************************************************************************\n;* pixel.asm: x86 pixel metrics\n;********"
  },
  {
    "path": "common/x86/pixel.h",
    "chars": 41072,
    "preview": "/*****************************************************************************\n * pixel.h: x86 pixel metrics\n **********"
  },
  {
    "path": "common/x86/predict-a.asm",
    "chars": 59549,
    "preview": ";*****************************************************************************\n;* predict-a.asm: x86 intra prediction\n;*"
  },
  {
    "path": "common/x86/predict-c.c",
    "chars": 21948,
    "preview": "/*****************************************************************************\n * predict-c.c: intra prediction\n *******"
  },
  {
    "path": "common/x86/predict.h",
    "chars": 16033,
    "preview": "/*****************************************************************************\n * predict.h: x86 intra prediction\n *****"
  },
  {
    "path": "common/x86/quant-a.asm",
    "chars": 51264,
    "preview": ";*****************************************************************************\n;* quant-a.asm: x86 quantization and leve"
  },
  {
    "path": "common/x86/quant.h",
    "chars": 18777,
    "preview": "/*****************************************************************************\n * quant.h: x86 quantization and level-ru"
  },
  {
    "path": "common/x86/sad-a.asm",
    "chars": 53850,
    "preview": ";*****************************************************************************\n;* sad-a.asm: x86 sad functions\n;********"
  },
  {
    "path": "common/x86/sad16-a.asm",
    "chars": 16936,
    "preview": ";*****************************************************************************\n;* sad16-a.asm: x86 high depth sad functi"
  },
  {
    "path": "common/x86/trellis-64.asm",
    "chars": 25764,
    "preview": ";*****************************************************************************\n;* trellis-64.asm: x86_64 trellis quantiz"
  },
  {
    "path": "common/x86/util.h",
    "chars": 9594,
    "preview": "/*****************************************************************************\n * util.h: x86 inline asm\n **************"
  },
  {
    "path": "common/x86/x86inc.asm",
    "chars": 60460,
    "preview": ";*****************************************************************************\n;* x86inc.asm: x264asm abstraction layer\n"
  },
  {
    "path": "common/x86/x86util.asm",
    "chars": 21480,
    "preview": ";*****************************************************************************\n;* x86util.asm: x86 utility macros\n;*****"
  },
  {
    "path": "config.guess",
    "chars": 45593,
    "preview": "#! /bin/sh\n# Attempt to guess a canonical system name.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,"
  },
  {
    "path": "config.sub",
    "chars": 35871,
    "preview": "#! /bin/sh\n# Configuration validation subroutine script.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 199"
  },
  {
    "path": "configure",
    "chars": 57636,
    "preview": "#!/bin/bash\n\nif test x\"$1\" = x\"-h\" -o x\"$1\" = x\"--help\" ; then\ncat <<EOF\nUsage: ./configure [options]\n\nHelp:\n  -h, --hel"
  },
  {
    "path": "doc/ratecontrol.txt",
    "chars": 5150,
    "preview": "A qualitative overview of x264's ratecontrol methods\nBy Loren Merritt\n\nHistorical note:\nThis document is outdated, but a"
  },
  {
    "path": "doc/regression_test.txt",
    "chars": 608,
    "preview": "Here is one test method which checks that the encoder's\nview of decoded pictures in the same as the decoder's view.\nThis"
  },
  {
    "path": "doc/standards.txt",
    "chars": 736,
    "preview": "x264 is written in C. The particular variant of C is: intersection of C99 and gcc>=3.4.\ncheckasm is written in gcc, with"
  },
  {
    "path": "doc/threads.txt",
    "chars": 5387,
    "preview": "Historical notes:\nSlice-based threads was the original threading model of x264.  It was replaced with frame-based thread"
  },
  {
    "path": "doc/vui.txt",
    "chars": 8666,
    "preview": "Video Usability Information (VUI) Guide\nby Christian Heine ( sennindemokrit at gmx dot net )\n\n1. Sample Aspect Ratio\n---"
  },
  {
    "path": "encoder/analyse.c",
    "chars": 164916,
    "preview": "/*****************************************************************************\n * analyse.c: macroblock analysis\n ******"
  },
  {
    "path": "encoder/analyse.h",
    "chars": 2599,
    "preview": "/*****************************************************************************\n * analyse.h: macroblock analysis\n ******"
  },
  {
    "path": "encoder/api.c",
    "chars": 7422,
    "preview": "/*****************************************************************************\n * api.c: bit depth independent interface"
  },
  {
    "path": "encoder/cabac.c",
    "chars": 46032,
    "preview": "/*****************************************************************************\n * cabac.c: cabac bitstream writing\n ****"
  },
  {
    "path": "encoder/cavlc.c",
    "chars": 27007,
    "preview": "/*****************************************************************************\n * cavlc.c: cavlc bitstream writing\n ****"
  },
  {
    "path": "encoder/encoder.c",
    "chars": 186205,
    "preview": "/*****************************************************************************\n * encoder.c: top-level encoder functions"
  },
  {
    "path": "encoder/lookahead.c",
    "chars": 9813,
    "preview": "/*****************************************************************************\n * lookahead.c: high-level lookahead func"
  },
  {
    "path": "encoder/macroblock.c",
    "chars": 58382,
    "preview": "/*****************************************************************************\n * macroblock.c: macroblock encoding\n ***"
  },
  {
    "path": "encoder/macroblock.h",
    "chars": 9364,
    "preview": "/*****************************************************************************\n * macroblock.h: macroblock encoding\n ***"
  },
  {
    "path": "encoder/me.c",
    "chars": 54724,
    "preview": "/*****************************************************************************\n * me.c: motion estimation\n *************"
  },
  {
    "path": "encoder/me.h",
    "chars": 3711,
    "preview": "/*****************************************************************************\n * me.h: motion estimation\n *************"
  },
  {
    "path": "encoder/ratecontrol.c",
    "chars": 124015,
    "preview": "/*****************************************************************************\n * ratecontrol.c: ratecontrol\n **********"
  },
  {
    "path": "encoder/ratecontrol.h",
    "chars": 4606,
    "preview": "/*****************************************************************************\n * ratecontrol.h: ratecontrol\n **********"
  },
  {
    "path": "encoder/rdo.c",
    "chars": 49097,
    "preview": "/*****************************************************************************\n * rdo.c: rate-distortion optimization\n *"
  },
  {
    "path": "encoder/set.c",
    "chars": 35227,
    "preview": "/*****************************************************************************\n * set: header writing\n *****************"
  },
  {
    "path": "encoder/set.h",
    "chars": 3986,
    "preview": "/*****************************************************************************\n * set.h: header writing\n ***************"
  },
  {
    "path": "encoder/slicetype-cl.c",
    "chars": 37762,
    "preview": "/*****************************************************************************\n * slicetype-cl.c: OpenCL slicetype decis"
  },
  {
    "path": "encoder/slicetype-cl.h",
    "chars": 2448,
    "preview": "/*****************************************************************************\n * slicetype-cl.h: OpenCL slicetype decis"
  }
]

// ... and 70 more files (download for full content)

About this extraction

This page contains the full source code of the jpsdr/x264 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 270 files (5.6 MB), approximately 1.5M tokens, and a symbol index with 1927 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!