Compare commits
332 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 32291d4ac3 | |||
| a981a06fe7 | |||
| 831958d0b1 | |||
| 2037d31a51 | |||
| 3a0dd0d38c | |||
| f0f9986e91 | |||
| daba6c1c81 | |||
| 7cd3450def | |||
| c6fe8fb741 | |||
| 8588c7e914 | |||
| 37c90f55d8 | |||
| 10cc9ff6b0 | |||
| 3a64ef9e33 | |||
| db83ffa467 | |||
| 75ba466ad5 | |||
| 95a381d9d0 | |||
| 02f3d02734 | |||
| 659df65abe | |||
| 5f83ad1531 | |||
| 7e0bb61b63 | |||
| 7334356a3e | |||
| d388c347d4 | |||
| bd1c255af8 | |||
| b67a6631a2 | |||
| 2a341fc5b2 | |||
| 5911b7e9f5 | |||
| b98349b205 | |||
| 769c36b013 | |||
| 35f906521e | |||
| c22db2bcf2 | |||
| 6387156008 | |||
| d9d47bc981 | |||
| 8c6186efbe | |||
| d859805efe | |||
| bf0e6c6cb5 | |||
| 3096967c93 | |||
| 3610a803e7 | |||
| c185e11321 | |||
| 0819bdc621 | |||
| 90a59f9e48 | |||
| 9dbeb1d5d0 | |||
| ce29811117 | |||
| 4873178ee3 | |||
| 13ebc73259 | |||
| af1bc3a91f | |||
| 27bcc1e967 | |||
| fe5946684a | |||
| 5987250c42 | |||
| 06c213c8c4 | |||
| df95c2630d | |||
| 853e15fb85 | |||
| d0c5329c1b | |||
| 2c06fbfd0d | |||
| f5f350919e | |||
| 9ffa59eba5 | |||
| 04cff32872 | |||
| d9882369d8 | |||
| d9b0effe77 | |||
| 308c337182 | |||
| 05d253b420 | |||
| 2c1117e6e2 | |||
| ae59aff594 | |||
| bf67615a1f | |||
| 40775100a0 | |||
| d1eca0d05a | |||
| f70db01b83 | |||
| b9a3065c66 | |||
| a004db8f4e | |||
| 055265fed1 | |||
| c746bc5269 | |||
| 0100d1ae97 | |||
| bf36c2211d | |||
| 73efebad01 | |||
| 22b7b67931 | |||
| e534814967 | |||
| a5103808f4 | |||
| 0c9b524163 | |||
| 0bd8112921 | |||
| e0339c57e6 | |||
| 1ae20f1779 | |||
| eea625e217 | |||
| a7d8b3c7e4 | |||
| d9dc74fa1a | |||
| a18520cce8 | |||
| 8e72472dcc | |||
| 5a1b84bbd9 | |||
| a7a73839ee | |||
| 43a9665f4a | |||
| 4565b4a507 | |||
| e9479065e1 | |||
| dce4cf6871 | |||
| a83c489c02 | |||
| cd306f0019 | |||
| 7a42e9d892 | |||
| 96cc1dd4d3 | |||
| a487a57d72 | |||
| 552a58fb68 | |||
| 4df8f9fa2b | |||
| 302af6f9a7 | |||
| ccf8c9bff7 | |||
| 9258cc72cb | |||
| 8cc8f54121 | |||
| c0fc7466f1 | |||
| 978f270ef9 | |||
| 244bf4fa35 | |||
| 3e0bc91f68 | |||
| bda83cba9d | |||
| 13bbc0cd5b | |||
| b751dfc151 | |||
| 21b22341ef | |||
| 90571795e2 | |||
| f9821fd907 | |||
| aae59be400 | |||
| fc8775ae96 | |||
| 1ad767bf27 | |||
| ea2dcb9b39 | |||
| a39e922fb7 | |||
| 59918c65ad | |||
| 87f8335bdf | |||
| c18115b413 | |||
| b6925ebc08 | |||
| eac9841a9f | |||
| 47fa87996d | |||
| 48e30b8fab | |||
| cd49ee45ba | |||
| 511b844423 | |||
| b991129f83 | |||
| ae7cd2fc02 | |||
| 178575bdc1 | |||
| 133069b434 | |||
| c41ff724ed | |||
| 1f61aad00d | |||
| dcaadb2a10 | |||
| 34ef4e9d46 | |||
| 302aa941eb | |||
| 2baff271a2 | |||
| 028ae6f26c | |||
| d77be99a83 | |||
| 14b1998c1a | |||
| 7e7c3d5db2 | |||
| 66caaeec13 | |||
| e825157874 | |||
| f2a4a49afb | |||
| 7058f9a3d6 | |||
| 330b8305c1 | |||
| 07e3223dd0 | |||
| 2269a892fb | |||
| e770922e30 | |||
| d2577e1622 | |||
| 7b2b48078c | |||
| b902f5113e | |||
| 1079565e8e | |||
| 6d25672afa | |||
| 85b9a8f296 | |||
| 55769812f7 | |||
| 8af32643c0 | |||
| 2d87c74e60 | |||
| ba90a8dff2 | |||
| df8936ef12 | |||
| 6ddb165b4b | |||
| f4270205a4 | |||
| 034a3e6f9c | |||
| d67bb81161 | |||
| de458e5d3f | |||
| be3ca673f4 | |||
| 5d6524445c | |||
| f630725cb0 | |||
| 303afea1a8 | |||
| 8a0e48001f | |||
| 3b822405cd | |||
| 0ae86db6ba | |||
| 47333e3e30 | |||
| f16d72dfeb | |||
| 5fd5e84474 | |||
| 8aae506dd2 | |||
| f23f0ba87c | |||
| 8c5b391c63 | |||
| 342121cd35 | |||
| c8319b4e00 | |||
| 33c009130c | |||
| afb5d20e23 | |||
| 53bcb6eaf5 | |||
| 3a177811f4 | |||
| ea918615a1 | |||
| 4917892af7 | |||
| 882052e293 | |||
| eb32d51302 | |||
| d30d9c817a | |||
| 38bc713c6d | |||
| ebc4d0a310 | |||
| 47bd650d68 | |||
| 58c8e61703 | |||
| e1a05fdb58 | |||
| 24be4134fd | |||
| 45d113af3a | |||
| 2631c7c7ce | |||
| 3fa5039012 | |||
| b7a55ae0a8 | |||
| e4dbe25f3b | |||
| e0cd8ac126 | |||
| 60e46128f7 | |||
| d57b29ff2b | |||
| ab1981b445 | |||
| 1e26c4923a | |||
| b07211eb9e | |||
| ba5e12b2ed | |||
| 13438a6900 | |||
| cea882ef99 | |||
| 8bce6ca582 | |||
| 15e1093f9a | |||
| 1bee64983e | |||
| 161b2b6ed6 | |||
| 68604c9dee | |||
| 992fc9d75a | |||
| 5531eacf9e | |||
| 410d733a8b | |||
| 09e888a5b4 | |||
| aef59048e6 | |||
| 4c906c5867 | |||
| 52dd7a9f7a | |||
| 85cb7abb4c | |||
| 819e9068af | |||
| a66733a8c9 | |||
| 79af71223d | |||
| 63270289a0 | |||
| c598778d37 | |||
| 33ee9ab941 | |||
| 339463bd90 | |||
| 426117bb7e | |||
| 011511791a | |||
| 79edf58ba8 | |||
| 86682ab20f | |||
| 24b6f44f96 | |||
| 838cab9a07 | |||
| 40e81d5a8b | |||
| 4e3f8fd46a | |||
| 0ec70368b0 | |||
| fbc224b126 | |||
| fc7f2fdacf | |||
| 89950105b9 | |||
| 9000efe97f | |||
| 344f333c6c | |||
| 8c8a08e1bf | |||
| 63aa0cfd0e | |||
| 1d7dd08199 | |||
| 6500c15977 | |||
| 81ab846988 | |||
| 19db9ffb3b | |||
| 735f6be311 | |||
| a06bf3dae8 | |||
| 953e26755b | |||
| 0291b86a94 | |||
| d84e889785 | |||
| a85d0bc84b | |||
| 67919ba682 | |||
| 1ed34709ff | |||
| 4cec33869e | |||
| 9a086ad5b1 | |||
| 407e6cde75 | |||
| fa35ce082a | |||
| efab690c16 | |||
| 14da53d4c6 | |||
| b89cda3269 | |||
| deeb0b6e94 | |||
| 89c0a651ad | |||
| ea6ec6b507 | |||
| c2a484cf5b | |||
| 1957bd1110 | |||
| 438ea0eaf3 | |||
| f081f94601 | |||
| 318c295925 | |||
| c5039e158d | |||
| 067ed535f4 | |||
| 3d5edb89e7 | |||
| d2efb80027 | |||
| d4a7a6e7fa | |||
| 1ebb0e43f9 | |||
| 9212b53ed5 | |||
| cc703cf607 | |||
| cedbf27a35 | |||
| c433ad89a0 | |||
| 3f345ebf21 | |||
| 868af7d7a4 | |||
| d341895a08 | |||
| cb3453eb25 | |||
| 549430e14d | |||
| bfa8a4a44b | |||
| d7c0991cfc | |||
| 8ea302832f | |||
| 27205c0b47 | |||
| 8f61cbf1b9 | |||
| 2c11164707 | |||
| 5606d27006 | |||
| 4808ed94e3 | |||
| bf704a0b30 | |||
| a6dc92968a | |||
| 3980415627 | |||
| a0d6566498 | |||
| a3c93c03ad | |||
| 18dde8d4cf | |||
| adb4688bfb | |||
| 916bdc0f19 | |||
| 58f18df430 | |||
| 1cf17633cd | |||
| 0e11aafb08 | |||
| 46970dd155 | |||
| 0981053c29 | |||
| ea3d24bbe3 | |||
| ff5cce2eaf | |||
| 1eb1acb62b | |||
| 718d6c71ef | |||
| 8ab01c8b0d | |||
| d1e446d570 | |||
| 8e478e0cb1 | |||
| 81d9c57c43 | |||
| 3ae6feff7e | |||
| 197dcd28ef | |||
| bc531eedbd | |||
| e4eed31133 | |||
| c56f84e656 | |||
| bbcf3f4234 | |||
| 8a6c037acd | |||
| b59152b474 | |||
| 0c1e67ab14 | |||
| ec5edc0946 | |||
| 6f1b24c4fe | |||
| 691d019899 | |||
| 65873ac3ee | |||
| 34a1403831 | |||
| a34b348328 | |||
| 6112745d8e | |||
| 71534916df |
@@ -0,0 +1,23 @@
|
||||
exclude: ^tests/ref/
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: check-case-conflict
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-illegal-windows-names
|
||||
- id: check-shebang-scripts-are-executable
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: fix-byte-order-marker
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: aarch64-asm-indent
|
||||
name: fix aarch64 assembly indentation
|
||||
files: ^.*/aarch64/.*\.S$
|
||||
language: script
|
||||
entry: ./tools/check_arm_indent.sh --apply
|
||||
pass_filenames: false
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release/6.0
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Pre-Commit
|
||||
runs-on: utilities
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install pre-commit CI
|
||||
id: install
|
||||
run: |
|
||||
python3 -m venv ~/pre-commit
|
||||
~/pre-commit/bin/pip install --upgrade pip setuptools
|
||||
~/pre-commit/bin/pip install pre-commit
|
||||
echo "envhash=$({ python3 --version && cat .forgejo/pre-commit/config.yaml; } | sha256sum | cut -d' ' -f1)" >> $FORGEJO_OUTPUT
|
||||
- name: Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit-${{ steps.install.outputs.envhash }}
|
||||
- name: Run pre-commit CI
|
||||
run: ~/pre-commit/bin/pre-commit run -c .forgejo/pre-commit/config.yaml --show-diff-on-failure --color=always --all-files
|
||||
@@ -0,0 +1,80 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release/6.0
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
run_fate:
|
||||
name: Fate (${{ matrix.runner }}, ${{ matrix.shared }}, ${{ matrix.bits }} bit)
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runner: [linux-aarch64]
|
||||
shared: ['static']
|
||||
bits: ['64']
|
||||
include:
|
||||
- runner: linux-amd64
|
||||
shared: 'static'
|
||||
bits: '32'
|
||||
- runner: linux-amd64
|
||||
shared: 'shared'
|
||||
bits: '64'
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure --enable-gpl --enable-nonfree --enable-memory-poisoning --assert-level=2 \
|
||||
$([ "${{ matrix.bits }}" != "32" ] || echo --arch=x86_32 --extra-cflags=-m32 --extra-cxxflags=-m32 --extra-ldflags=-m32) \
|
||||
$([ "${{ matrix.shared }}" != "shared" ] || echo --enable-shared --disable-static) \
|
||||
|| CFGRES=$? && CFGRES=$?
|
||||
cat ffbuild/config.log
|
||||
exit $CFGRES
|
||||
- name: Build
|
||||
run: make -j$(nproc)
|
||||
- name: Restore Cached Fate-Suite
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: fate-suite
|
||||
key: fate-suite
|
||||
restore-keys: |
|
||||
fate-suite-
|
||||
- name: Sync Fate-Suite
|
||||
id: fate
|
||||
run: |
|
||||
make fate-rsync SAMPLES=$PWD/fate-suite
|
||||
echo "hash=$(find fate-suite -type f -printf "%P %s %T@\n" | sort | sha256sum | cut -d' ' -f1)" >> $FORGEJO_OUTPUT
|
||||
- name: Cache Fate-Suite
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ format('fate-suite-{0}', steps.fate.outputs.hash) != steps.cache.outputs.cache-matched-key }}
|
||||
with:
|
||||
path: fate-suite
|
||||
key: fate-suite-${{ steps.fate.outputs.hash }}
|
||||
- name: Run Fate
|
||||
run: LD_LIBRARY_PATH="$(printf "%s:" "$PWD"/lib*)$PWD" make fate fate-build SAMPLES=$PWD/fate-suite -j$(nproc)
|
||||
compile_only:
|
||||
name: Fate (Win64, Build-Only)
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: ["ghcr.io/btbn/ffmpeg-builds/win64-gpl-6.0:latest"]
|
||||
runs-on: linux-amd64
|
||||
container: ${{ matrix.image }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure --pkg-config-flags="--static" $FFBUILD_TARGET_FLAGS $FF_CONFIGURE \
|
||||
--cc="$CC" --cxx="$CXX" --ar="$AR" --ranlib="$RANLIB" --nm="$NM" \
|
||||
--extra-cflags="$FF_CFLAGS" --extra-cxxflags="$FF_CXXFLAGS" \
|
||||
--extra-libs="$FF_LIBS" --extra-ldflags="$FF_LDFLAGS" --extra-ldexeflags="$FF_LDEXEFLAGS"
|
||||
- name: Build
|
||||
run: make -j$(nproc)
|
||||
- name: Run Fate
|
||||
run: make -j$(nproc) fate-build
|
||||
+9
-9
@@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
@@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
@@ -158,7 +158,7 @@ Library.
|
||||
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 Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
@@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@@ -267,7 +267,7 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
@@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@@ -370,7 +370,7 @@ 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 with
|
||||
this License.
|
||||
|
||||
|
||||
11. 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
|
||||
@@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@@ -456,7 +456,7 @@ 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 Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
See the Git history of the project (git://source.ffmpeg.org/ffmpeg) to
|
||||
See the Git history of the project (https://git.ffmpeg.org/ffmpeg) to
|
||||
get the names of people who have contributed to FFmpeg.
|
||||
|
||||
To check the log, you can type the command "git log" in the FFmpeg
|
||||
source directory, or browse the online repository at
|
||||
http://source.ffmpeg.org.
|
||||
https://git.ffmpeg.org/ffmpeg
|
||||
|
||||
@@ -1,6 +1,275 @@
|
||||
Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version 6.0.2:
|
||||
fate/subtitles: Ignore line endings for sub-scc test
|
||||
avformat/mxfdec: Check index_edit_rate
|
||||
swscale/utils: Fix xInc overflow
|
||||
avformat/isom: Uninit layout in ff_mp4_read_dec_config_descr()
|
||||
avcodec/exr: Dont use 64bits to hold 6bits
|
||||
avcodec/exr: Check for remaining bits in huf_unpack_enc_table()
|
||||
avformat/mpegts: Reset local nb_prg on add_program() failure
|
||||
avformat/aiffdec: Check for previously set channels
|
||||
avformat/mxfdec: Make edit_unit_byte_count unsigned
|
||||
avformat/movenc: Check that cts fits in 32bit
|
||||
avformat/mxfdec: Check first case of offset_temp computation for overflow
|
||||
avfilter/vf_signature: Dont crash on no frames
|
||||
avformat/westwood_vqa: Fix 2g packets
|
||||
avformat/matroskadec: Check timescale
|
||||
avformat/wavdec: satuarte next_tag_ofs, data_end
|
||||
avformat/sbgdec: Check for negative duration
|
||||
avformat/rpl: Use 64bit for total_audio_size and check it
|
||||
avformat/timecode: use 64bit for intermediate for rounding in fps_from_frame_rate()
|
||||
avformat/mov: use 64bit for intermediate for rounding
|
||||
avformat/jacosubdec: Use 64bit for abs
|
||||
avformat/concatdec: Check user_duration sum
|
||||
avcodec/wavarc: Avoid signed integer overflow in sample
|
||||
avcodec/truemotion1: Height not being a multiple of 4 is unsupported
|
||||
avcodec/hcadec: do not set hfr_group_count to invalid values
|
||||
avformat/concatdec: clip outpoint - inpoint overflow in get_best_effort_duration()
|
||||
avformat/jacosubdec: clarify code
|
||||
avformat/cafdec: Check that data chunk end fits within 64bit
|
||||
avformat/iff: Saturate avio_tell() + 12
|
||||
avformat/dxa: Adjust order of operations around block align
|
||||
avformat/cafdec: dont seek beyond 64bit
|
||||
avformat/id3v2: read_uslt() check for the amount read
|
||||
avformat/wady: Check >0 samplerate and channels 1 || 2.
|
||||
avcodec/proresenc_kostya: Remove bug similarity text
|
||||
avcodec/vorbisdec: Check remaining data in vorbis_residue_decode_internal()
|
||||
avformat/concatdec: Check in and outpoints to be to produce a positive representable duration
|
||||
avcodec/8bps: Consider width in the minimal size check
|
||||
libswscale/utils: Fix bayer to yuvj
|
||||
swscale/swscale: Check srcSliceH for bayer
|
||||
swscale/utils: Allocate more dithererror
|
||||
avcodec/indeo3: Round dimensions up in allocate_frame_buffers()
|
||||
avutil/rational: Document what is to be expected from av_d2q() of doubles representing rational numbers
|
||||
avfilter/signature_lookup: Do not dereference NULL pointers after malloc failure
|
||||
avfilter/signature_lookup: dont leave uncleared pointers in sll_free()
|
||||
avcodec/mpegvideo_enc: Use ptrdiff_t for stride
|
||||
libavformat/hlsenc.c: Populate OTI using AAC profile in write_codec_attr.
|
||||
avcodec/mpegvideo_enc: Dont copy beyond the image
|
||||
avfilter/vf_minterpolate: Check pts before division
|
||||
avformat/flacdec: Avoid double AVERRORS
|
||||
avfilter/vf_vidstabdetect: Avoid double AVERRORS
|
||||
avfilter/vf_swaprect: round coordinates down
|
||||
avfilter/vf_swaprect: Use height for vertical variables
|
||||
avfilter/vf_swaprect: assert that rectangles are within memory
|
||||
avfilter/af_alimiter: Check nextpos before use
|
||||
avfilter/f_reverse: Apply PTS compensation only when pts is available
|
||||
avfilter/af_stereowiden: Check length
|
||||
avformat/mov: Fix MSAN issue with stsd_id
|
||||
avfilter/vf_weave: Fix odd height handling
|
||||
avfilter/edge_template: Fix small inputs with gaussian_blur()
|
||||
avfilter/vf_gradfun: Do not overread last line
|
||||
avfilter/avf_showspectrum: fix off by 1 error
|
||||
avformat/mov: do not set sign bit for chunk_offsets
|
||||
avcodec/jpeglsdec: Check Jpeg-LS LSE
|
||||
configure: Enable section_data_rel_ro for FreeBSD and NetBSD aarch64 / arm
|
||||
avcodec/av1dec: Fix resolving zero divisor
|
||||
avformat/mov: Ignore duplicate ftyp
|
||||
avformat/mov: Fix integer overflow in mov_read_packet().
|
||||
avformat/mov: Check if a key is longer than the atom containing it
|
||||
avfilter/buffersrc: fix overriding unknown channel layouts with negotiated one
|
||||
avfilter/af_channelmap: disallow channel index 64
|
||||
avfilter/af_channelmap: fix mapping if in_channel was a string but out_channel was not specified
|
||||
avfilter/af_channelmap: fix error message if FL source channel was missing
|
||||
avcodec/nvdec: reset bitstream_len/nb_slices when resetting bitstream pointer
|
||||
avformat/mov: don't abort on duplicate Mastering Display Metadata boxes
|
||||
fftools/ffplay: use correct buffersink channel layout parameters
|
||||
swresample/resample: fix rounding errors with filter_size=1 and phase_shift=0
|
||||
avformat/mxfdec: remove resolve_strong_ref usage with AnyType
|
||||
avformat/libsrt: use SRT_EPOLL_IN for waiting for an incoming connection
|
||||
avformat/mxfdec: do not use AnyType when resolving Descriptors and MultipleDescriptors
|
||||
avformat/mxfdec: move resolving Descriptors to the multi descriptor resolve function
|
||||
avutil/hwcontext_d3d11va: prefer DXGI 1.1 factory when available
|
||||
avcodec/av1dec: fix matrix coefficients exposed by codec context
|
||||
avformat/mov_chan: never override number of channels based on chan atom
|
||||
avformat/mov_chan: do not assume channels are in native order
|
||||
avcodec/nvdec: don't free NVDECContext->bitstream
|
||||
lavc/dvdsubenc: only check canvas size when it is actually set
|
||||
|
||||
|
||||
version 6.0.1:
|
||||
avcodec/4xm: Check for cfrm exhaustion
|
||||
avformat/mov: Disallow FTYP after streams
|
||||
doc/html: fix styling issue with Texinfo 7.0
|
||||
doc/html: support texinfo 7.0
|
||||
Changelog: update
|
||||
avformat/lafdec: Check for 0 parameters
|
||||
avformat/lafdec: Check for 0 parameters
|
||||
avfilter/buffersink: fix order of operation with = and <0
|
||||
avfilter/framesync: fix order of operation with = and <0
|
||||
tools/target_dec_fuzzer: Adjust threshold for CSCD
|
||||
avcodec/dovi_rpu: Use 64 bit in get_us/se_coeff()
|
||||
avformat/mov: Check that is_still_picture_avif has no trak based streams
|
||||
avformat/matroskadec: Fix declaration-after-statement warnings
|
||||
Update for FFmpeg 6.0.1
|
||||
fftools/ffmpeg_mux_init: Restrict disabling automatic copying of metadata
|
||||
avformat/rtsp: Use rtsp_st->stream_index
|
||||
avformat/rtsp: Use rtsp_st->stream_index
|
||||
avutil/tx_template: fix integer ovberflwo in fft3()
|
||||
avcodec/jpeg2000dec: Check image offset
|
||||
avformat/mxfdec: Check klv offset
|
||||
libavutil/ppc/cpu.c: check that AT_HWCAP2 is defined
|
||||
avcodec/h2645_parse: Avoid EAGAIN
|
||||
avcodec/xvididct: Make c* unsigned to avoid undefined overflows
|
||||
avcodec/bonk: Fix undefined overflow in predictor_calc_error()
|
||||
avformat/tmv: Check video chunk size
|
||||
avcodec/h264_parser: saturate dts a bit
|
||||
avformat/asfdec_f: Saturate presentation time in marker
|
||||
avformat/xwma: sanity check bits_per_coded_sample
|
||||
avformat/matroskadec: Check prebuffered_ns for overflow
|
||||
avformat/wavdec: Check left avio_tell for overflow
|
||||
avformat/tta: Better totalframes check
|
||||
avformat/rpl: Check for number_of_chunks overflow
|
||||
avformat/mov: compute absolute dts difference without overflow in mov_find_next_sample()
|
||||
avformat/jacosubdec: Check timeres
|
||||
avformat/jacosubdec: avoid signed integer overflows in get_shift()
|
||||
avformat/jacosubdec: Factorize code in get_shift() a bit
|
||||
avformat/sbgdec: Check for negative duration or un-representable end pts
|
||||
avcodec/escape124: Do not return random numbers
|
||||
avcodec/apedec: Fix an integer overflow in predictor_update_filter()
|
||||
tools/target_dec_fuzzer: Adjust wmapro threshold
|
||||
avcodec/wavarc: Allocate AV_INPUT_BUFFER_PADDING_SIZE
|
||||
avcodec/wavarc: Fix integer overflwo in do_stereo()
|
||||
avutil/tx_template: Fix some signed integer overflows in DECL_FFT5()
|
||||
avcodec/aacdec_template: Better avoidance of signed integer overflow in imdct_and_windowing_eld()
|
||||
tools/target_dec_fuzzer: Adjust threshold for MVHA
|
||||
avformat/avs: Check if return code is representable
|
||||
avcodec/flacdec: Fix integer overflow in "33bit" DECODER_SUBFRAME_FIXED_WIDE()
|
||||
avcodec/flacdec: Fix overflow in "33bit" decorrelate
|
||||
avcodec/lcldec: Make PNG filter addressing match the code afterwards
|
||||
avformat/westwood_vqa: Check chunk size
|
||||
avformat/sbgdec: Check for period overflow
|
||||
avformat/concatdec: Check in/outpoint for overflow
|
||||
avformat/mov: Check avif_info
|
||||
avformat/mxfdec: Remove this_partition
|
||||
avcodec/xvididct: Fix integer overflow in idct_row()
|
||||
avcodec/celp_math: avoid overflow in shift
|
||||
tools/target_dec_fuzzer: Adjust threshold for rtv1
|
||||
avformat/hls: reduce default max reload to 3
|
||||
avformat/format: Stop reading data at EOF during probing
|
||||
avcodec/bonk: Fix integer overflow in predictor_calc_error()
|
||||
avcodec/jpeg2000dec: jpeg2000 has its own lowres option
|
||||
avcodec/huffyuvdec: avoid undefined behavior with get_vlc2() failure
|
||||
avcodec/cscd: Fix "CamStudio Lossless Codec 1.0" gzip files
|
||||
avcodec/cscd: Check for CamStudio Lossless Codec 1.0 behavior in end check of LZO files
|
||||
avcodec/mpeg4videodec: consider lowres in dest_pcm[]
|
||||
avcodec/hevcdec: Fix undefined memcpy()
|
||||
avcodec/mpeg4videodec: more unsigned in amv computation
|
||||
avcodec/tta: fix signed overflow in decorrelate
|
||||
avcodec/apedec: remove unused variable
|
||||
avcodec/apedec: Fix 48khz 24bit below insane level
|
||||
avcodec/apedec: Fix CRC for 24bps and bigendian
|
||||
avcodec/wavarc: Check that nb_samples is not negative
|
||||
avcodec/wavarc: Check shift
|
||||
avcodec/xvididct: Fix integer overflow in idct_row()
|
||||
avformat/avr: Check sample rate
|
||||
avformat/imf_cpl: Replace NULL content_title_utf8 by ""
|
||||
avformat/imf_cpl: xmlNodeListGetString() can return NULL
|
||||
avcodec/aacdec_template: Fix undefined signed interger operations
|
||||
avcodec/wavarc: Fix k limit
|
||||
avcodec/rka: Fix integer overflow in decode_filter()
|
||||
avformat/rka: bps < 8 is invalid
|
||||
avcodec/pcm: allow Changing parameters
|
||||
avutil/tx_template: extend to 2M
|
||||
avcodec/jpeg2000dec: Check for reduction factor and image offset
|
||||
avutil/softfloat: Basic documentation for av_sincos_sf()
|
||||
avutil/softfloat: fix av_sincos_sf()
|
||||
tools/target_dec_fuzzer: Adjust threshold for speex
|
||||
avcodec/utils: fix 2 integer overflows in get_audio_frame_duration()
|
||||
avcodec/hevcdec: Avoid null pointer dereferences in MC
|
||||
avcodec/takdsp: Fix integer overflows
|
||||
avcodec/mpegvideo_dec: consider interlaced lowres 4:2:0 chroma in edge emulation check better
|
||||
avcodec/rka: use unsigned for buf0 additions
|
||||
avcodec/rka: Avoid undefined left shift
|
||||
avcodec: Ignoring errors is only possible before the input end
|
||||
avformat/jpegxl_probe: Forward error codes
|
||||
avformat/jpegxl_probe: check length instead of blindly reading
|
||||
avformat/jpegxl_probe: Remove intermediate macro obfuscation around get_bits*()
|
||||
avcodec/noise_bsf: Check for wrapped frames
|
||||
avformat/oggparsetheora: clip duration within 64bit
|
||||
avcodec/rka: avoid undefined multiply in cmode==0
|
||||
avcodec/rka: use 64bit for srate_pad computation
|
||||
avcodec/bonk: Avoid undefined integer overflow in predictor_calc_error()
|
||||
avformat/wavdec: Check that smv block fits in available space
|
||||
avcodec/adpcm: Fix integer overflow in intermediate in ADPCM_XMD
|
||||
avcodec/dpcm: fix undefined interger overflow in wady
|
||||
avcodec/tiff: add a zero DNG_LINEARIZATION_TABLE check
|
||||
avcodec/tak: Check remaining bits in ff_tak_decode_frame_header()
|
||||
avcodec/sonic: Fix two undefined integer overflows
|
||||
avcodec/utils: the IFF_ILBM implementation assumes that there are a multiple of 16 allocated
|
||||
avcodec/flacdec: Fix signed integre overflow
|
||||
avcodec/exr: Cleanup befor return
|
||||
avcodec/pngdec: Do not pass AVFrame into global header decode
|
||||
avcodec/pngdec: remove AVFrame argument from decode_iccp_chunk()
|
||||
avcodec/wavarc: Check order before using it to write the list
|
||||
avcodec/bonk: decode multiple passes in intlist_read() at once
|
||||
avcodec/vorbisdec: Check codebook float values to be finite
|
||||
avcodec/g2meet: Replace fake allocation avoidance for framebuf
|
||||
avutil/tx_priv: Use unsigned in BF() to avoid signed overflows
|
||||
avcodec/lcldec: More space for rgb24
|
||||
avcodec/lcldec: Support 4:1:1 and 4:2:2 with odd width
|
||||
libavcodec/lcldec: width and height should not be unsigned
|
||||
avformat/imf: fix invalid resource handling
|
||||
avcodec/escape124: Check that blocks are allocated before use
|
||||
avcodec/rka: Fix signed integer overflow in decode_filter()
|
||||
avcodec/huffyuvdec: Fix undefined behavior with shift
|
||||
avcodec/j2kenc: Replace RGB24 special case by generic test
|
||||
avcodec/j2kenc: Replace BGR48 / GRAY16 test by test for number of bits
|
||||
avcodec/j2kenc: simplify pixel format setup
|
||||
avcodec/j2kenc: Fix funky bpno errors on decoding
|
||||
avcodec/j2kenc: remove misleading pred value
|
||||
avcodec/j2kenc: fix 5/3 DWT identifer
|
||||
avcodec/vp3: Check width to avoid assertion failure
|
||||
avcodec/g729postfilter: Limit shift in long term filter
|
||||
avcodec/wavarc: Fix several integer overflows
|
||||
avcodec/tests/snowenc: Fix 2nd test
|
||||
avcodec/tests/snowenc: return a failure if DWT/IDWT mismatches
|
||||
avcodec/snowenc: Fix visual weight calculation
|
||||
avcodec/tests/snowenc: unbreak DWT tests
|
||||
avcodec/mpeg12dec: Check input size
|
||||
avcodec/escape124: Fix some return codes
|
||||
avcodec/escape124: fix signdness of end of input check
|
||||
Use https for repository links
|
||||
avcodec/nvdec_hevc: fail to initialize on unsupported profiles
|
||||
fftools/ffmpeg_enc: apply -top to individual encoded frames
|
||||
avcodec/on2avc: use correct fft sizes
|
||||
avcodec/on2avc: use the matching AVTX context for the 512 sized iMDCT
|
||||
examples: fix build of mux and resample_audio
|
||||
avcodec/nvenc: stop using deprecated rc modes with SDK 12.1
|
||||
configure: use non-deprecated nvenc GUID for conftest
|
||||
avcodec/x86/mathops: clip constants used with shift instructions within inline assembly
|
||||
avfilter/vsrc_ddagrab: calculate pointer position on rotated screens
|
||||
avfilter/vsrc_ddagrab: account for mouse-only frames during probing
|
||||
avcodec/aac_ac3_parser: add preprocessor checks for codec specific code
|
||||
avcodec/nvenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
|
||||
Revert "lavc/nvenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE"
|
||||
Revert "avcodec/nvenc: fix b-frame DTS behavior with fractional framerates"
|
||||
avcodec/vdpau_mpeg4: fix order of quant matrix coefficients
|
||||
avcodec/vdpau_mpeg12: fix order of quant matrix coefficients
|
||||
avcodec/nvdec_mpeg4: fix order of quant matrix coefficients
|
||||
avcodec/nvdec_mpeg2: fix order of quant matrix coefficients
|
||||
fftools/ffmpeg_filter: fix leak of AVIOContext in read_binary()
|
||||
fftools/ffmpeg: avoid possible invalid reads with short -tag values
|
||||
avcodec/mp_cmp: reject invalid comparison function values
|
||||
avcodec/aacpsy: clip global_quality within the psy_vbr_map array boundaries
|
||||
avutil/wchar_filename: propagate MultiByteToWideChar() and WideCharToMultiByte() failures
|
||||
avformat/concatf: check if any nodes were allocated
|
||||
avcodec/nvenc: fix b-frame DTS behavior with fractional framerates
|
||||
avcodec/vorbisdec: export skip_samples instead of dropping frames
|
||||
fftools/ffmpeg_mux_init: avoid invalid reads in forced keyframe parsing
|
||||
lavfi/vf_vpp_qsv: set the right timestamp for AVERROR_EOF
|
||||
avfilter/vf_untile: swap the chroma shift values used for plane offsets
|
||||
lavc/decode: stop mangling last_pkt_props->opaque
|
||||
avcodec/nvenc: avoid failing b_ref_mode check when unset
|
||||
lavu/vulkan: fix handle type for 32-bit targets
|
||||
vulkan: Fix win/i386 calling convention
|
||||
avfilter/graphparser: fix filter instance name when an id is provided
|
||||
avcodec/aacps_tablegen: fix build error after avutil bump
|
||||
avcodec/nvenc: fix potential NULL pointer dereference
|
||||
|
||||
|
||||
version 6.0:
|
||||
- Radiance HDR image support
|
||||
- ddagrab (Desktop Duplication) video capture filter
|
||||
|
||||
@@ -91,10 +91,10 @@ ffbuild/.config: $(CONFIGURABLE_COMPONENTS)
|
||||
SUBDIR_VARS := CLEANFILES FFLIBS HOSTPROGS TESTPROGS TOOLS \
|
||||
HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS \
|
||||
ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \
|
||||
ALTIVEC-OBJS VSX-OBJS RVV-OBJS MMX-OBJS X86ASM-OBJS \
|
||||
ALTIVEC-OBJS VSX-OBJS MMX-OBJS X86ASM-OBJS \
|
||||
MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSP-OBJS MSA-OBJS \
|
||||
MMI-OBJS LSX-OBJS LASX-OBJS OBJS SLIBOBJS SHLIBOBJS \
|
||||
STLIBOBJS HOSTOBJS TESTOBJS
|
||||
MMI-OBJS LSX-OBJS LASX-OBJS RV-OBJS RVV-OBJS \
|
||||
OBJS SLIBOBJS SHLIBOBJS STLIBOBJS HOSTOBJS TESTOBJS
|
||||
|
||||
define RESET
|
||||
$(1) :=
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
┌────────────────────────────────────────────┐
|
||||
│ RELEASE NOTES for FFmpeg 6.0 "Von Neumann" │
|
||||
└────────────────────────────────────────────┘
|
||||
|
||||
The FFmpeg Project proudly presents FFmpeg 6.0 "Von Neumann", about 6
|
||||
months after the release of FFmpeg 5.1.
|
||||
|
||||
A complete Changelog is available at the root of the project, and the
|
||||
complete Git history on https://git.ffmpeg.org/gitweb/ffmpeg.git
|
||||
|
||||
We hope you will like this release as much as we enjoyed working on it, and
|
||||
as usual, if you have any questions about it, or any FFmpeg related topic,
|
||||
feel free to join us on the #ffmpeg IRC channel (on irc.libera.chat) or ask
|
||||
on the mailing-lists.
|
||||
@@ -2110,10 +2110,12 @@ ARCH_EXT_LIST_PPC="
|
||||
ldbrx
|
||||
power8
|
||||
ppc4xx
|
||||
vec_xl
|
||||
vsx
|
||||
"
|
||||
|
||||
ARCH_EXT_LIST_RISCV="
|
||||
rv
|
||||
rvv
|
||||
"
|
||||
|
||||
@@ -2191,6 +2193,7 @@ HEADERS_LIST="
|
||||
opencv2_core_core_c_h
|
||||
OpenGL_gl3_h
|
||||
poll_h
|
||||
pthread_np_h
|
||||
sys_param_h
|
||||
sys_resource_h
|
||||
sys_select_h
|
||||
@@ -2293,6 +2296,8 @@ SYSTEM_FUNCS="
|
||||
posix_memalign
|
||||
prctl
|
||||
pthread_cancel
|
||||
pthread_set_name_np
|
||||
pthread_setname_np
|
||||
sched_getaffinity
|
||||
SecItemImport
|
||||
SetConsoleTextAttribute
|
||||
@@ -2407,6 +2412,7 @@ HAVE_LIST="
|
||||
opencl_vaapi_intel_media
|
||||
perl
|
||||
pod2man
|
||||
posix_ioctl
|
||||
texi2html
|
||||
xmllint
|
||||
zlib_gzip
|
||||
@@ -2627,9 +2633,11 @@ altivec_deps="ppc"
|
||||
dcbzl_deps="ppc"
|
||||
ldbrx_deps="ppc"
|
||||
ppc4xx_deps="ppc"
|
||||
vec_xl_deps="altivec"
|
||||
vsx_deps="altivec"
|
||||
power8_deps="vsx"
|
||||
|
||||
rv_deps="riscv"
|
||||
rvv_deps="riscv"
|
||||
|
||||
loongson2_deps="mips"
|
||||
@@ -3892,6 +3900,8 @@ if test "$target_os_default" = aix; then
|
||||
arch_default=$(uname -p)
|
||||
strip_default="strip -X32_64"
|
||||
nm_default="nm -g -X32_64"
|
||||
elif test "$MSYSTEM_CARCH" != ""; then
|
||||
arch_default="$MSYSTEM_CARCH"
|
||||
else
|
||||
arch_default=$(uname -m)
|
||||
fi
|
||||
@@ -5519,6 +5529,7 @@ case $target_os in
|
||||
;;
|
||||
netbsd)
|
||||
disable symver
|
||||
enable section_data_rel_ro
|
||||
oss_indev_extralibs="-lossaudio"
|
||||
oss_outdev_extralibs="-lossaudio"
|
||||
enabled gcc || check_ldflags -Wl,-zmuldefs
|
||||
@@ -5537,6 +5548,7 @@ case $target_os in
|
||||
disable symver
|
||||
;;
|
||||
freebsd)
|
||||
enable section_data_rel_ro
|
||||
;;
|
||||
bsd/os)
|
||||
add_extralibs -lpoll -lgnugetopt
|
||||
@@ -6113,8 +6125,14 @@ elif enabled ppc; then
|
||||
check_cpp_condition power8 "altivec.h" "defined(_ARCH_PWR8)"
|
||||
fi
|
||||
|
||||
if enabled altivec; then
|
||||
check_cc vec_xl altivec.h "const unsigned char *y1i = { 0 };
|
||||
vector unsigned char y0 = vec_xl(0, y1i);"
|
||||
fi
|
||||
|
||||
elif enabled riscv; then
|
||||
|
||||
enabled rv && check_inline_asm rv '".option arch, +zbb\nrev8 t0, t1"'
|
||||
enabled rvv && check_inline_asm rvv '".option arch, +v\nvsetivli zero, 0, e8, m1, ta, ma"'
|
||||
|
||||
elif enabled x86; then
|
||||
@@ -6350,6 +6368,7 @@ check_headers malloc.h
|
||||
check_headers mftransform.h
|
||||
check_headers net/udplite.h
|
||||
check_headers poll.h
|
||||
check_headers pthread_np.h
|
||||
check_headers sys/param.h
|
||||
check_headers sys/resource.h
|
||||
check_headers sys/select.h
|
||||
@@ -6513,6 +6532,12 @@ if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
|
||||
if enabled pthreads; then
|
||||
check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwait(s,0); sem_destroy(s)" $pthreads_extralibs
|
||||
check_func pthread_cancel $pthreads_extralibs
|
||||
hdrs=pthread.h
|
||||
if enabled pthread_np_h; then
|
||||
hdrs="$hdrs pthread_np.h"
|
||||
fi
|
||||
check_lib pthread_set_name_np "$hdrs" pthread_set_name_np -lpthread
|
||||
check_lib pthread_setname_np "$hdrs" pthread_setname_np -lpthread
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -6859,11 +6884,13 @@ pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
|
||||
rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
|
||||
xmllint --version > /dev/null 2>&1 && enable xmllint || disable xmllint
|
||||
|
||||
check_headers linux/fb.h
|
||||
check_headers linux/videodev2.h
|
||||
test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
|
||||
test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable posix_ioctl
|
||||
|
||||
# check V4L2 codecs available in the API
|
||||
if enabled v4l2_m2m; then
|
||||
check_headers linux/fb.h
|
||||
check_headers linux/videodev2.h
|
||||
test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
|
||||
check_cc v4l2_m2m linux/videodev2.h "int i = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M | V4L2_BUF_FLAG_LAST;"
|
||||
check_cc vc1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VC1_ANNEX_G;"
|
||||
check_cc mpeg1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG1;"
|
||||
@@ -6908,8 +6935,7 @@ enabled alsa && { check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimesta
|
||||
enabled libjack &&
|
||||
require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range
|
||||
|
||||
enabled sndio && { check_pkg_config sndio sndio "sndio.h" sio_open ||
|
||||
check_lib sndio sndio.h sio_open -lsndio; }
|
||||
enabled sndio && check_pkg_config sndio sndio sndio.h sio_open
|
||||
|
||||
if enabled libcdio; then
|
||||
check_pkg_config libcdio libcdio_paranoia "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open ||
|
||||
@@ -7018,7 +7044,7 @@ fi
|
||||
|
||||
if enabled x86; then
|
||||
case $target_os in
|
||||
mingw32*|mingw64*|win32|win64|linux|cygwin*)
|
||||
freebsd|mingw32*|mingw64*|win32|win64|linux|cygwin*)
|
||||
;;
|
||||
*)
|
||||
disable ffnvcodec cuvid nvdec nvenc
|
||||
@@ -7042,7 +7068,7 @@ enabled nvenc &&
|
||||
test_cc -I$source_path <<EOF || disable nvenc
|
||||
#include <ffnvcodec/nvEncodeAPI.h>
|
||||
NV_ENCODE_API_FUNCTION_LIST flist;
|
||||
void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_PRESET_HQ_GUID } }; }
|
||||
void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_CODEC_H264_GUID } }; }
|
||||
int main(void) { return 0; }
|
||||
EOF
|
||||
|
||||
@@ -7601,6 +7627,7 @@ if enabled ppc; then
|
||||
echo "POWER8 enabled ${power8-no}"
|
||||
echo "PPC 4xx optimizations ${ppc4xx-no}"
|
||||
echo "dcbzl available ${dcbzl-no}"
|
||||
echo "vec_xl available ${vec_xl-no}"
|
||||
fi
|
||||
if enabled loongarch; then
|
||||
echo "LSX enabled ${lsx-no}"
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ PROJECT_NAME = FFmpeg
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER =
|
||||
PROJECT_NUMBER = 6.0.2
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@
|
||||
The FFmpeg developers.
|
||||
|
||||
For details about the authorship, see the Git history of the project
|
||||
(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
|
||||
(https://git.ffmpeg.org/ffmpeg), e.g. by typing the command
|
||||
@command{git log} in the FFmpeg source directory, or browsing the
|
||||
online repository at @url{http://source.ffmpeg.org}.
|
||||
online repository at @url{https://git.ffmpeg.org/ffmpeg}.
|
||||
|
||||
Maintainers for the specific components are listed in the file
|
||||
@file{MAINTAINERS} in the source code tree.
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -63,4 +63,3 @@ make -j<num>
|
||||
make -k
|
||||
Continue build in case of errors, this is useful for the regression tests
|
||||
sometimes but note that it will still not run all reg tests.
|
||||
|
||||
|
||||
@@ -88,4 +88,3 @@ lead to this decision.
|
||||
|
||||
The decisions from the TC are final, until the matters are reopened after
|
||||
no less than one year.
|
||||
|
||||
|
||||
@@ -1949,22 +1949,6 @@ Set the number of slices, used in parallelized encoding. Default value
|
||||
is 0. This is only used when @option{slice_mode} is set to
|
||||
@samp{fixed}.
|
||||
|
||||
@item slice_mode
|
||||
Set slice mode. Can assume one of the following possible values:
|
||||
|
||||
@table @samp
|
||||
@item fixed
|
||||
a fixed number of slices
|
||||
@item rowmb
|
||||
one slice per row of macroblocks
|
||||
@item auto
|
||||
automatic number of slices according to number of threads
|
||||
@item dyn
|
||||
dynamic slicing
|
||||
@end table
|
||||
|
||||
Default value is @samp{auto}.
|
||||
|
||||
@item loopfilter
|
||||
Enable loop filter, if set to 1 (automatically enabled). To disable
|
||||
set a value of 0.
|
||||
|
||||
@@ -43,8 +43,8 @@ OBJS=$(addsuffix .o,$(EXAMPLES))
|
||||
# the following examples make explicit use of the math library
|
||||
avcodec: LDLIBS += -lm
|
||||
encode_audio: LDLIBS += -lm
|
||||
muxing: LDLIBS += -lm
|
||||
resampling_audio: LDLIBS += -lm
|
||||
mux: LDLIBS += -lm
|
||||
resample_audio: LDLIBS += -lm
|
||||
|
||||
.phony: all clean-test clean
|
||||
|
||||
|
||||
@@ -62,10 +62,10 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
|
||||
return 0;
|
||||
key = strtok(optstr, " ");
|
||||
if (key == NULL)
|
||||
return AVERROR(ENAVAIL);
|
||||
return AVERROR(EINVAL);
|
||||
value = strtok(NULL, " ");
|
||||
if (value == NULL)
|
||||
return AVERROR(ENAVAIL);
|
||||
return AVERROR(EINVAL);
|
||||
av_dict_set(opt, key, value, 0);
|
||||
do {
|
||||
key = strtok(NULL, " ");
|
||||
@@ -73,7 +73,7 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
|
||||
return 0;
|
||||
value = strtok(NULL, " ");
|
||||
if (value == NULL)
|
||||
return AVERROR(ENAVAIL);
|
||||
return AVERROR(EINVAL);
|
||||
av_dict_set(opt, key, value, 0);
|
||||
} while(key != NULL);
|
||||
return 0;
|
||||
@@ -181,7 +181,7 @@ static int open_input_file(char *filename)
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Codec is not supportted by qsv\n");
|
||||
return AVERROR(ENAVAIL);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if (!(decoder_ctx = avcodec_alloc_context3(decoder)))
|
||||
|
||||
@@ -26943,11 +26943,6 @@ Specify the frame rate expected for the video stream.
|
||||
@item pixel_aspect, sar
|
||||
The sample (pixel) aspect ratio of the input video.
|
||||
|
||||
@item sws_param
|
||||
This option is deprecated and ignored. Prepend @code{sws_flags=@var{flags};}
|
||||
to the filtergraph description to specify swscale flags for automatically
|
||||
inserted scalers. See @ref{Filtergraph syntax}.
|
||||
|
||||
@item hw_frames_ctx
|
||||
When using a hardware pixel format, this should be a reference to an
|
||||
AVHWFramesContext describing input frames.
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ Most distribution and operating system provide a package for it.
|
||||
@section Cloning the source tree
|
||||
|
||||
@example
|
||||
git clone git://source.ffmpeg.org/ffmpeg <target>
|
||||
git clone https://git.ffmpeg.org/ffmpeg.git <target>
|
||||
@end example
|
||||
|
||||
This will put the FFmpeg sources into the directory @var{<target>}.
|
||||
|
||||
@@ -795,12 +795,6 @@ deletes them. Increase this to allow continue clients to download segments which
|
||||
were recently referenced in the playlist. Default value is 1, meaning segments older than
|
||||
@code{hls_list_size+1} will be deleted.
|
||||
|
||||
@item hls_ts_options @var{options_list}
|
||||
Set output format options using a :-separated list of key=value
|
||||
parameters. Values containing @code{:} special characters must be
|
||||
escaped.
|
||||
@code{hls_ts_options} is deprecated, use hls_segment_options instead of it..
|
||||
|
||||
@item hls_start_number_source
|
||||
Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according to the specified source.
|
||||
Unless @code{hls_flags single_file} is set, it also specifies source of starting sequence numbers of
|
||||
|
||||
@@ -157,4 +157,3 @@ PFD[32] would for example be signed 32 bit little-endian IEEE float
|
||||
@item XVID @tab non-compliant MPEG-4 generated by old Xvid
|
||||
@item XVIX @tab non-compliant MPEG-4 generated by old Xvid with interlacing bug
|
||||
@end multitable
|
||||
|
||||
|
||||
+4
-14
@@ -11,18 +11,8 @@ programmatic use.
|
||||
|
||||
@table @option
|
||||
|
||||
@item ich, in_channel_count
|
||||
Set the number of input channels. Default value is 0. Setting this
|
||||
value is not mandatory if the corresponding channel layout
|
||||
@option{in_channel_layout} is set.
|
||||
|
||||
@item och, out_channel_count
|
||||
Set the number of output channels. Default value is 0. Setting this
|
||||
value is not mandatory if the corresponding channel layout
|
||||
@option{out_channel_layout} is set.
|
||||
|
||||
@item uch, used_channel_count
|
||||
Set the number of used input channels. Default value is 0. This option is
|
||||
@item uchl, used_chlayout
|
||||
Set used input channel layout. Default is unset. This option is
|
||||
only used for special remapping.
|
||||
|
||||
@item isr, in_sample_rate
|
||||
@@ -41,8 +31,8 @@ Specify the output sample format. It is set by default to @code{none}.
|
||||
Set the internal sample format. Default value is @code{none}.
|
||||
This will automatically be chosen when it is not explicitly set.
|
||||
|
||||
@item icl, in_channel_layout
|
||||
@item ocl, out_channel_layout
|
||||
@item ichl, in_chlayout
|
||||
@item ochl, out_chlayout
|
||||
Set the input/output channel layout.
|
||||
|
||||
See @ref{channel layout syntax,,the Channel Layout section in the ffmpeg-utils(1) manual,ffmpeg-utils}
|
||||
|
||||
+202
-49
@@ -20,8 +20,57 @@
|
||||
# License along with FFmpeg; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Texinfo 7.0 changed the syntax of various functions.
|
||||
# Provide a shim for older versions.
|
||||
sub ff_set_from_init_file($$) {
|
||||
my $key = shift;
|
||||
my $value = shift;
|
||||
if (exists &{'texinfo_set_from_init_file'}) {
|
||||
texinfo_set_from_init_file($key, $value);
|
||||
} else {
|
||||
set_from_init_file($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
sub ff_get_conf($) {
|
||||
my $key = shift;
|
||||
if (exists &{'texinfo_get_conf'}) {
|
||||
texinfo_get_conf($key);
|
||||
} else {
|
||||
get_conf($key);
|
||||
}
|
||||
}
|
||||
|
||||
sub get_formatting_function($$) {
|
||||
my $obj = shift;
|
||||
my $func = shift;
|
||||
|
||||
my $sub = $obj->can('formatting_function');
|
||||
if ($sub) {
|
||||
return $obj->formatting_function($func);
|
||||
} else {
|
||||
return $obj->{$func};
|
||||
}
|
||||
}
|
||||
|
||||
# determine texinfo version
|
||||
my $package_version = ff_get_conf('PACKAGE_VERSION');
|
||||
$package_version =~ s/\+dev$//;
|
||||
my $program_version_num = version->declare($package_version)->numify;
|
||||
my $program_version_6_8 = $program_version_num >= 6.008000;
|
||||
|
||||
# no navigation elements
|
||||
set_from_init_file('HEADERS', 0);
|
||||
ff_set_from_init_file('HEADERS', 0);
|
||||
|
||||
my %sectioning_commands = %Texinfo::Common::sectioning_commands;
|
||||
if (scalar(keys(%sectioning_commands)) == 0) {
|
||||
%sectioning_commands = %Texinfo::Commands::sectioning_heading_commands;
|
||||
}
|
||||
|
||||
my %root_commands = %Texinfo::Common::root_commands;
|
||||
if (scalar(keys(%root_commands)) == 0) {
|
||||
%root_commands = %Texinfo::Commands::root_commands;
|
||||
}
|
||||
|
||||
sub ffmpeg_heading_command($$$$$)
|
||||
{
|
||||
@@ -40,6 +89,9 @@ sub ffmpeg_heading_command($$$$$)
|
||||
return $result;
|
||||
}
|
||||
|
||||
# no need to set it as the $element_id is output unconditionally
|
||||
my $heading_id;
|
||||
|
||||
my $element_id = $self->command_id($command);
|
||||
$result .= "<a name=\"$element_id\"></a>\n"
|
||||
if (defined($element_id) and $element_id ne '');
|
||||
@@ -47,24 +99,40 @@ sub ffmpeg_heading_command($$$$$)
|
||||
print STDERR "Process $command "
|
||||
.Texinfo::Structuring::_print_root_command_texi($command)."\n"
|
||||
if ($self->get_conf('DEBUG'));
|
||||
my $element;
|
||||
if ($Texinfo::Common::root_commands{$command->{'cmdname'}}
|
||||
and $command->{'parent'}
|
||||
and $command->{'parent'}->{'type'}
|
||||
and $command->{'parent'}->{'type'} eq 'element') {
|
||||
$element = $command->{'parent'};
|
||||
my $output_unit;
|
||||
if ($root_commands{$command->{'cmdname'}}) {
|
||||
if ($command->{'associated_unit'}) {
|
||||
$output_unit = $command->{'associated_unit'};
|
||||
} elsif ($command->{'structure'}
|
||||
and $command->{'structure'}->{'associated_unit'}) {
|
||||
$output_unit = $command->{'structure'}->{'associated_unit'};
|
||||
} elsif ($command->{'parent'}
|
||||
and $command->{'parent'}->{'type'}
|
||||
and $command->{'parent'}->{'type'} eq 'element') {
|
||||
$output_unit = $command->{'parent'};
|
||||
}
|
||||
}
|
||||
if ($element) {
|
||||
$result .= &{$self->{'format_element_header'}}($self, $cmdname,
|
||||
$command, $element);
|
||||
|
||||
if ($output_unit) {
|
||||
$result .= &{get_formatting_function($self, 'format_element_header')}($self, $cmdname,
|
||||
$command, $output_unit);
|
||||
}
|
||||
|
||||
my $heading_level;
|
||||
# node is used as heading if there is nothing else.
|
||||
if ($cmdname eq 'node') {
|
||||
if (!$element or (!$element->{'extra'}->{'section'}
|
||||
and $element->{'extra'}->{'node'}
|
||||
and $element->{'extra'}->{'node'} eq $command
|
||||
if (!$output_unit or
|
||||
(((!$output_unit->{'extra'}->{'section'}
|
||||
and $output_unit->{'extra'}->{'node'}
|
||||
and $output_unit->{'extra'}->{'node'} eq $command)
|
||||
or
|
||||
((($output_unit->{'extra'}->{'unit_command'}
|
||||
and $output_unit->{'extra'}->{'unit_command'} eq $command)
|
||||
or
|
||||
($output_unit->{'unit_command'}
|
||||
and $output_unit->{'unit_command'} eq $command))
|
||||
and $command->{'extra'}
|
||||
and not $command->{'extra'}->{'associated_section'}))
|
||||
# bogus node may not have been normalized
|
||||
and defined($command->{'extra'}->{'normalized'}))) {
|
||||
if ($command->{'extra'}->{'normalized'} eq 'Top') {
|
||||
@@ -74,7 +142,15 @@ sub ffmpeg_heading_command($$$$$)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$heading_level = $command->{'level'};
|
||||
if (defined($command->{'extra'})
|
||||
and defined($command->{'extra'}->{'section_level'})) {
|
||||
$heading_level = $command->{'extra'}->{'section_level'};
|
||||
} elsif ($command->{'structure'}
|
||||
and defined($command->{'structure'}->{'section_level'})) {
|
||||
$heading_level = $command->{'structure'}->{'section_level'};
|
||||
} else {
|
||||
$heading_level = $command->{'level'};
|
||||
}
|
||||
}
|
||||
|
||||
my $heading = $self->command_text($command);
|
||||
@@ -82,8 +158,8 @@ sub ffmpeg_heading_command($$$$$)
|
||||
# if there is an error in the node.
|
||||
if (defined($heading) and $heading ne '' and defined($heading_level)) {
|
||||
|
||||
if ($Texinfo::Common::root_commands{$cmdname}
|
||||
and $Texinfo::Common::sectioning_commands{$cmdname}) {
|
||||
if ($root_commands{$cmdname}
|
||||
and $sectioning_commands{$cmdname}) {
|
||||
my $content_href = $self->command_contents_href($command, 'contents',
|
||||
$self->{'current_filename'});
|
||||
if ($content_href) {
|
||||
@@ -103,7 +179,13 @@ sub ffmpeg_heading_command($$$$$)
|
||||
}
|
||||
}
|
||||
|
||||
if ($self->in_preformatted()) {
|
||||
my $in_preformatted;
|
||||
if ($program_version_num >= 7.001090) {
|
||||
$in_preformatted = $self->in_preformatted_context();
|
||||
} else {
|
||||
$in_preformatted = $self->in_preformatted();
|
||||
}
|
||||
if ($in_preformatted) {
|
||||
$result .= $heading."\n";
|
||||
} else {
|
||||
# if the level was changed, set the command name right
|
||||
@@ -112,37 +194,41 @@ sub ffmpeg_heading_command($$$$$)
|
||||
$cmdname
|
||||
= $Texinfo::Common::level_to_structuring_command{$cmdname}->[$heading_level];
|
||||
}
|
||||
$result .= &{$self->{'format_heading_text'}}(
|
||||
if ($program_version_num >= 7.000000) {
|
||||
$result .= &{get_formatting_function($self,'format_heading_text')}($self,
|
||||
$cmdname, [$cmdname], $heading,
|
||||
$heading_level +$self->get_conf('CHAPTER_HEADER_LEVEL') -1,
|
||||
$heading_id, $command);
|
||||
|
||||
} else {
|
||||
$result .= &{get_formatting_function($self,'format_heading_text')}(
|
||||
$self, $cmdname, $heading,
|
||||
$heading_level +
|
||||
$self->get_conf('CHAPTER_HEADER_LEVEL') - 1, $command);
|
||||
}
|
||||
}
|
||||
}
|
||||
$result .= $content if (defined($content));
|
||||
return $result;
|
||||
}
|
||||
|
||||
foreach my $command (keys(%Texinfo::Common::sectioning_commands), 'node') {
|
||||
foreach my $command (keys(%sectioning_commands), 'node') {
|
||||
texinfo_register_command_formatting($command, \&ffmpeg_heading_command);
|
||||
}
|
||||
|
||||
# determine if texinfo is at least version 6.8
|
||||
my $program_version_num = version->declare(get_conf('PACKAGE_VERSION'))->numify;
|
||||
my $program_version_6_8 = $program_version_num >= 6.008000;
|
||||
|
||||
# print the TOC where @contents is used
|
||||
if ($program_version_6_8) {
|
||||
set_from_init_file('CONTENTS_OUTPUT_LOCATION', 'inline');
|
||||
ff_set_from_init_file('CONTENTS_OUTPUT_LOCATION', 'inline');
|
||||
} else {
|
||||
set_from_init_file('INLINE_CONTENTS', 1);
|
||||
ff_set_from_init_file('INLINE_CONTENTS', 1);
|
||||
}
|
||||
|
||||
# make chapters <h2>
|
||||
set_from_init_file('CHAPTER_HEADER_LEVEL', 2);
|
||||
ff_set_from_init_file('CHAPTER_HEADER_LEVEL', 2);
|
||||
|
||||
# Do not add <hr>
|
||||
set_from_init_file('DEFAULT_RULE', '');
|
||||
set_from_init_file('BIG_RULE', '');
|
||||
ff_set_from_init_file('DEFAULT_RULE', '');
|
||||
ff_set_from_init_file('BIG_RULE', '');
|
||||
|
||||
# Customized file beginning
|
||||
sub ffmpeg_begin_file($$$)
|
||||
@@ -151,17 +237,56 @@ sub ffmpeg_begin_file($$$)
|
||||
my $filename = shift;
|
||||
my $element = shift;
|
||||
|
||||
my $command;
|
||||
if ($element and $self->get_conf('SPLIT')) {
|
||||
$command = $self->element_command($element);
|
||||
my ($element_command, $node_command, $command_for_title);
|
||||
if ($element) {
|
||||
if ($element->{'unit_command'}) {
|
||||
$element_command = $element->{'unit_command'};
|
||||
} elsif ($self->can('tree_unit_element_command')) {
|
||||
$element_command = $self->tree_unit_element_command($element);
|
||||
} elsif ($self->can('tree_unit_element_command')) {
|
||||
$element_command = $self->element_command($element);
|
||||
}
|
||||
|
||||
$node_command = $element_command;
|
||||
if ($element_command and $element_command->{'cmdname'}
|
||||
and $element_command->{'cmdname'} ne 'node'
|
||||
and $element_command->{'extra'}
|
||||
and $element_command->{'extra'}->{'associated_node'}) {
|
||||
$node_command = $element_command->{'extra'}->{'associated_node'};
|
||||
}
|
||||
|
||||
$command_for_title = $element_command if ($self->get_conf('SPLIT'));
|
||||
}
|
||||
|
||||
my ($title, $description, $encoding, $date, $css_lines,
|
||||
$doctype, $bodytext, $copying_comment, $after_body_open,
|
||||
$extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_informations($command);
|
||||
my ($title, $description, $keywords, $encoding, $date, $css_lines, $doctype,
|
||||
$root_html_element_attributes, $body_attributes, $copying_comment,
|
||||
$after_body_open, $extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator);
|
||||
if ($program_version_num >= 7.001090) {
|
||||
($title, $description, $keywords, $encoding, $date, $css_lines, $doctype,
|
||||
$root_html_element_attributes, $body_attributes, $copying_comment,
|
||||
$after_body_open, $extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_information($command_for_title,
|
||||
$filename);
|
||||
} elsif ($program_version_num >= 7.000000) {
|
||||
($title, $description, $encoding, $date, $css_lines, $doctype,
|
||||
$root_html_element_attributes, $copying_comment, $after_body_open,
|
||||
$extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_information($command_for_title,
|
||||
$filename);
|
||||
} else {
|
||||
($title, $description, $encoding, $date, $css_lines,
|
||||
$doctype, $root_html_element_attributes, $copying_comment,
|
||||
$after_body_open, $extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_informations($command_for_title);
|
||||
}
|
||||
|
||||
my $links = $self->_get_links ($filename, $element);
|
||||
my $links;
|
||||
if ($program_version_num >= 7.000000) {
|
||||
$links = $self->_get_links($filename, $element, $node_command);
|
||||
} else {
|
||||
$links = $self->_get_links ($filename, $element);
|
||||
}
|
||||
|
||||
my $head1 = $ENV{"FFMPEG_HEADER1"} || <<EOT;
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
@@ -204,13 +329,25 @@ sub ffmpeg_program_string($)
|
||||
if (defined($self->get_conf('PROGRAM'))
|
||||
and $self->get_conf('PROGRAM') ne ''
|
||||
and defined($self->get_conf('PACKAGE_URL'))) {
|
||||
return $self->convert_tree(
|
||||
if ($program_version_num >= 7.001090) {
|
||||
return $self->convert_tree(
|
||||
$self->cdt('This document was generated using @uref{{program_homepage}, @emph{{program}}}.',
|
||||
{ 'program_homepage' => {'text' => $self->get_conf('PACKAGE_URL')},
|
||||
'program' => {'text' => $self->get_conf('PROGRAM') }}));
|
||||
} else {
|
||||
return $self->convert_tree(
|
||||
$self->gdt('This document was generated using @uref{{program_homepage}, @emph{{program}}}.',
|
||||
{ 'program_homepage' => $self->get_conf('PACKAGE_URL'),
|
||||
'program' => $self->get_conf('PROGRAM') }));
|
||||
{ 'program_homepage' => {'text' => $self->get_conf('PACKAGE_URL')},
|
||||
'program' => {'text' => $self->get_conf('PROGRAM') }}));
|
||||
}
|
||||
} else {
|
||||
return $self->convert_tree(
|
||||
$self->gdt('This document was generated automatically.'));
|
||||
if ($program_version_num >= 7.001090) {
|
||||
return $self->convert_tree(
|
||||
$self->cdt('This document was generated automatically.'));
|
||||
} else {
|
||||
return $self->convert_tree(
|
||||
$self->gdt('This document was generated automatically.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($program_version_6_8) {
|
||||
@@ -223,7 +360,7 @@ if ($program_version_6_8) {
|
||||
sub ffmpeg_end_file($)
|
||||
{
|
||||
my $self = shift;
|
||||
my $program_string = &{$self->{'format_program_string'}}($self);
|
||||
my $program_string = &{get_formatting_function($self,'format_program_string')}($self);
|
||||
my $program_text = <<EOT;
|
||||
<p style="font-size: small;">
|
||||
$program_string
|
||||
@@ -244,7 +381,7 @@ if ($program_version_6_8) {
|
||||
|
||||
# Dummy title command
|
||||
# Ignore title. Title is handled through ffmpeg_begin_file().
|
||||
set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
|
||||
ff_set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
|
||||
sub ffmpeg_title($$$$)
|
||||
{
|
||||
return '';
|
||||
@@ -262,8 +399,14 @@ sub ffmpeg_float($$$$$)
|
||||
my $args = shift;
|
||||
my $content = shift;
|
||||
|
||||
my ($caption, $prepended) = Texinfo::Common::float_name_caption($self,
|
||||
$command);
|
||||
my ($caption, $prepended);
|
||||
if ($program_version_num >= 7.000000) {
|
||||
($caption, $prepended) = Texinfo::Convert::Converter::float_name_caption($self,
|
||||
$command);
|
||||
} else {
|
||||
($caption, $prepended) = Texinfo::Common::float_name_caption($self,
|
||||
$command);
|
||||
}
|
||||
my $caption_text = '';
|
||||
my $prepended_text;
|
||||
my $prepended_save = '';
|
||||
@@ -335,8 +478,13 @@ sub ffmpeg_float($$$$$)
|
||||
$caption->{'args'}->[0], 'float caption');
|
||||
}
|
||||
if ($prepended_text.$caption_text ne '') {
|
||||
$prepended_text = $self->_attribute_class('div','float-caption'). '>'
|
||||
. $prepended_text;
|
||||
if ($program_version_num >= 7.000000) {
|
||||
$prepended_text = $self->html_attribute_class('div',['float-caption']). '>'
|
||||
. $prepended_text;
|
||||
} else {
|
||||
$prepended_text = $self->_attribute_class('div','float-caption'). '>'
|
||||
. $prepended_text;
|
||||
}
|
||||
$caption_text .= '</div>';
|
||||
}
|
||||
my $html_class = '';
|
||||
@@ -349,8 +497,13 @@ sub ffmpeg_float($$$$$)
|
||||
$prepended_text = '';
|
||||
$caption_text = '';
|
||||
}
|
||||
return $self->_attribute_class('div', $html_class). '>' . "\n" .
|
||||
$prepended_text . $caption_text . $content . '</div>';
|
||||
if ($program_version_num >= 7.000000) {
|
||||
return $self->html_attribute_class('div', [$html_class]). '>' . "\n" .
|
||||
$prepended_text . $caption_text . $content . '</div>';
|
||||
} else {
|
||||
return $self->_attribute_class('div', $html_class). '>' . "\n" .
|
||||
$prepended_text . $caption_text . $content . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
texinfo_register_command_formatting('float',
|
||||
|
||||
Regular → Executable
Regular → Executable
@@ -44,4 +44,3 @@ a+b*c;
|
||||
here the reader knows that a,b,c are meant to be signed integers but for C
|
||||
standard compliance / to avoid undefined behavior they are stored in unsigned
|
||||
ints.
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ OBJS-$(HAVE_LASX) += $(LASX-OBJS) $(LASX-OBJS-yes)
|
||||
OBJS-$(HAVE_ALTIVEC) += $(ALTIVEC-OBJS) $(ALTIVEC-OBJS-yes)
|
||||
OBJS-$(HAVE_VSX) += $(VSX-OBJS) $(VSX-OBJS-yes)
|
||||
|
||||
OBJS-$(HAVE_RV) += $(RV-OBJS) $(RV-OBJS-yes)
|
||||
OBJS-$(HAVE_RVV) += $(RVV-OBJS) $(RVV-OBJS-yes)
|
||||
|
||||
OBJS-$(HAVE_MMX) += $(MMX-OBJS) $(MMX-OBJS-yes)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
toupper(){
|
||||
echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
}
|
||||
|
||||
@@ -1337,6 +1337,9 @@ static void do_video_out(OutputFile *of,
|
||||
in_picture->quality = enc->global_quality;
|
||||
in_picture->pict_type = forced_kf_apply(ost, &ost->kf, enc->time_base, in_picture, i);
|
||||
|
||||
if (ost->top_field_first >= 0)
|
||||
in_picture->top_field_first = !!ost->top_field_first;
|
||||
|
||||
ret = submit_encode_frame(of, ost, in_picture);
|
||||
if (ret == AVERROR_EOF)
|
||||
break;
|
||||
|
||||
@@ -628,8 +628,12 @@ static void add_input_streams(const OptionsContext *o, Demuxer *d)
|
||||
MATCH_PER_STREAM_OPT(codec_tags, str, codec_tag, ic, st);
|
||||
if (codec_tag) {
|
||||
uint32_t tag = strtol(codec_tag, &next, 0);
|
||||
if (*next)
|
||||
tag = AV_RL32(codec_tag);
|
||||
if (*next) {
|
||||
uint8_t buf[4] = { 0 };
|
||||
memcpy(buf, codec_tag, FFMIN(sizeof(buf), strlen(codec_tag)));
|
||||
tag = AV_RL32(buf);
|
||||
}
|
||||
|
||||
st->codecpar->codec_tag = tag;
|
||||
}
|
||||
|
||||
|
||||
@@ -352,11 +352,13 @@ static int read_binary(const char *path, uint8_t **data, int *len)
|
||||
|
||||
*len = fsize;
|
||||
|
||||
return 0;
|
||||
ret = 0;
|
||||
fail:
|
||||
avio_close(io);
|
||||
av_freep(data);
|
||||
*len = 0;
|
||||
if (ret < 0) {
|
||||
av_freep(data);
|
||||
*len = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -606,8 +606,11 @@ static OutputStream *new_output_stream(Muxer *mux, const OptionsContext *o,
|
||||
MATCH_PER_STREAM_OPT(codec_tags, str, codec_tag, oc, st);
|
||||
if (codec_tag) {
|
||||
uint32_t tag = strtol(codec_tag, &next, 0);
|
||||
if (*next)
|
||||
tag = AV_RL32(codec_tag);
|
||||
if (*next) {
|
||||
uint8_t buf[4] = { 0 };
|
||||
memcpy(buf, codec_tag, FFMIN(sizeof(buf), strlen(codec_tag)));
|
||||
tag = AV_RL32(buf);
|
||||
}
|
||||
ost->st->codecpar->codec_tag = tag;
|
||||
if (ost->enc_ctx)
|
||||
ost->enc_ctx->codec_tag = tag;
|
||||
@@ -1819,11 +1822,11 @@ static int copy_metadata(Muxer *mux, AVFormatContext *ic,
|
||||
parse_meta_type(mux, inspec, &type_in, &idx_in, &istream_spec);
|
||||
parse_meta_type(mux, outspec, &type_out, &idx_out, &ostream_spec);
|
||||
|
||||
if (type_in == 'g' || type_out == 'g')
|
||||
if (type_in == 'g' || type_out == 'g' || (!*outspec && !ic))
|
||||
*metadata_global_manual = 1;
|
||||
if (type_in == 's' || type_out == 's')
|
||||
if (type_in == 's' || type_out == 's' || (!*outspec && !ic))
|
||||
*metadata_streams_manual = 1;
|
||||
if (type_in == 'c' || type_out == 'c')
|
||||
if (type_in == 'c' || type_out == 'c' || (!*outspec && !ic))
|
||||
*metadata_chapters_manual = 1;
|
||||
|
||||
/* ic is NULL when just disabling automatic mappings */
|
||||
@@ -2063,7 +2066,7 @@ static void parse_forced_key_frames(KeyframeForceCtx *kf, const Muxer *mux,
|
||||
if (next)
|
||||
*next++ = 0;
|
||||
|
||||
if (!memcmp(p, "chapters", 8)) {
|
||||
if (strstr(p, "chapters") == p) {
|
||||
AVChapter * const *ch = mux->fc->chapters;
|
||||
unsigned int nb_ch = mux->fc->nb_chapters;
|
||||
int j;
|
||||
|
||||
@@ -1998,6 +1998,8 @@ static int configure_audio_filters(VideoState *is, const char *afilters, int for
|
||||
goto end;
|
||||
|
||||
if (force_output_format) {
|
||||
av_bprint_clear(&bp);
|
||||
av_channel_layout_describe_bprint(&is->audio_tgt.ch_layout, &bp);
|
||||
sample_rates [0] = is->audio_tgt.freq;
|
||||
if ((ret = av_opt_set_int(filt_asink, "all_channel_counts", 0, AV_OPT_SEARCH_CHILDREN)) < 0)
|
||||
goto end;
|
||||
|
||||
@@ -887,6 +887,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
|
||||
}
|
||||
|
||||
if (i >= CFRAME_BUFFER_COUNT) {
|
||||
if (free_index < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
i = free_index;
|
||||
f->cfrm[i].id = id;
|
||||
}
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
unsigned char *planemap = c->planemap;
|
||||
int ret;
|
||||
|
||||
if (buf_size < planes * height * 2)
|
||||
if (buf_size < planes * height * (2 + 2*((avctx->width+128)/129)))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||
|
||||
@@ -95,6 +95,7 @@ get_next:
|
||||
duration in seconds is still correct (as is the number of bits in
|
||||
the frame). */
|
||||
if (avctx->codec_id != AV_CODEC_ID_AAC) {
|
||||
#if CONFIG_AC3_PARSER
|
||||
AC3HeaderInfo hdr, *phrd = &hdr;
|
||||
int offset = ff_ac3_find_syncword(buf, buf_size);
|
||||
|
||||
@@ -146,7 +147,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)
|
||||
avctx->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
|
||||
bit_rate = hdr.bit_rate;
|
||||
#endif
|
||||
} else {
|
||||
#if CONFIG_AAC_PARSER
|
||||
AACADTSHeaderInfo hdr, *phrd = &hdr;
|
||||
int ret = avpriv_adts_header_parse(&phrd, buf, buf_size);
|
||||
|
||||
@@ -154,6 +157,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
return i;
|
||||
|
||||
bit_rate = hdr.bit_rate;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Calculate the average bit rate */
|
||||
|
||||
@@ -2856,8 +2856,8 @@ static void imdct_and_windowing_eld(AACContext *ac, SingleChannelElement *sce)
|
||||
ac->mdct512_fn(ac->mdct512, buf, in, sizeof(INTFLOAT));
|
||||
|
||||
for (i = 0; i < n; i+=2) {
|
||||
buf[i + 0] = -(USE_FIXED + 1)*buf[i + 0];
|
||||
buf[i + 1] = (USE_FIXED + 1)*buf[i + 1];
|
||||
buf[i + 0] = -(UINTFLOAT)(USE_FIXED + 1)*buf[i + 0];
|
||||
buf[i + 1] = (UINTFLOAT)(USE_FIXED + 1)*buf[i + 1];
|
||||
}
|
||||
// Like with the regular IMDCT at this point we still have the middle half
|
||||
// of a transform but with even symmetry on the left and odd symmetry on
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "libavutil/common.h"
|
||||
#include "libavutil/libm.h"
|
||||
#include "libavutil/mathematics.h"
|
||||
#include "libavutil/mem.h"
|
||||
#include "libavutil/mem_internal.h"
|
||||
#define NR_ALLPASS_BANDS20 30
|
||||
#define NR_ALLPASS_BANDS34 50
|
||||
#define PS_AP_LINKS 3
|
||||
|
||||
+1
-1
@@ -267,7 +267,7 @@ static av_cold void lame_window_init(AacPsyContext *ctx, AVCodecContext *avctx)
|
||||
AacPsyChannel *pch = &ctx->ch[i];
|
||||
|
||||
if (avctx->flags & AV_CODEC_FLAG_QSCALE)
|
||||
pch->attack_threshold = psy_vbr_map[avctx->global_quality / FF_QP2LAMBDA].st_lrm;
|
||||
pch->attack_threshold = psy_vbr_map[av_clip(avctx->global_quality / FF_QP2LAMBDA, 0, 10)].st_lrm;
|
||||
else
|
||||
pch->attack_threshold = lame_calc_attack_threshold(avctx->bit_rate / avctx->ch_layout.nb_channels / 1000);
|
||||
|
||||
|
||||
+109
-109
@@ -19,130 +19,130 @@
|
||||
#include "libavutil/aarch64/asm.S"
|
||||
|
||||
function ff_ps_add_squares_neon, export=1
|
||||
1: ld1 {v0.4S,v1.4S}, [x1], #32
|
||||
fmul v0.4S, v0.4S, v0.4S
|
||||
fmul v1.4S, v1.4S, v1.4S
|
||||
faddp v2.4S, v0.4S, v1.4S
|
||||
ld1 {v3.4S}, [x0]
|
||||
fadd v3.4S, v3.4S, v2.4S
|
||||
st1 {v3.4S}, [x0], #16
|
||||
subs w2, w2, #4
|
||||
b.gt 1b
|
||||
1: ld1 {v0.4s,v1.4s}, [x1], #32
|
||||
fmul v0.4s, v0.4s, v0.4s
|
||||
fmul v1.4s, v1.4s, v1.4s
|
||||
faddp v2.4s, v0.4s, v1.4s
|
||||
ld1 {v3.4s}, [x0]
|
||||
fadd v3.4s, v3.4s, v2.4s
|
||||
st1 {v3.4s}, [x0], #16
|
||||
subs w2, w2, #4
|
||||
b.gt 1b
|
||||
ret
|
||||
endfunc
|
||||
|
||||
function ff_ps_mul_pair_single_neon, export=1
|
||||
1: ld1 {v0.4S,v1.4S}, [x1], #32
|
||||
ld1 {v2.4S}, [x2], #16
|
||||
zip1 v3.4S, v2.4S, v2.4S
|
||||
zip2 v4.4S, v2.4S, v2.4S
|
||||
fmul v0.4S, v0.4S, v3.4S
|
||||
fmul v1.4S, v1.4S, v4.4S
|
||||
st1 {v0.4S,v1.4S}, [x0], #32
|
||||
subs w3, w3, #4
|
||||
b.gt 1b
|
||||
1: ld1 {v0.4s,v1.4s}, [x1], #32
|
||||
ld1 {v2.4s}, [x2], #16
|
||||
zip1 v3.4s, v2.4s, v2.4s
|
||||
zip2 v4.4s, v2.4s, v2.4s
|
||||
fmul v0.4s, v0.4s, v3.4s
|
||||
fmul v1.4s, v1.4s, v4.4s
|
||||
st1 {v0.4s,v1.4s}, [x0], #32
|
||||
subs w3, w3, #4
|
||||
b.gt 1b
|
||||
ret
|
||||
endfunc
|
||||
|
||||
function ff_ps_stereo_interpolate_neon, export=1
|
||||
ld1 {v0.4S}, [x2]
|
||||
ld1 {v1.4S}, [x3]
|
||||
zip1 v4.4S, v0.4S, v0.4S
|
||||
zip2 v5.4S, v0.4S, v0.4S
|
||||
zip1 v6.4S, v1.4S, v1.4S
|
||||
zip2 v7.4S, v1.4S, v1.4S
|
||||
1: ld1 {v2.2S}, [x0]
|
||||
ld1 {v3.2S}, [x1]
|
||||
fadd v4.4S, v4.4S, v6.4S
|
||||
fadd v5.4S, v5.4S, v7.4S
|
||||
mov v2.D[1], v2.D[0]
|
||||
mov v3.D[1], v3.D[0]
|
||||
fmul v2.4S, v2.4S, v4.4S
|
||||
fmla v2.4S, v3.4S, v5.4S
|
||||
st1 {v2.D}[0], [x0], #8
|
||||
st1 {v2.D}[1], [x1], #8
|
||||
subs w4, w4, #1
|
||||
b.gt 1b
|
||||
ld1 {v0.4s}, [x2]
|
||||
ld1 {v1.4s}, [x3]
|
||||
zip1 v4.4s, v0.4s, v0.4s
|
||||
zip2 v5.4s, v0.4s, v0.4s
|
||||
zip1 v6.4s, v1.4s, v1.4s
|
||||
zip2 v7.4s, v1.4s, v1.4s
|
||||
1: ld1 {v2.2s}, [x0]
|
||||
ld1 {v3.2s}, [x1]
|
||||
fadd v4.4s, v4.4s, v6.4s
|
||||
fadd v5.4s, v5.4s, v7.4s
|
||||
mov v2.d[1], v2.d[0]
|
||||
mov v3.d[1], v3.d[0]
|
||||
fmul v2.4s, v2.4s, v4.4s
|
||||
fmla v2.4s, v3.4s, v5.4s
|
||||
st1 {v2.d}[0], [x0], #8
|
||||
st1 {v2.d}[1], [x1], #8
|
||||
subs w4, w4, #1
|
||||
b.gt 1b
|
||||
ret
|
||||
endfunc
|
||||
|
||||
function ff_ps_stereo_interpolate_ipdopd_neon, export=1
|
||||
ld1 {v0.4S,v1.4S}, [x2]
|
||||
ld1 {v6.4S,v7.4S}, [x3]
|
||||
fneg v2.4S, v1.4S
|
||||
fneg v3.4S, v7.4S
|
||||
zip1 v16.4S, v0.4S, v0.4S
|
||||
zip2 v17.4S, v0.4S, v0.4S
|
||||
zip1 v18.4S, v2.4S, v1.4S
|
||||
zip2 v19.4S, v2.4S, v1.4S
|
||||
zip1 v20.4S, v6.4S, v6.4S
|
||||
zip2 v21.4S, v6.4S, v6.4S
|
||||
zip1 v22.4S, v3.4S, v7.4S
|
||||
zip2 v23.4S, v3.4S, v7.4S
|
||||
1: ld1 {v2.2S}, [x0]
|
||||
ld1 {v3.2S}, [x1]
|
||||
fadd v16.4S, v16.4S, v20.4S
|
||||
fadd v17.4S, v17.4S, v21.4S
|
||||
mov v2.D[1], v2.D[0]
|
||||
mov v3.D[1], v3.D[0]
|
||||
fmul v4.4S, v2.4S, v16.4S
|
||||
fmla v4.4S, v3.4S, v17.4S
|
||||
fadd v18.4S, v18.4S, v22.4S
|
||||
fadd v19.4S, v19.4S, v23.4S
|
||||
ext v2.16B, v2.16B, v2.16B, #4
|
||||
ext v3.16B, v3.16B, v3.16B, #4
|
||||
fmla v4.4S, v2.4S, v18.4S
|
||||
fmla v4.4S, v3.4S, v19.4S
|
||||
st1 {v4.D}[0], [x0], #8
|
||||
st1 {v4.D}[1], [x1], #8
|
||||
subs w4, w4, #1
|
||||
b.gt 1b
|
||||
ld1 {v0.4s,v1.4s}, [x2]
|
||||
ld1 {v6.4s,v7.4s}, [x3]
|
||||
fneg v2.4s, v1.4s
|
||||
fneg v3.4s, v7.4s
|
||||
zip1 v16.4s, v0.4s, v0.4s
|
||||
zip2 v17.4s, v0.4s, v0.4s
|
||||
zip1 v18.4s, v2.4s, v1.4s
|
||||
zip2 v19.4s, v2.4s, v1.4s
|
||||
zip1 v20.4s, v6.4s, v6.4s
|
||||
zip2 v21.4s, v6.4s, v6.4s
|
||||
zip1 v22.4s, v3.4s, v7.4s
|
||||
zip2 v23.4s, v3.4s, v7.4s
|
||||
1: ld1 {v2.2s}, [x0]
|
||||
ld1 {v3.2s}, [x1]
|
||||
fadd v16.4s, v16.4s, v20.4s
|
||||
fadd v17.4s, v17.4s, v21.4s
|
||||
mov v2.d[1], v2.d[0]
|
||||
mov v3.d[1], v3.d[0]
|
||||
fmul v4.4s, v2.4s, v16.4s
|
||||
fmla v4.4s, v3.4s, v17.4s
|
||||
fadd v18.4s, v18.4s, v22.4s
|
||||
fadd v19.4s, v19.4s, v23.4s
|
||||
ext v2.16b, v2.16b, v2.16b, #4
|
||||
ext v3.16b, v3.16b, v3.16b, #4
|
||||
fmla v4.4s, v2.4s, v18.4s
|
||||
fmla v4.4s, v3.4s, v19.4s
|
||||
st1 {v4.d}[0], [x0], #8
|
||||
st1 {v4.d}[1], [x1], #8
|
||||
subs w4, w4, #1
|
||||
b.gt 1b
|
||||
ret
|
||||
endfunc
|
||||
|
||||
function ff_ps_hybrid_analysis_neon, export=1
|
||||
lsl x3, x3, #3
|
||||
ld2 {v0.4S,v1.4S}, [x1], #32
|
||||
ld2 {v2.2S,v3.2S}, [x1], #16
|
||||
ld1 {v24.2S}, [x1], #8
|
||||
ld2 {v4.2S,v5.2S}, [x1], #16
|
||||
ld2 {v6.4S,v7.4S}, [x1]
|
||||
rev64 v6.4S, v6.4S
|
||||
rev64 v7.4S, v7.4S
|
||||
ext v6.16B, v6.16B, v6.16B, #8
|
||||
ext v7.16B, v7.16B, v7.16B, #8
|
||||
rev64 v4.2S, v4.2S
|
||||
rev64 v5.2S, v5.2S
|
||||
mov v2.D[1], v3.D[0]
|
||||
mov v4.D[1], v5.D[0]
|
||||
mov v5.D[1], v2.D[0]
|
||||
mov v3.D[1], v4.D[0]
|
||||
fadd v16.4S, v0.4S, v6.4S
|
||||
fadd v17.4S, v1.4S, v7.4S
|
||||
fsub v18.4S, v1.4S, v7.4S
|
||||
fsub v19.4S, v0.4S, v6.4S
|
||||
fadd v22.4S, v2.4S, v4.4S
|
||||
fsub v23.4S, v5.4S, v3.4S
|
||||
trn1 v20.2D, v22.2D, v23.2D // {re4+re8, re5+re7, im8-im4, im7-im5}
|
||||
trn2 v21.2D, v22.2D, v23.2D // {im4+im8, im5+im7, re4-re8, re5-re7}
|
||||
1: ld2 {v2.4S,v3.4S}, [x2], #32
|
||||
ld2 {v4.2S,v5.2S}, [x2], #16
|
||||
ld1 {v6.2S}, [x2], #8
|
||||
add x2, x2, #8
|
||||
mov v4.D[1], v5.D[0]
|
||||
mov v6.S[1], v6.S[0]
|
||||
fmul v6.2S, v6.2S, v24.2S
|
||||
fmul v0.4S, v2.4S, v16.4S
|
||||
fmul v1.4S, v2.4S, v17.4S
|
||||
fmls v0.4S, v3.4S, v18.4S
|
||||
fmla v1.4S, v3.4S, v19.4S
|
||||
fmla v0.4S, v4.4S, v20.4S
|
||||
fmla v1.4S, v4.4S, v21.4S
|
||||
faddp v0.4S, v0.4S, v1.4S
|
||||
faddp v0.4S, v0.4S, v0.4S
|
||||
fadd v0.2S, v0.2S, v6.2S
|
||||
st1 {v0.2S}, [x0], x3
|
||||
subs w4, w4, #1
|
||||
b.gt 1b
|
||||
lsl x3, x3, #3
|
||||
ld2 {v0.4s,v1.4s}, [x1], #32
|
||||
ld2 {v2.2s,v3.2s}, [x1], #16
|
||||
ld1 {v24.2s}, [x1], #8
|
||||
ld2 {v4.2s,v5.2s}, [x1], #16
|
||||
ld2 {v6.4s,v7.4s}, [x1]
|
||||
rev64 v6.4s, v6.4s
|
||||
rev64 v7.4s, v7.4s
|
||||
ext v6.16b, v6.16b, v6.16b, #8
|
||||
ext v7.16b, v7.16b, v7.16b, #8
|
||||
rev64 v4.2s, v4.2s
|
||||
rev64 v5.2s, v5.2s
|
||||
mov v2.d[1], v3.d[0]
|
||||
mov v4.d[1], v5.d[0]
|
||||
mov v5.d[1], v2.d[0]
|
||||
mov v3.d[1], v4.d[0]
|
||||
fadd v16.4s, v0.4s, v6.4s
|
||||
fadd v17.4s, v1.4s, v7.4s
|
||||
fsub v18.4s, v1.4s, v7.4s
|
||||
fsub v19.4s, v0.4s, v6.4s
|
||||
fadd v22.4s, v2.4s, v4.4s
|
||||
fsub v23.4s, v5.4s, v3.4s
|
||||
trn1 v20.2d, v22.2d, v23.2d // {re4+re8, re5+re7, im8-im4, im7-im5}
|
||||
trn2 v21.2d, v22.2d, v23.2d // {im4+im8, im5+im7, re4-re8, re5-re7}
|
||||
1: ld2 {v2.4s,v3.4s}, [x2], #32
|
||||
ld2 {v4.2s,v5.2s}, [x2], #16
|
||||
ld1 {v6.2s}, [x2], #8
|
||||
add x2, x2, #8
|
||||
mov v4.d[1], v5.d[0]
|
||||
mov v6.s[1], v6.s[0]
|
||||
fmul v6.2s, v6.2s, v24.2s
|
||||
fmul v0.4s, v2.4s, v16.4s
|
||||
fmul v1.4s, v2.4s, v17.4s
|
||||
fmls v0.4s, v3.4s, v18.4s
|
||||
fmla v1.4s, v3.4s, v19.4s
|
||||
fmla v0.4s, v4.4s, v20.4s
|
||||
fmla v1.4s, v4.4s, v21.4s
|
||||
faddp v0.4s, v0.4s, v1.4s
|
||||
faddp v0.4s, v0.4s, v0.4s
|
||||
fadd v0.2s, v0.2s, v6.2s
|
||||
st1 {v0.2s}, [x0], x3
|
||||
subs w4, w4, #1
|
||||
b.gt 1b
|
||||
ret
|
||||
endfunc
|
||||
|
||||
@@ -358,18 +358,18 @@ function fft\n\()_neon, align=6
|
||||
endfunc
|
||||
.endm
|
||||
|
||||
def_fft 32, 16, 8
|
||||
def_fft 64, 32, 16
|
||||
def_fft 128, 64, 32
|
||||
def_fft 256, 128, 64
|
||||
def_fft 512, 256, 128
|
||||
def_fft 1024, 512, 256
|
||||
def_fft 2048, 1024, 512
|
||||
def_fft 4096, 2048, 1024
|
||||
def_fft 8192, 4096, 2048
|
||||
def_fft 16384, 8192, 4096
|
||||
def_fft 32768, 16384, 8192
|
||||
def_fft 65536, 32768, 16384
|
||||
def_fft 32, 16, 8
|
||||
def_fft 64, 32, 16
|
||||
def_fft 128, 64, 32
|
||||
def_fft 256, 128, 64
|
||||
def_fft 512, 256, 128
|
||||
def_fft 1024, 512, 256
|
||||
def_fft 2048, 1024, 512
|
||||
def_fft 4096, 2048, 1024
|
||||
def_fft 8192, 4096, 2048
|
||||
def_fft 16384, 8192, 4096
|
||||
def_fft 32768, 16384, 8192
|
||||
def_fft 65536, 32768, 16384
|
||||
|
||||
function ff_fft_calc_neon, export=1
|
||||
prfm pldl1keep, [x1]
|
||||
|
||||
+205
-205
@@ -38,11 +38,11 @@ function ff_\type\()_\codec\()_chroma_mc8_neon, export=1
|
||||
lsl w9, w9, #3
|
||||
lsl w10, w10, #1
|
||||
add w9, w9, w10
|
||||
add x6, x6, w9, UXTW
|
||||
ld1r {v22.8H}, [x6]
|
||||
add x6, x6, w9, uxtw
|
||||
ld1r {v22.8h}, [x6]
|
||||
.endif
|
||||
.ifc \codec,vc1
|
||||
movi v22.8H, #28
|
||||
movi v22.8h, #28
|
||||
.endif
|
||||
mul w7, w4, w5
|
||||
lsl w14, w5, #3
|
||||
@@ -55,139 +55,139 @@ function ff_\type\()_\codec\()_chroma_mc8_neon, export=1
|
||||
add w4, w4, #64
|
||||
b.eq 2f
|
||||
|
||||
dup v0.8B, w4
|
||||
dup v1.8B, w12
|
||||
ld1 {v4.8B, v5.8B}, [x1], x2
|
||||
dup v2.8B, w6
|
||||
dup v3.8B, w7
|
||||
ext v5.8B, v4.8B, v5.8B, #1
|
||||
1: ld1 {v6.8B, v7.8B}, [x1], x2
|
||||
umull v16.8H, v4.8B, v0.8B
|
||||
umlal v16.8H, v5.8B, v1.8B
|
||||
ext v7.8B, v6.8B, v7.8B, #1
|
||||
ld1 {v4.8B, v5.8B}, [x1], x2
|
||||
umlal v16.8H, v6.8B, v2.8B
|
||||
dup v0.8b, w4
|
||||
dup v1.8b, w12
|
||||
ld1 {v4.8b, v5.8b}, [x1], x2
|
||||
dup v2.8b, w6
|
||||
dup v3.8b, w7
|
||||
ext v5.8b, v4.8b, v5.8b, #1
|
||||
1: ld1 {v6.8b, v7.8b}, [x1], x2
|
||||
umull v16.8h, v4.8b, v0.8b
|
||||
umlal v16.8h, v5.8b, v1.8b
|
||||
ext v7.8b, v6.8b, v7.8b, #1
|
||||
ld1 {v4.8b, v5.8b}, [x1], x2
|
||||
umlal v16.8h, v6.8b, v2.8b
|
||||
prfm pldl1strm, [x1]
|
||||
ext v5.8B, v4.8B, v5.8B, #1
|
||||
umlal v16.8H, v7.8B, v3.8B
|
||||
umull v17.8H, v6.8B, v0.8B
|
||||
ext v5.8b, v4.8b, v5.8b, #1
|
||||
umlal v16.8h, v7.8b, v3.8b
|
||||
umull v17.8h, v6.8b, v0.8b
|
||||
subs w3, w3, #2
|
||||
umlal v17.8H, v7.8B, v1.8B
|
||||
umlal v17.8H, v4.8B, v2.8B
|
||||
umlal v17.8H, v5.8B, v3.8B
|
||||
umlal v17.8h, v7.8b, v1.8b
|
||||
umlal v17.8h, v4.8b, v2.8b
|
||||
umlal v17.8h, v5.8b, v3.8b
|
||||
prfm pldl1strm, [x1, x2]
|
||||
.ifc \codec,h264
|
||||
rshrn v16.8B, v16.8H, #6
|
||||
rshrn v17.8B, v17.8H, #6
|
||||
rshrn v16.8b, v16.8h, #6
|
||||
rshrn v17.8b, v17.8h, #6
|
||||
.else
|
||||
add v16.8H, v16.8H, v22.8H
|
||||
add v17.8H, v17.8H, v22.8H
|
||||
shrn v16.8B, v16.8H, #6
|
||||
shrn v17.8B, v17.8H, #6
|
||||
add v16.8h, v16.8h, v22.8h
|
||||
add v17.8h, v17.8h, v22.8h
|
||||
shrn v16.8b, v16.8h, #6
|
||||
shrn v17.8b, v17.8h, #6
|
||||
.endif
|
||||
.ifc \type,avg
|
||||
ld1 {v20.8B}, [x8], x2
|
||||
ld1 {v21.8B}, [x8], x2
|
||||
urhadd v16.8B, v16.8B, v20.8B
|
||||
urhadd v17.8B, v17.8B, v21.8B
|
||||
ld1 {v20.8b}, [x8], x2
|
||||
ld1 {v21.8b}, [x8], x2
|
||||
urhadd v16.8b, v16.8b, v20.8b
|
||||
urhadd v17.8b, v17.8b, v21.8b
|
||||
.endif
|
||||
st1 {v16.8B}, [x0], x2
|
||||
st1 {v17.8B}, [x0], x2
|
||||
st1 {v16.8b}, [x0], x2
|
||||
st1 {v17.8b}, [x0], x2
|
||||
b.gt 1b
|
||||
ret
|
||||
|
||||
2: adds w12, w12, w6
|
||||
dup v0.8B, w4
|
||||
dup v0.8b, w4
|
||||
b.eq 5f
|
||||
tst w6, w6
|
||||
dup v1.8B, w12
|
||||
dup v1.8b, w12
|
||||
b.eq 4f
|
||||
|
||||
ld1 {v4.8B}, [x1], x2
|
||||
3: ld1 {v6.8B}, [x1], x2
|
||||
umull v16.8H, v4.8B, v0.8B
|
||||
umlal v16.8H, v6.8B, v1.8B
|
||||
ld1 {v4.8B}, [x1], x2
|
||||
umull v17.8H, v6.8B, v0.8B
|
||||
umlal v17.8H, v4.8B, v1.8B
|
||||
ld1 {v4.8b}, [x1], x2
|
||||
3: ld1 {v6.8b}, [x1], x2
|
||||
umull v16.8h, v4.8b, v0.8b
|
||||
umlal v16.8h, v6.8b, v1.8b
|
||||
ld1 {v4.8b}, [x1], x2
|
||||
umull v17.8h, v6.8b, v0.8b
|
||||
umlal v17.8h, v4.8b, v1.8b
|
||||
prfm pldl1strm, [x1]
|
||||
.ifc \codec,h264
|
||||
rshrn v16.8B, v16.8H, #6
|
||||
rshrn v17.8B, v17.8H, #6
|
||||
rshrn v16.8b, v16.8h, #6
|
||||
rshrn v17.8b, v17.8h, #6
|
||||
.else
|
||||
add v16.8H, v16.8H, v22.8H
|
||||
add v17.8H, v17.8H, v22.8H
|
||||
shrn v16.8B, v16.8H, #6
|
||||
shrn v17.8B, v17.8H, #6
|
||||
add v16.8h, v16.8h, v22.8h
|
||||
add v17.8h, v17.8h, v22.8h
|
||||
shrn v16.8b, v16.8h, #6
|
||||
shrn v17.8b, v17.8h, #6
|
||||
.endif
|
||||
prfm pldl1strm, [x1, x2]
|
||||
.ifc \type,avg
|
||||
ld1 {v20.8B}, [x8], x2
|
||||
ld1 {v21.8B}, [x8], x2
|
||||
urhadd v16.8B, v16.8B, v20.8B
|
||||
urhadd v17.8B, v17.8B, v21.8B
|
||||
ld1 {v20.8b}, [x8], x2
|
||||
ld1 {v21.8b}, [x8], x2
|
||||
urhadd v16.8b, v16.8b, v20.8b
|
||||
urhadd v17.8b, v17.8b, v21.8b
|
||||
.endif
|
||||
subs w3, w3, #2
|
||||
st1 {v16.8B}, [x0], x2
|
||||
st1 {v17.8B}, [x0], x2
|
||||
st1 {v16.8b}, [x0], x2
|
||||
st1 {v17.8b}, [x0], x2
|
||||
b.gt 3b
|
||||
ret
|
||||
|
||||
4: ld1 {v4.8B, v5.8B}, [x1], x2
|
||||
ld1 {v6.8B, v7.8B}, [x1], x2
|
||||
ext v5.8B, v4.8B, v5.8B, #1
|
||||
ext v7.8B, v6.8B, v7.8B, #1
|
||||
4: ld1 {v4.8b, v5.8b}, [x1], x2
|
||||
ld1 {v6.8b, v7.8b}, [x1], x2
|
||||
ext v5.8b, v4.8b, v5.8b, #1
|
||||
ext v7.8b, v6.8b, v7.8b, #1
|
||||
prfm pldl1strm, [x1]
|
||||
subs w3, w3, #2
|
||||
umull v16.8H, v4.8B, v0.8B
|
||||
umlal v16.8H, v5.8B, v1.8B
|
||||
umull v17.8H, v6.8B, v0.8B
|
||||
umlal v17.8H, v7.8B, v1.8B
|
||||
umull v16.8h, v4.8b, v0.8b
|
||||
umlal v16.8h, v5.8b, v1.8b
|
||||
umull v17.8h, v6.8b, v0.8b
|
||||
umlal v17.8h, v7.8b, v1.8b
|
||||
prfm pldl1strm, [x1, x2]
|
||||
.ifc \codec,h264
|
||||
rshrn v16.8B, v16.8H, #6
|
||||
rshrn v17.8B, v17.8H, #6
|
||||
rshrn v16.8b, v16.8h, #6
|
||||
rshrn v17.8b, v17.8h, #6
|
||||
.else
|
||||
add v16.8H, v16.8H, v22.8H
|
||||
add v17.8H, v17.8H, v22.8H
|
||||
shrn v16.8B, v16.8H, #6
|
||||
shrn v17.8B, v17.8H, #6
|
||||
add v16.8h, v16.8h, v22.8h
|
||||
add v17.8h, v17.8h, v22.8h
|
||||
shrn v16.8b, v16.8h, #6
|
||||
shrn v17.8b, v17.8h, #6
|
||||
.endif
|
||||
.ifc \type,avg
|
||||
ld1 {v20.8B}, [x8], x2
|
||||
ld1 {v21.8B}, [x8], x2
|
||||
urhadd v16.8B, v16.8B, v20.8B
|
||||
urhadd v17.8B, v17.8B, v21.8B
|
||||
ld1 {v20.8b}, [x8], x2
|
||||
ld1 {v21.8b}, [x8], x2
|
||||
urhadd v16.8b, v16.8b, v20.8b
|
||||
urhadd v17.8b, v17.8b, v21.8b
|
||||
.endif
|
||||
st1 {v16.8B}, [x0], x2
|
||||
st1 {v17.8B}, [x0], x2
|
||||
st1 {v16.8b}, [x0], x2
|
||||
st1 {v17.8b}, [x0], x2
|
||||
b.gt 4b
|
||||
ret
|
||||
|
||||
5: ld1 {v4.8B}, [x1], x2
|
||||
ld1 {v5.8B}, [x1], x2
|
||||
5: ld1 {v4.8b}, [x1], x2
|
||||
ld1 {v5.8b}, [x1], x2
|
||||
prfm pldl1strm, [x1]
|
||||
subs w3, w3, #2
|
||||
umull v16.8H, v4.8B, v0.8B
|
||||
umull v17.8H, v5.8B, v0.8B
|
||||
umull v16.8h, v4.8b, v0.8b
|
||||
umull v17.8h, v5.8b, v0.8b
|
||||
prfm pldl1strm, [x1, x2]
|
||||
.ifc \codec,h264
|
||||
rshrn v16.8B, v16.8H, #6
|
||||
rshrn v17.8B, v17.8H, #6
|
||||
rshrn v16.8b, v16.8h, #6
|
||||
rshrn v17.8b, v17.8h, #6
|
||||
.else
|
||||
add v16.8H, v16.8H, v22.8H
|
||||
add v17.8H, v17.8H, v22.8H
|
||||
shrn v16.8B, v16.8H, #6
|
||||
shrn v17.8B, v17.8H, #6
|
||||
add v16.8h, v16.8h, v22.8h
|
||||
add v17.8h, v17.8h, v22.8h
|
||||
shrn v16.8b, v16.8h, #6
|
||||
shrn v17.8b, v17.8h, #6
|
||||
.endif
|
||||
.ifc \type,avg
|
||||
ld1 {v20.8B}, [x8], x2
|
||||
ld1 {v21.8B}, [x8], x2
|
||||
urhadd v16.8B, v16.8B, v20.8B
|
||||
urhadd v17.8B, v17.8B, v21.8B
|
||||
ld1 {v20.8b}, [x8], x2
|
||||
ld1 {v21.8b}, [x8], x2
|
||||
urhadd v16.8b, v16.8b, v20.8b
|
||||
urhadd v17.8b, v17.8b, v21.8b
|
||||
.endif
|
||||
st1 {v16.8B}, [x0], x2
|
||||
st1 {v17.8B}, [x0], x2
|
||||
st1 {v16.8b}, [x0], x2
|
||||
st1 {v17.8b}, [x0], x2
|
||||
b.gt 5b
|
||||
ret
|
||||
endfunc
|
||||
@@ -208,11 +208,11 @@ function ff_\type\()_\codec\()_chroma_mc4_neon, export=1
|
||||
lsl w9, w9, #3
|
||||
lsl w10, w10, #1
|
||||
add w9, w9, w10
|
||||
add x6, x6, w9, UXTW
|
||||
ld1r {v22.8H}, [x6]
|
||||
add x6, x6, w9, uxtw
|
||||
ld1r {v22.8h}, [x6]
|
||||
.endif
|
||||
.ifc \codec,vc1
|
||||
movi v22.8H, #28
|
||||
movi v22.8h, #28
|
||||
.endif
|
||||
mul w7, w4, w5
|
||||
lsl w14, w5, #3
|
||||
@@ -225,133 +225,133 @@ function ff_\type\()_\codec\()_chroma_mc4_neon, export=1
|
||||
add w4, w4, #64
|
||||
b.eq 2f
|
||||
|
||||
dup v24.8B, w4
|
||||
dup v25.8B, w12
|
||||
ld1 {v4.8B}, [x1], x2
|
||||
dup v26.8B, w6
|
||||
dup v27.8B, w7
|
||||
ext v5.8B, v4.8B, v5.8B, #1
|
||||
trn1 v0.2S, v24.2S, v25.2S
|
||||
trn1 v2.2S, v26.2S, v27.2S
|
||||
trn1 v4.2S, v4.2S, v5.2S
|
||||
1: ld1 {v6.8B}, [x1], x2
|
||||
ext v7.8B, v6.8B, v7.8B, #1
|
||||
trn1 v6.2S, v6.2S, v7.2S
|
||||
umull v18.8H, v4.8B, v0.8B
|
||||
umlal v18.8H, v6.8B, v2.8B
|
||||
ld1 {v4.8B}, [x1], x2
|
||||
ext v5.8B, v4.8B, v5.8B, #1
|
||||
trn1 v4.2S, v4.2S, v5.2S
|
||||
dup v24.8b, w4
|
||||
dup v25.8b, w12
|
||||
ld1 {v4.8b}, [x1], x2
|
||||
dup v26.8b, w6
|
||||
dup v27.8b, w7
|
||||
ext v5.8b, v4.8b, v5.8b, #1
|
||||
trn1 v0.2s, v24.2s, v25.2s
|
||||
trn1 v2.2s, v26.2s, v27.2s
|
||||
trn1 v4.2s, v4.2s, v5.2s
|
||||
1: ld1 {v6.8b}, [x1], x2
|
||||
ext v7.8b, v6.8b, v7.8b, #1
|
||||
trn1 v6.2s, v6.2s, v7.2s
|
||||
umull v18.8h, v4.8b, v0.8b
|
||||
umlal v18.8h, v6.8b, v2.8b
|
||||
ld1 {v4.8b}, [x1], x2
|
||||
ext v5.8b, v4.8b, v5.8b, #1
|
||||
trn1 v4.2s, v4.2s, v5.2s
|
||||
prfm pldl1strm, [x1]
|
||||
umull v19.8H, v6.8B, v0.8B
|
||||
umlal v19.8H, v4.8B, v2.8B
|
||||
trn1 v30.2D, v18.2D, v19.2D
|
||||
trn2 v31.2D, v18.2D, v19.2D
|
||||
add v18.8H, v30.8H, v31.8H
|
||||
umull v19.8h, v6.8b, v0.8b
|
||||
umlal v19.8h, v4.8b, v2.8b
|
||||
trn1 v30.2d, v18.2d, v19.2d
|
||||
trn2 v31.2d, v18.2d, v19.2d
|
||||
add v18.8h, v30.8h, v31.8h
|
||||
.ifc \codec,h264
|
||||
rshrn v16.8B, v18.8H, #6
|
||||
rshrn v16.8b, v18.8h, #6
|
||||
.else
|
||||
add v18.8H, v18.8H, v22.8H
|
||||
shrn v16.8B, v18.8H, #6
|
||||
add v18.8h, v18.8h, v22.8h
|
||||
shrn v16.8b, v18.8h, #6
|
||||
.endif
|
||||
subs w3, w3, #2
|
||||
prfm pldl1strm, [x1, x2]
|
||||
.ifc \type,avg
|
||||
ld1 {v20.S}[0], [x8], x2
|
||||
ld1 {v20.S}[1], [x8], x2
|
||||
urhadd v16.8B, v16.8B, v20.8B
|
||||
ld1 {v20.s}[0], [x8], x2
|
||||
ld1 {v20.s}[1], [x8], x2
|
||||
urhadd v16.8b, v16.8b, v20.8b
|
||||
.endif
|
||||
st1 {v16.S}[0], [x0], x2
|
||||
st1 {v16.S}[1], [x0], x2
|
||||
st1 {v16.s}[0], [x0], x2
|
||||
st1 {v16.s}[1], [x0], x2
|
||||
b.gt 1b
|
||||
ret
|
||||
|
||||
2: adds w12, w12, w6
|
||||
dup v30.8B, w4
|
||||
dup v30.8b, w4
|
||||
b.eq 5f
|
||||
tst w6, w6
|
||||
dup v31.8B, w12
|
||||
trn1 v0.2S, v30.2S, v31.2S
|
||||
trn2 v1.2S, v30.2S, v31.2S
|
||||
dup v31.8b, w12
|
||||
trn1 v0.2s, v30.2s, v31.2s
|
||||
trn2 v1.2s, v30.2s, v31.2s
|
||||
b.eq 4f
|
||||
|
||||
ext v1.8B, v0.8B, v1.8B, #4
|
||||
ld1 {v4.S}[0], [x1], x2
|
||||
3: ld1 {v4.S}[1], [x1], x2
|
||||
umull v18.8H, v4.8B, v0.8B
|
||||
ld1 {v4.S}[0], [x1], x2
|
||||
umull v19.8H, v4.8B, v1.8B
|
||||
trn1 v30.2D, v18.2D, v19.2D
|
||||
trn2 v31.2D, v18.2D, v19.2D
|
||||
add v18.8H, v30.8H, v31.8H
|
||||
ext v1.8b, v0.8b, v1.8b, #4
|
||||
ld1 {v4.s}[0], [x1], x2
|
||||
3: ld1 {v4.s}[1], [x1], x2
|
||||
umull v18.8h, v4.8b, v0.8b
|
||||
ld1 {v4.s}[0], [x1], x2
|
||||
umull v19.8h, v4.8b, v1.8b
|
||||
trn1 v30.2d, v18.2d, v19.2d
|
||||
trn2 v31.2d, v18.2d, v19.2d
|
||||
add v18.8h, v30.8h, v31.8h
|
||||
prfm pldl1strm, [x1]
|
||||
.ifc \codec,h264
|
||||
rshrn v16.8B, v18.8H, #6
|
||||
rshrn v16.8b, v18.8h, #6
|
||||
.else
|
||||
add v18.8H, v18.8H, v22.8H
|
||||
shrn v16.8B, v18.8H, #6
|
||||
add v18.8h, v18.8h, v22.8h
|
||||
shrn v16.8b, v18.8h, #6
|
||||
.endif
|
||||
.ifc \type,avg
|
||||
ld1 {v20.S}[0], [x8], x2
|
||||
ld1 {v20.S}[1], [x8], x2
|
||||
urhadd v16.8B, v16.8B, v20.8B
|
||||
ld1 {v20.s}[0], [x8], x2
|
||||
ld1 {v20.s}[1], [x8], x2
|
||||
urhadd v16.8b, v16.8b, v20.8b
|
||||
.endif
|
||||
subs w3, w3, #2
|
||||
prfm pldl1strm, [x1, x2]
|
||||
st1 {v16.S}[0], [x0], x2
|
||||
st1 {v16.S}[1], [x0], x2
|
||||
st1 {v16.s}[0], [x0], x2
|
||||
st1 {v16.s}[1], [x0], x2
|
||||
b.gt 3b
|
||||
ret
|
||||
|
||||
4: ld1 {v4.8B}, [x1], x2
|
||||
ld1 {v6.8B}, [x1], x2
|
||||
ext v5.8B, v4.8B, v5.8B, #1
|
||||
ext v7.8B, v6.8B, v7.8B, #1
|
||||
trn1 v4.2S, v4.2S, v5.2S
|
||||
trn1 v6.2S, v6.2S, v7.2S
|
||||
umull v18.8H, v4.8B, v0.8B
|
||||
umull v19.8H, v6.8B, v0.8B
|
||||
4: ld1 {v4.8b}, [x1], x2
|
||||
ld1 {v6.8b}, [x1], x2
|
||||
ext v5.8b, v4.8b, v5.8b, #1
|
||||
ext v7.8b, v6.8b, v7.8b, #1
|
||||
trn1 v4.2s, v4.2s, v5.2s
|
||||
trn1 v6.2s, v6.2s, v7.2s
|
||||
umull v18.8h, v4.8b, v0.8b
|
||||
umull v19.8h, v6.8b, v0.8b
|
||||
subs w3, w3, #2
|
||||
trn1 v30.2D, v18.2D, v19.2D
|
||||
trn2 v31.2D, v18.2D, v19.2D
|
||||
add v18.8H, v30.8H, v31.8H
|
||||
trn1 v30.2d, v18.2d, v19.2d
|
||||
trn2 v31.2d, v18.2d, v19.2d
|
||||
add v18.8h, v30.8h, v31.8h
|
||||
prfm pldl1strm, [x1]
|
||||
.ifc \codec,h264
|
||||
rshrn v16.8B, v18.8H, #6
|
||||
rshrn v16.8b, v18.8h, #6
|
||||
.else
|
||||
add v18.8H, v18.8H, v22.8H
|
||||
shrn v16.8B, v18.8H, #6
|
||||
add v18.8h, v18.8h, v22.8h
|
||||
shrn v16.8b, v18.8h, #6
|
||||
.endif
|
||||
.ifc \type,avg
|
||||
ld1 {v20.S}[0], [x8], x2
|
||||
ld1 {v20.S}[1], [x8], x2
|
||||
urhadd v16.8B, v16.8B, v20.8B
|
||||
ld1 {v20.s}[0], [x8], x2
|
||||
ld1 {v20.s}[1], [x8], x2
|
||||
urhadd v16.8b, v16.8b, v20.8b
|
||||
.endif
|
||||
prfm pldl1strm, [x1]
|
||||
st1 {v16.S}[0], [x0], x2
|
||||
st1 {v16.S}[1], [x0], x2
|
||||
st1 {v16.s}[0], [x0], x2
|
||||
st1 {v16.s}[1], [x0], x2
|
||||
b.gt 4b
|
||||
ret
|
||||
|
||||
5: ld1 {v4.S}[0], [x1], x2
|
||||
ld1 {v4.S}[1], [x1], x2
|
||||
umull v18.8H, v4.8B, v30.8B
|
||||
5: ld1 {v4.s}[0], [x1], x2
|
||||
ld1 {v4.s}[1], [x1], x2
|
||||
umull v18.8h, v4.8b, v30.8b
|
||||
subs w3, w3, #2
|
||||
prfm pldl1strm, [x1]
|
||||
.ifc \codec,h264
|
||||
rshrn v16.8B, v18.8H, #6
|
||||
rshrn v16.8b, v18.8h, #6
|
||||
.else
|
||||
add v18.8H, v18.8H, v22.8H
|
||||
shrn v16.8B, v18.8H, #6
|
||||
add v18.8h, v18.8h, v22.8h
|
||||
shrn v16.8b, v18.8h, #6
|
||||
.endif
|
||||
.ifc \type,avg
|
||||
ld1 {v20.S}[0], [x8], x2
|
||||
ld1 {v20.S}[1], [x8], x2
|
||||
urhadd v16.8B, v16.8B, v20.8B
|
||||
ld1 {v20.s}[0], [x8], x2
|
||||
ld1 {v20.s}[1], [x8], x2
|
||||
urhadd v16.8b, v16.8b, v20.8b
|
||||
.endif
|
||||
prfm pldl1strm, [x1]
|
||||
st1 {v16.S}[0], [x0], x2
|
||||
st1 {v16.S}[1], [x0], x2
|
||||
st1 {v16.s}[0], [x0], x2
|
||||
st1 {v16.s}[1], [x0], x2
|
||||
b.gt 5b
|
||||
ret
|
||||
endfunc
|
||||
@@ -372,51 +372,51 @@ function ff_\type\()_h264_chroma_mc2_neon, export=1
|
||||
sub w4, w7, w13
|
||||
sub w4, w4, w14
|
||||
add w4, w4, #64
|
||||
dup v0.8B, w4
|
||||
dup v2.8B, w12
|
||||
dup v1.8B, w6
|
||||
dup v3.8B, w7
|
||||
trn1 v0.4H, v0.4H, v2.4H
|
||||
trn1 v1.4H, v1.4H, v3.4H
|
||||
dup v0.8b, w4
|
||||
dup v2.8b, w12
|
||||
dup v1.8b, w6
|
||||
dup v3.8b, w7
|
||||
trn1 v0.4h, v0.4h, v2.4h
|
||||
trn1 v1.4h, v1.4h, v3.4h
|
||||
1:
|
||||
ld1 {v4.S}[0], [x1], x2
|
||||
ld1 {v4.S}[1], [x1], x2
|
||||
rev64 v5.2S, v4.2S
|
||||
ld1 {v5.S}[1], [x1]
|
||||
ext v6.8B, v4.8B, v5.8B, #1
|
||||
ext v7.8B, v5.8B, v4.8B, #1
|
||||
trn1 v4.4H, v4.4H, v6.4H
|
||||
trn1 v5.4H, v5.4H, v7.4H
|
||||
umull v16.8H, v4.8B, v0.8B
|
||||
umlal v16.8H, v5.8B, v1.8B
|
||||
ld1 {v4.s}[0], [x1], x2
|
||||
ld1 {v4.s}[1], [x1], x2
|
||||
rev64 v5.2s, v4.2s
|
||||
ld1 {v5.s}[1], [x1]
|
||||
ext v6.8b, v4.8b, v5.8b, #1
|
||||
ext v7.8b, v5.8b, v4.8b, #1
|
||||
trn1 v4.4h, v4.4h, v6.4h
|
||||
trn1 v5.4h, v5.4h, v7.4h
|
||||
umull v16.8h, v4.8b, v0.8b
|
||||
umlal v16.8h, v5.8b, v1.8b
|
||||
.ifc \type,avg
|
||||
ld1 {v18.H}[0], [x0], x2
|
||||
ld1 {v18.H}[2], [x0]
|
||||
ld1 {v18.h}[0], [x0], x2
|
||||
ld1 {v18.h}[2], [x0]
|
||||
sub x0, x0, x2
|
||||
.endif
|
||||
rev64 v17.4S, v16.4S
|
||||
add v16.8H, v16.8H, v17.8H
|
||||
rshrn v16.8B, v16.8H, #6
|
||||
rev64 v17.4s, v16.4s
|
||||
add v16.8h, v16.8h, v17.8h
|
||||
rshrn v16.8b, v16.8h, #6
|
||||
.ifc \type,avg
|
||||
urhadd v16.8B, v16.8B, v18.8B
|
||||
urhadd v16.8b, v16.8b, v18.8b
|
||||
.endif
|
||||
st1 {v16.H}[0], [x0], x2
|
||||
st1 {v16.H}[2], [x0], x2
|
||||
st1 {v16.h}[0], [x0], x2
|
||||
st1 {v16.h}[2], [x0], x2
|
||||
subs w3, w3, #2
|
||||
b.gt 1b
|
||||
ret
|
||||
|
||||
2:
|
||||
ld1 {v16.H}[0], [x1], x2
|
||||
ld1 {v16.H}[1], [x1], x2
|
||||
ld1 {v16.h}[0], [x1], x2
|
||||
ld1 {v16.h}[1], [x1], x2
|
||||
.ifc \type,avg
|
||||
ld1 {v18.H}[0], [x0], x2
|
||||
ld1 {v18.H}[1], [x0]
|
||||
ld1 {v18.h}[0], [x0], x2
|
||||
ld1 {v18.h}[1], [x0]
|
||||
sub x0, x0, x2
|
||||
urhadd v16.8B, v16.8B, v18.8B
|
||||
urhadd v16.8b, v16.8b, v18.8b
|
||||
.endif
|
||||
st1 {v16.H}[0], [x0], x2
|
||||
st1 {v16.H}[1], [x0], x2
|
||||
st1 {v16.h}[0], [x0], x2
|
||||
st1 {v16.h}[1], [x0], x2
|
||||
subs w3, w3, #2
|
||||
b.gt 2b
|
||||
ret
|
||||
|
||||
+301
-301
@@ -27,7 +27,7 @@
|
||||
cmp w2, #0
|
||||
ldr w6, [x4]
|
||||
ccmp w3, #0, #0, ne
|
||||
mov v24.S[0], w6
|
||||
mov v24.s[0], w6
|
||||
and w8, w6, w6, lsl #16
|
||||
b.eq 1f
|
||||
ands w8, w8, w8, lsl #8
|
||||
@@ -38,95 +38,95 @@
|
||||
.endm
|
||||
|
||||
.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)
|
||||
and v21.16B, v21.16B, v30.16B // < beta
|
||||
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)
|
||||
and v21.16b, v21.16b, v30.16b // < beta
|
||||
shrn v30.8b, v21.8h, #4
|
||||
mov x7, v30.d[0]
|
||||
cmhi v17.16B, v22.16B, v17.16B // < beta
|
||||
cmhi v19.16B, v22.16B, v19.16B // < beta
|
||||
cmhi v17.16b, v22.16b, v17.16b // < beta
|
||||
cmhi v19.16b, v22.16b, v19.16b // < beta
|
||||
cbz x7, 9f
|
||||
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
|
||||
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 ff_h264_v_loop_filter_luma_neon, export=1
|
||||
h264_loop_filter_start
|
||||
|
||||
ld1 {v0.16B}, [x0], x1
|
||||
ld1 {v2.16B}, [x0], x1
|
||||
ld1 {v4.16B}, [x0], x1
|
||||
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
|
||||
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]
|
||||
st1 {v17.16b}, [x0], x1
|
||||
st1 {v16.16b}, [x0], x1
|
||||
st1 {v0.16b}, [x0], x1
|
||||
st1 {v19.16b}, [x0]
|
||||
9:
|
||||
ret
|
||||
endfunc
|
||||
@@ -135,22 +135,22 @@ function ff_h264_h_loop_filter_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
|
||||
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_8x16B v6, v20, v18, v16, v0, v2, v4, v26, v21, v23
|
||||
|
||||
@@ -160,22 +160,22 @@ function ff_h264_h_loop_filter_luma_neon, export=1
|
||||
|
||||
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
|
||||
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
|
||||
9:
|
||||
ret
|
||||
endfunc
|
||||
@@ -377,52 +377,52 @@ function ff_h264_h_loop_filter_luma_intra_neon, export=1
|
||||
endfunc
|
||||
|
||||
.macro h264_loop_filter_chroma
|
||||
dup v22.8B, w2 // alpha
|
||||
dup v23.8B, w3 // beta
|
||||
uxtl v24.8H, v24.8B
|
||||
uabd v26.8B, v16.8B, v0.8B // abs(p0 - q0)
|
||||
uabd v28.8B, v18.8B, v16.8B // abs(p1 - p0)
|
||||
uabd v30.8B, v2.8B, v0.8B // abs(q1 - q0)
|
||||
cmhi v26.8B, v22.8B, v26.8B // < alpha
|
||||
cmhi v28.8B, v23.8B, v28.8B // < beta
|
||||
cmhi v30.8B, v23.8B, v30.8B // < beta
|
||||
uxtl v4.8H, v0.8B
|
||||
and v26.8B, v26.8B, v28.8B
|
||||
usubw v4.8H, v4.8H, v16.8B
|
||||
and v26.8B, v26.8B, v30.8B
|
||||
shl v4.8H, v4.8H, #2
|
||||
dup v22.8b, w2 // alpha
|
||||
dup v23.8b, w3 // beta
|
||||
uxtl v24.8h, v24.8b
|
||||
uabd v26.8b, v16.8b, v0.8b // abs(p0 - q0)
|
||||
uabd v28.8b, v18.8b, v16.8b // abs(p1 - p0)
|
||||
uabd v30.8b, v2.8b, v0.8b // abs(q1 - q0)
|
||||
cmhi v26.8b, v22.8b, v26.8b // < alpha
|
||||
cmhi v28.8b, v23.8b, v28.8b // < beta
|
||||
cmhi v30.8b, v23.8b, v30.8b // < beta
|
||||
uxtl v4.8h, v0.8b
|
||||
and v26.8b, v26.8b, v28.8b
|
||||
usubw v4.8h, v4.8h, v16.8b
|
||||
and v26.8b, v26.8b, v30.8b
|
||||
shl v4.8h, v4.8h, #2
|
||||
mov x8, v26.d[0]
|
||||
sli v24.8H, v24.8H, #8
|
||||
uaddw v4.8H, v4.8H, v18.8B
|
||||
sli v24.8h, v24.8h, #8
|
||||
uaddw v4.8h, v4.8h, v18.8b
|
||||
cbz x8, 9f
|
||||
usubw v4.8H, v4.8H, v2.8B
|
||||
rshrn v4.8B, v4.8H, #3
|
||||
smin v4.8B, v4.8B, v24.8B
|
||||
neg v25.8B, v24.8B
|
||||
smax v4.8B, v4.8B, v25.8B
|
||||
uxtl v22.8H, v0.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 v0.8B, v22.8H
|
||||
usubw v4.8h, v4.8h, v2.8b
|
||||
rshrn v4.8b, v4.8h, #3
|
||||
smin v4.8b, v4.8b, v24.8b
|
||||
neg v25.8b, v24.8b
|
||||
smax v4.8b, v4.8b, v25.8b
|
||||
uxtl v22.8h, v0.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 v0.8b, v22.8h
|
||||
.endm
|
||||
|
||||
function ff_h264_v_loop_filter_chroma_neon, export=1
|
||||
h264_loop_filter_start
|
||||
|
||||
sub x0, x0, x1, lsl #1
|
||||
ld1 {v18.8B}, [x0], x1
|
||||
ld1 {v16.8B}, [x0], x1
|
||||
ld1 {v0.8B}, [x0], x1
|
||||
ld1 {v2.8B}, [x0]
|
||||
ld1 {v18.8b}, [x0], x1
|
||||
ld1 {v16.8b}, [x0], x1
|
||||
ld1 {v0.8b}, [x0], x1
|
||||
ld1 {v2.8b}, [x0]
|
||||
|
||||
h264_loop_filter_chroma
|
||||
|
||||
sub x0, x0, x1, lsl #1
|
||||
st1 {v16.8B}, [x0], x1
|
||||
st1 {v0.8B}, [x0], x1
|
||||
st1 {v16.8b}, [x0], x1
|
||||
st1 {v0.8b}, [x0], x1
|
||||
9:
|
||||
ret
|
||||
endfunc
|
||||
@@ -432,14 +432,14 @@ function ff_h264_h_loop_filter_chroma_neon, export=1
|
||||
|
||||
sub x0, x0, #2
|
||||
h_loop_filter_chroma420:
|
||||
ld1 {v18.S}[0], [x0], x1
|
||||
ld1 {v16.S}[0], [x0], x1
|
||||
ld1 {v0.S}[0], [x0], x1
|
||||
ld1 {v2.S}[0], [x0], x1
|
||||
ld1 {v18.S}[1], [x0], x1
|
||||
ld1 {v16.S}[1], [x0], x1
|
||||
ld1 {v0.S}[1], [x0], x1
|
||||
ld1 {v2.S}[1], [x0], x1
|
||||
ld1 {v18.s}[0], [x0], x1
|
||||
ld1 {v16.s}[0], [x0], x1
|
||||
ld1 {v0.s}[0], [x0], x1
|
||||
ld1 {v2.s}[0], [x0], x1
|
||||
ld1 {v18.s}[1], [x0], x1
|
||||
ld1 {v16.s}[1], [x0], x1
|
||||
ld1 {v0.s}[1], [x0], x1
|
||||
ld1 {v2.s}[1], [x0], x1
|
||||
|
||||
transpose_4x8B v18, v16, v0, v2, v28, v29, v30, v31
|
||||
|
||||
@@ -448,14 +448,14 @@ h_loop_filter_chroma420:
|
||||
transpose_4x8B v18, v16, v0, v2, v28, v29, v30, v31
|
||||
|
||||
sub x0, x0, x1, lsl #3
|
||||
st1 {v18.S}[0], [x0], x1
|
||||
st1 {v16.S}[0], [x0], x1
|
||||
st1 {v0.S}[0], [x0], x1
|
||||
st1 {v2.S}[0], [x0], x1
|
||||
st1 {v18.S}[1], [x0], x1
|
||||
st1 {v16.S}[1], [x0], x1
|
||||
st1 {v0.S}[1], [x0], x1
|
||||
st1 {v2.S}[1], [x0], x1
|
||||
st1 {v18.s}[0], [x0], x1
|
||||
st1 {v16.s}[0], [x0], x1
|
||||
st1 {v0.s}[0], [x0], x1
|
||||
st1 {v2.s}[0], [x0], x1
|
||||
st1 {v18.s}[1], [x0], x1
|
||||
st1 {v16.s}[1], [x0], x1
|
||||
st1 {v0.s}[1], [x0], x1
|
||||
st1 {v2.s}[1], [x0], x1
|
||||
9:
|
||||
ret
|
||||
endfunc
|
||||
@@ -526,7 +526,7 @@ function ff_h264_h_loop_filter_chroma_mbaff_intra_neon, export=1
|
||||
ld1 {v17.8b}, [x4], x1
|
||||
ld1 {v19.8b}, [x4], x1
|
||||
|
||||
transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29
|
||||
transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29
|
||||
|
||||
h264_loop_filter_chroma_intra
|
||||
|
||||
@@ -554,7 +554,7 @@ h_loop_filter_chroma420_intra:
|
||||
ld1 {v17.s}[1], [x4], x1
|
||||
ld1 {v19.s}[1], [x4], x1
|
||||
|
||||
transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29
|
||||
transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29
|
||||
|
||||
h264_loop_filter_chroma_intra
|
||||
|
||||
@@ -584,102 +584,102 @@ function ff_h264_h_loop_filter_chroma422_intra_neon, export=1
|
||||
endfunc
|
||||
|
||||
.macro biweight_16 macs, macd
|
||||
dup v0.16B, w5
|
||||
dup v1.16B, w6
|
||||
mov v4.16B, v16.16B
|
||||
mov v6.16B, v16.16B
|
||||
dup v0.16b, w5
|
||||
dup v1.16b, w6
|
||||
mov v4.16b, v16.16b
|
||||
mov v6.16b, v16.16b
|
||||
1: subs w3, w3, #2
|
||||
ld1 {v20.16B}, [x0], x2
|
||||
\macd v4.8H, v0.8B, v20.8B
|
||||
ld1 {v20.16b}, [x0], x2
|
||||
\macd v4.8h, v0.8b, v20.8b
|
||||
\macd\()2 v6.8H, v0.16B, v20.16B
|
||||
ld1 {v22.16B}, [x1], x2
|
||||
\macs v4.8H, v1.8B, v22.8B
|
||||
ld1 {v22.16b}, [x1], x2
|
||||
\macs v4.8h, v1.8b, v22.8b
|
||||
\macs\()2 v6.8H, v1.16B, v22.16B
|
||||
mov v24.16B, v16.16B
|
||||
ld1 {v28.16B}, [x0], x2
|
||||
mov v26.16B, v16.16B
|
||||
\macd v24.8H, v0.8B, v28.8B
|
||||
mov v24.16b, v16.16b
|
||||
ld1 {v28.16b}, [x0], x2
|
||||
mov v26.16b, v16.16b
|
||||
\macd v24.8h, v0.8b, v28.8b
|
||||
\macd\()2 v26.8H, v0.16B, v28.16B
|
||||
ld1 {v30.16B}, [x1], x2
|
||||
\macs v24.8H, v1.8B, v30.8B
|
||||
ld1 {v30.16b}, [x1], x2
|
||||
\macs v24.8h, v1.8b, v30.8b
|
||||
\macs\()2 v26.8H, v1.16B, v30.16B
|
||||
sshl v4.8H, v4.8H, v18.8H
|
||||
sshl v6.8H, v6.8H, v18.8H
|
||||
sqxtun v4.8B, v4.8H
|
||||
sqxtun2 v4.16B, v6.8H
|
||||
sshl v24.8H, v24.8H, v18.8H
|
||||
sshl v26.8H, v26.8H, v18.8H
|
||||
sqxtun v24.8B, v24.8H
|
||||
sqxtun2 v24.16B, v26.8H
|
||||
mov v6.16B, v16.16B
|
||||
st1 {v4.16B}, [x7], x2
|
||||
mov v4.16B, v16.16B
|
||||
st1 {v24.16B}, [x7], x2
|
||||
sshl v4.8h, v4.8h, v18.8h
|
||||
sshl v6.8h, v6.8h, v18.8h
|
||||
sqxtun v4.8b, v4.8h
|
||||
sqxtun2 v4.16b, v6.8h
|
||||
sshl v24.8h, v24.8h, v18.8h
|
||||
sshl v26.8h, v26.8h, v18.8h
|
||||
sqxtun v24.8b, v24.8h
|
||||
sqxtun2 v24.16b, v26.8h
|
||||
mov v6.16b, v16.16b
|
||||
st1 {v4.16b}, [x7], x2
|
||||
mov v4.16b, v16.16b
|
||||
st1 {v24.16b}, [x7], x2
|
||||
b.ne 1b
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro biweight_8 macs, macd
|
||||
dup v0.8B, w5
|
||||
dup v1.8B, w6
|
||||
mov v2.16B, v16.16B
|
||||
mov v20.16B, v16.16B
|
||||
dup v0.8b, w5
|
||||
dup v1.8b, w6
|
||||
mov v2.16b, v16.16b
|
||||
mov v20.16b, v16.16b
|
||||
1: subs w3, w3, #2
|
||||
ld1 {v4.8B}, [x0], x2
|
||||
\macd v2.8H, v0.8B, v4.8B
|
||||
ld1 {v5.8B}, [x1], x2
|
||||
\macs v2.8H, v1.8B, v5.8B
|
||||
ld1 {v6.8B}, [x0], x2
|
||||
\macd v20.8H, v0.8B, v6.8B
|
||||
ld1 {v7.8B}, [x1], x2
|
||||
\macs v20.8H, v1.8B, v7.8B
|
||||
sshl v2.8H, v2.8H, v18.8H
|
||||
sqxtun v2.8B, v2.8H
|
||||
sshl v20.8H, v20.8H, v18.8H
|
||||
sqxtun v4.8B, v20.8H
|
||||
mov v20.16B, v16.16B
|
||||
st1 {v2.8B}, [x7], x2
|
||||
mov v2.16B, v16.16B
|
||||
st1 {v4.8B}, [x7], x2
|
||||
ld1 {v4.8b}, [x0], x2
|
||||
\macd v2.8h, v0.8b, v4.8b
|
||||
ld1 {v5.8b}, [x1], x2
|
||||
\macs v2.8h, v1.8b, v5.8b
|
||||
ld1 {v6.8b}, [x0], x2
|
||||
\macd v20.8h, v0.8b, v6.8b
|
||||
ld1 {v7.8b}, [x1], x2
|
||||
\macs v20.8h, v1.8b, v7.8b
|
||||
sshl v2.8h, v2.8h, v18.8h
|
||||
sqxtun v2.8b, v2.8h
|
||||
sshl v20.8h, v20.8h, v18.8h
|
||||
sqxtun v4.8b, v20.8h
|
||||
mov v20.16b, v16.16b
|
||||
st1 {v2.8b}, [x7], x2
|
||||
mov v2.16b, v16.16b
|
||||
st1 {v4.8b}, [x7], x2
|
||||
b.ne 1b
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro biweight_4 macs, macd
|
||||
dup v0.8B, w5
|
||||
dup v1.8B, w6
|
||||
mov v2.16B, v16.16B
|
||||
mov v20.16B,v16.16B
|
||||
dup v0.8b, w5
|
||||
dup v1.8b, w6
|
||||
mov v2.16b, v16.16b
|
||||
mov v20.16b,v16.16b
|
||||
1: subs w3, w3, #4
|
||||
ld1 {v4.S}[0], [x0], x2
|
||||
ld1 {v4.S}[1], [x0], x2
|
||||
\macd v2.8H, v0.8B, v4.8B
|
||||
ld1 {v5.S}[0], [x1], x2
|
||||
ld1 {v5.S}[1], [x1], x2
|
||||
\macs v2.8H, v1.8B, v5.8B
|
||||
ld1 {v4.s}[0], [x0], x2
|
||||
ld1 {v4.s}[1], [x0], x2
|
||||
\macd v2.8h, v0.8b, v4.8b
|
||||
ld1 {v5.s}[0], [x1], x2
|
||||
ld1 {v5.s}[1], [x1], x2
|
||||
\macs v2.8h, v1.8b, v5.8b
|
||||
b.lt 2f
|
||||
ld1 {v6.S}[0], [x0], x2
|
||||
ld1 {v6.S}[1], [x0], x2
|
||||
\macd v20.8H, v0.8B, v6.8B
|
||||
ld1 {v7.S}[0], [x1], x2
|
||||
ld1 {v7.S}[1], [x1], x2
|
||||
\macs v20.8H, v1.8B, v7.8B
|
||||
sshl v2.8H, v2.8H, v18.8H
|
||||
sqxtun v2.8B, v2.8H
|
||||
sshl v20.8H, v20.8H, v18.8H
|
||||
sqxtun v4.8B, v20.8H
|
||||
mov v20.16B, v16.16B
|
||||
st1 {v2.S}[0], [x7], x2
|
||||
st1 {v2.S}[1], [x7], x2
|
||||
mov v2.16B, v16.16B
|
||||
st1 {v4.S}[0], [x7], x2
|
||||
st1 {v4.S}[1], [x7], x2
|
||||
ld1 {v6.s}[0], [x0], x2
|
||||
ld1 {v6.s}[1], [x0], x2
|
||||
\macd v20.8h, v0.8b, v6.8b
|
||||
ld1 {v7.s}[0], [x1], x2
|
||||
ld1 {v7.s}[1], [x1], x2
|
||||
\macs v20.8h, v1.8b, v7.8b
|
||||
sshl v2.8h, v2.8h, v18.8h
|
||||
sqxtun v2.8b, v2.8h
|
||||
sshl v20.8h, v20.8h, v18.8h
|
||||
sqxtun v4.8b, v20.8h
|
||||
mov v20.16b, v16.16b
|
||||
st1 {v2.s}[0], [x7], x2
|
||||
st1 {v2.s}[1], [x7], x2
|
||||
mov v2.16b, v16.16b
|
||||
st1 {v4.s}[0], [x7], x2
|
||||
st1 {v4.s}[1], [x7], x2
|
||||
b.ne 1b
|
||||
ret
|
||||
2: sshl v2.8H, v2.8H, v18.8H
|
||||
sqxtun v2.8B, v2.8H
|
||||
st1 {v2.S}[0], [x7], x2
|
||||
st1 {v2.S}[1], [x7], x2
|
||||
2: sshl v2.8h, v2.8h, v18.8h
|
||||
sqxtun v2.8b, v2.8h
|
||||
st1 {v2.s}[0], [x7], x2
|
||||
st1 {v2.s}[1], [x7], x2
|
||||
ret
|
||||
.endm
|
||||
|
||||
@@ -689,10 +689,10 @@ function ff_biweight_h264_pixels_\w\()_neon, export=1
|
||||
add w7, w7, #1
|
||||
eor w8, w8, w6, lsr #30
|
||||
orr w7, w7, #1
|
||||
dup v18.8H, w4
|
||||
dup v18.8h, w4
|
||||
lsl w7, w7, w4
|
||||
not v18.16B, v18.16B
|
||||
dup v16.8H, w7
|
||||
not v18.16b, v18.16b
|
||||
dup v16.8h, w7
|
||||
mov x7, x0
|
||||
cbz w8, 10f
|
||||
subs w8, w8, #1
|
||||
@@ -716,78 +716,78 @@ endfunc
|
||||
biweight_func 4
|
||||
|
||||
.macro weight_16 add
|
||||
dup v0.16B, w4
|
||||
dup v0.16b, w4
|
||||
1: subs w2, w2, #2
|
||||
ld1 {v20.16B}, [x0], x1
|
||||
umull v4.8H, v0.8B, v20.8B
|
||||
umull2 v6.8H, v0.16B, v20.16B
|
||||
ld1 {v28.16B}, [x0], x1
|
||||
umull v24.8H, v0.8B, v28.8B
|
||||
umull2 v26.8H, v0.16B, v28.16B
|
||||
\add v4.8H, v16.8H, v4.8H
|
||||
srshl v4.8H, v4.8H, v18.8H
|
||||
\add v6.8H, v16.8H, v6.8H
|
||||
srshl v6.8H, v6.8H, v18.8H
|
||||
sqxtun v4.8B, v4.8H
|
||||
sqxtun2 v4.16B, v6.8H
|
||||
\add v24.8H, v16.8H, v24.8H
|
||||
srshl v24.8H, v24.8H, v18.8H
|
||||
\add v26.8H, v16.8H, v26.8H
|
||||
srshl v26.8H, v26.8H, v18.8H
|
||||
sqxtun v24.8B, v24.8H
|
||||
sqxtun2 v24.16B, v26.8H
|
||||
st1 {v4.16B}, [x5], x1
|
||||
st1 {v24.16B}, [x5], x1
|
||||
ld1 {v20.16b}, [x0], x1
|
||||
umull v4.8h, v0.8b, v20.8b
|
||||
umull2 v6.8h, v0.16b, v20.16b
|
||||
ld1 {v28.16b}, [x0], x1
|
||||
umull v24.8h, v0.8b, v28.8b
|
||||
umull2 v26.8h, v0.16b, v28.16b
|
||||
\add v4.8h, v16.8h, v4.8h
|
||||
srshl v4.8h, v4.8h, v18.8h
|
||||
\add v6.8h, v16.8h, v6.8h
|
||||
srshl v6.8h, v6.8h, v18.8h
|
||||
sqxtun v4.8b, v4.8h
|
||||
sqxtun2 v4.16b, v6.8h
|
||||
\add v24.8h, v16.8h, v24.8h
|
||||
srshl v24.8h, v24.8h, v18.8h
|
||||
\add v26.8h, v16.8h, v26.8h
|
||||
srshl v26.8h, v26.8h, v18.8h
|
||||
sqxtun v24.8b, v24.8h
|
||||
sqxtun2 v24.16b, v26.8h
|
||||
st1 {v4.16b}, [x5], x1
|
||||
st1 {v24.16b}, [x5], x1
|
||||
b.ne 1b
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro weight_8 add
|
||||
dup v0.8B, w4
|
||||
dup v0.8b, w4
|
||||
1: subs w2, w2, #2
|
||||
ld1 {v4.8B}, [x0], x1
|
||||
umull v2.8H, v0.8B, v4.8B
|
||||
ld1 {v6.8B}, [x0], x1
|
||||
umull v20.8H, v0.8B, v6.8B
|
||||
\add v2.8H, v16.8H, v2.8H
|
||||
srshl v2.8H, v2.8H, v18.8H
|
||||
sqxtun v2.8B, v2.8H
|
||||
\add v20.8H, v16.8H, v20.8H
|
||||
srshl v20.8H, v20.8H, v18.8H
|
||||
sqxtun v4.8B, v20.8H
|
||||
st1 {v2.8B}, [x5], x1
|
||||
st1 {v4.8B}, [x5], x1
|
||||
ld1 {v4.8b}, [x0], x1
|
||||
umull v2.8h, v0.8b, v4.8b
|
||||
ld1 {v6.8b}, [x0], x1
|
||||
umull v20.8h, v0.8b, v6.8b
|
||||
\add v2.8h, v16.8h, v2.8h
|
||||
srshl v2.8h, v2.8h, v18.8h
|
||||
sqxtun v2.8b, v2.8h
|
||||
\add v20.8h, v16.8h, v20.8h
|
||||
srshl v20.8h, v20.8h, v18.8h
|
||||
sqxtun v4.8b, v20.8h
|
||||
st1 {v2.8b}, [x5], x1
|
||||
st1 {v4.8b}, [x5], x1
|
||||
b.ne 1b
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro weight_4 add
|
||||
dup v0.8B, w4
|
||||
dup v0.8b, w4
|
||||
1: subs w2, w2, #4
|
||||
ld1 {v4.S}[0], [x0], x1
|
||||
ld1 {v4.S}[1], [x0], x1
|
||||
umull v2.8H, v0.8B, v4.8B
|
||||
ld1 {v4.s}[0], [x0], x1
|
||||
ld1 {v4.s}[1], [x0], x1
|
||||
umull v2.8h, v0.8b, v4.8b
|
||||
b.lt 2f
|
||||
ld1 {v6.S}[0], [x0], x1
|
||||
ld1 {v6.S}[1], [x0], x1
|
||||
umull v20.8H, v0.8B, v6.8B
|
||||
\add v2.8H, v16.8H, v2.8H
|
||||
srshl v2.8H, v2.8H, v18.8H
|
||||
sqxtun v2.8B, v2.8H
|
||||
\add v20.8H, v16.8H, v20.8H
|
||||
srshl v20.8H, v20.8h, v18.8H
|
||||
sqxtun v4.8B, v20.8H
|
||||
st1 {v2.S}[0], [x5], x1
|
||||
st1 {v2.S}[1], [x5], x1
|
||||
st1 {v4.S}[0], [x5], x1
|
||||
st1 {v4.S}[1], [x5], x1
|
||||
ld1 {v6.s}[0], [x0], x1
|
||||
ld1 {v6.s}[1], [x0], x1
|
||||
umull v20.8h, v0.8b, v6.8b
|
||||
\add v2.8h, v16.8h, v2.8h
|
||||
srshl v2.8h, v2.8h, v18.8h
|
||||
sqxtun v2.8b, v2.8h
|
||||
\add v20.8h, v16.8h, v20.8h
|
||||
srshl v20.8h, v20.8h, v18.8h
|
||||
sqxtun v4.8b, v20.8h
|
||||
st1 {v2.s}[0], [x5], x1
|
||||
st1 {v2.s}[1], [x5], x1
|
||||
st1 {v4.s}[0], [x5], x1
|
||||
st1 {v4.s}[1], [x5], x1
|
||||
b.ne 1b
|
||||
ret
|
||||
2: \add v2.8H, v16.8H, v2.8H
|
||||
srshl v2.8H, v2.8H, v18.8H
|
||||
sqxtun v2.8B, v2.8H
|
||||
st1 {v2.S}[0], [x5], x1
|
||||
st1 {v2.S}[1], [x5], x1
|
||||
2: \add v2.8h, v16.8h, v2.8h
|
||||
srshl v2.8h, v2.8h, v18.8h
|
||||
sqxtun v2.8b, v2.8h
|
||||
st1 {v2.s}[0], [x5], x1
|
||||
st1 {v2.s}[1], [x5], x1
|
||||
ret
|
||||
.endm
|
||||
|
||||
@@ -796,18 +796,18 @@ function ff_weight_h264_pixels_\w\()_neon, export=1
|
||||
cmp w3, #1
|
||||
mov w6, #1
|
||||
lsl w5, w5, w3
|
||||
dup v16.8H, w5
|
||||
dup v16.8h, w5
|
||||
mov x5, x0
|
||||
b.le 20f
|
||||
sub w6, w6, w3
|
||||
dup v18.8H, w6
|
||||
dup v18.8h, w6
|
||||
cmp w4, #0
|
||||
b.lt 10f
|
||||
weight_\w shadd
|
||||
10: neg w4, w4
|
||||
weight_\w shsub
|
||||
20: neg w6, w3
|
||||
dup v18.8H, w6
|
||||
dup v18.8h, w6
|
||||
cmp w4, #0
|
||||
b.lt 10f
|
||||
weight_\w add
|
||||
@@ -825,7 +825,7 @@ endfunc
|
||||
ldr w6, [x4]
|
||||
ccmp w3, #0, #0, ne
|
||||
lsl w2, w2, #2
|
||||
mov v24.S[0], w6
|
||||
mov v24.s[0], w6
|
||||
lsl w3, w3, #2
|
||||
and w8, w6, w6, lsl #16
|
||||
b.eq 1f
|
||||
@@ -1017,7 +1017,7 @@ function ff_h264_h_loop_filter_chroma_mbaff_intra_neon_10, export=1
|
||||
ld1 {v16.8h}, [x4], x1
|
||||
ld1 {v19.8h}, [x9], x1
|
||||
|
||||
transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29
|
||||
transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29
|
||||
|
||||
h264_loop_filter_chroma_intra_10
|
||||
|
||||
@@ -1045,7 +1045,7 @@ h_loop_filter_chroma420_intra_10:
|
||||
ld1 {v19.4h}, [x4], x1
|
||||
ld1 {v19.d}[1], [x9], x1
|
||||
|
||||
transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29
|
||||
transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29
|
||||
|
||||
h264_loop_filter_chroma_intra_10
|
||||
|
||||
|
||||
@@ -489,10 +489,10 @@ function ff_pred16x16_plane_neon_10, export=1
|
||||
mul v2.8h, v2.8h, v0.8h
|
||||
mul v3.8h, v3.8h, v0.8h
|
||||
addp v2.8h, v2.8h, v3.8h
|
||||
addp v2.8h, v2.8h, v2.8h
|
||||
addp v2.4h, v2.4h, v2.4h
|
||||
sshll v3.4s, v2.4h, #2
|
||||
saddw v2.4s, v3.4s, v2.4h
|
||||
saddlp v2.4s, v2.8h
|
||||
addp v2.4s, v2.4s, v2.4s
|
||||
shl v3.4s, v2.4s, #2
|
||||
add v2.4s, v3.4s, v2.4s
|
||||
rshrn v4.4h, v2.4s, #6
|
||||
trn2 v5.4h, v4.4h, v4.4h
|
||||
add v2.4h, v4.4h, v5.4h
|
||||
@@ -502,28 +502,26 @@ function ff_pred16x16_plane_neon_10, export=1
|
||||
add v7.4h, v7.4h, v0.4h
|
||||
shl v2.4h, v7.4h, #4
|
||||
ssubl v2.4s, v2.4h, v3.4h
|
||||
shl v3.4h, v4.4h, #4
|
||||
ext v0.16b, v0.16b, v0.16b, #14
|
||||
ssubl v6.4s, v5.4h, v3.4h
|
||||
sxtl v6.4s, v5.4h // c
|
||||
|
||||
mov v0.h[0], wzr
|
||||
mul v0.8h, v0.8h, v4.h[0]
|
||||
dup v16.4s, v2.s[0]
|
||||
dup v17.4s, v2.s[0]
|
||||
dup v2.8h, v4.h[0]
|
||||
dup v3.4s, v6.s[0]
|
||||
shl v2.8h, v2.8h, #3
|
||||
saddw v16.4s, v16.4s, v0.4h
|
||||
saddw2 v17.4s, v17.4s, v0.8h
|
||||
saddw v3.4s, v3.4s, v2.4h
|
||||
dup v2.8h, v4.h[0] // b
|
||||
dup v3.4s, v6.s[0] // c
|
||||
sshll v2.4s, v2.4h, #3 // b * 8
|
||||
smlal v16.4s, v0.4h, v4.h[0]
|
||||
smlal2 v17.4s, v0.8h, v4.h[0]
|
||||
sub v3.4s, v3.4s, v2.4s
|
||||
|
||||
mov w3, #16
|
||||
mvni v4.8h, #0xFC, lsl #8 // 1023 for clipping
|
||||
1:
|
||||
sqshrun v0.4h, v16.4s, #5
|
||||
sqshrun2 v0.8h, v17.4s, #5
|
||||
saddw v16.4s, v16.4s, v2.4h
|
||||
saddw v17.4s, v17.4s, v2.4h
|
||||
add v16.4s, v16.4s, v2.4s
|
||||
add v17.4s, v17.4s, v2.4s
|
||||
sqshrun v1.4h, v16.4s, #5
|
||||
sqshrun2 v1.8h, v17.4s, #5
|
||||
add v16.4s, v16.4s, v3.4s
|
||||
@@ -595,12 +593,11 @@ function ff_pred8x8_plane_neon_10, export=1
|
||||
ssubl v2.4s, v2.4h, v3.4h
|
||||
ext v0.16b, v0.16b, v0.16b, #14
|
||||
mov v0.h[0], wzr
|
||||
mul v0.8h, v0.8h, v5.h[0]
|
||||
dup v1.4s, v2.s[0]
|
||||
dup v2.4s, v2.s[0]
|
||||
dup v3.8h, v5.h[1]
|
||||
saddw v1.4s, v1.4s, v0.4h
|
||||
saddw2 v2.4s, v2.4s, v0.8h
|
||||
smlal v1.4s, v0.4h, v5.h[0]
|
||||
smlal2 v2.4s, v0.8h, v5.h[0]
|
||||
mov w3, #8
|
||||
mvni v4.8h, #0xFC, lsl #8 // 1023 for clipping
|
||||
1:
|
||||
|
||||
+278
-278
@@ -27,127 +27,127 @@
|
||||
.macro lowpass_const r
|
||||
movz \r, #20, lsl #16
|
||||
movk \r, #5
|
||||
mov v6.S[0], \r
|
||||
mov v6.s[0], \r
|
||||
.endm
|
||||
|
||||
//trashes v0-v5
|
||||
.macro lowpass_8 r0, r1, r2, r3, d0, d1, narrow=1
|
||||
ext v2.8B, \r0\().8B, \r1\().8B, #2
|
||||
ext v3.8B, \r0\().8B, \r1\().8B, #3
|
||||
uaddl v2.8H, v2.8B, v3.8B
|
||||
ext v4.8B, \r0\().8B, \r1\().8B, #1
|
||||
ext v5.8B, \r0\().8B, \r1\().8B, #4
|
||||
uaddl v4.8H, v4.8B, v5.8B
|
||||
ext v1.8B, \r0\().8B, \r1\().8B, #5
|
||||
uaddl \d0\().8H, \r0\().8B, v1.8B
|
||||
ext v0.8B, \r2\().8B, \r3\().8B, #2
|
||||
mla \d0\().8H, v2.8H, v6.H[1]
|
||||
ext v1.8B, \r2\().8B, \r3\().8B, #3
|
||||
uaddl v0.8H, v0.8B, v1.8B
|
||||
ext v1.8B, \r2\().8B, \r3\().8B, #1
|
||||
mls \d0\().8H, v4.8H, v6.H[0]
|
||||
ext v3.8B, \r2\().8B, \r3\().8B, #4
|
||||
uaddl v1.8H, v1.8B, v3.8B
|
||||
ext v2.8B, \r2\().8B, \r3\().8B, #5
|
||||
uaddl \d1\().8H, \r2\().8B, v2.8B
|
||||
mla \d1\().8H, v0.8H, v6.H[1]
|
||||
mls \d1\().8H, v1.8H, v6.H[0]
|
||||
ext v2.8b, \r0\().8b, \r1\().8b, #2
|
||||
ext v3.8b, \r0\().8b, \r1\().8b, #3
|
||||
uaddl v2.8h, v2.8b, v3.8b
|
||||
ext v4.8b, \r0\().8b, \r1\().8b, #1
|
||||
ext v5.8b, \r0\().8b, \r1\().8b, #4
|
||||
uaddl v4.8h, v4.8b, v5.8b
|
||||
ext v1.8b, \r0\().8b, \r1\().8b, #5
|
||||
uaddl \d0\().8h, \r0\().8b, v1.8b
|
||||
ext v0.8b, \r2\().8b, \r3\().8b, #2
|
||||
mla \d0\().8h, v2.8h, v6.h[1]
|
||||
ext v1.8b, \r2\().8b, \r3\().8b, #3
|
||||
uaddl v0.8h, v0.8b, v1.8b
|
||||
ext v1.8b, \r2\().8b, \r3\().8b, #1
|
||||
mls \d0\().8h, v4.8h, v6.h[0]
|
||||
ext v3.8b, \r2\().8b, \r3\().8b, #4
|
||||
uaddl v1.8h, v1.8b, v3.8b
|
||||
ext v2.8b, \r2\().8b, \r3\().8b, #5
|
||||
uaddl \d1\().8h, \r2\().8b, v2.8b
|
||||
mla \d1\().8h, v0.8h, v6.h[1]
|
||||
mls \d1\().8h, v1.8h, v6.h[0]
|
||||
.if \narrow
|
||||
sqrshrun \d0\().8B, \d0\().8H, #5
|
||||
sqrshrun \d1\().8B, \d1\().8H, #5
|
||||
sqrshrun \d0\().8b, \d0\().8h, #5
|
||||
sqrshrun \d1\().8b, \d1\().8h, #5
|
||||
.endif
|
||||
.endm
|
||||
|
||||
//trashes v0-v4
|
||||
.macro lowpass_8_v r0, r1, r2, r3, r4, r5, r6, d0, d1, narrow=1
|
||||
uaddl v2.8H, \r2\().8B, \r3\().8B
|
||||
uaddl v0.8H, \r3\().8B, \r4\().8B
|
||||
uaddl v4.8H, \r1\().8B, \r4\().8B
|
||||
uaddl v1.8H, \r2\().8B, \r5\().8B
|
||||
uaddl \d0\().8H, \r0\().8B, \r5\().8B
|
||||
uaddl \d1\().8H, \r1\().8B, \r6\().8B
|
||||
mla \d0\().8H, v2.8H, v6.H[1]
|
||||
mls \d0\().8H, v4.8H, v6.H[0]
|
||||
mla \d1\().8H, v0.8H, v6.H[1]
|
||||
mls \d1\().8H, v1.8H, v6.H[0]
|
||||
uaddl v2.8h, \r2\().8b, \r3\().8b
|
||||
uaddl v0.8h, \r3\().8b, \r4\().8b
|
||||
uaddl v4.8h, \r1\().8b, \r4\().8b
|
||||
uaddl v1.8h, \r2\().8b, \r5\().8b
|
||||
uaddl \d0\().8h, \r0\().8b, \r5\().8b
|
||||
uaddl \d1\().8h, \r1\().8b, \r6\().8b
|
||||
mla \d0\().8h, v2.8h, v6.h[1]
|
||||
mls \d0\().8h, v4.8h, v6.h[0]
|
||||
mla \d1\().8h, v0.8h, v6.h[1]
|
||||
mls \d1\().8h, v1.8h, v6.h[0]
|
||||
.if \narrow
|
||||
sqrshrun \d0\().8B, \d0\().8H, #5
|
||||
sqrshrun \d1\().8B, \d1\().8H, #5
|
||||
sqrshrun \d0\().8b, \d0\().8h, #5
|
||||
sqrshrun \d1\().8b, \d1\().8h, #5
|
||||
.endif
|
||||
.endm
|
||||
|
||||
//trashes v0-v5, v7, v30-v31
|
||||
.macro lowpass_8H r0, r1
|
||||
ext v0.16B, \r0\().16B, \r0\().16B, #2
|
||||
ext v1.16B, \r0\().16B, \r0\().16B, #3
|
||||
uaddl v0.8H, v0.8B, v1.8B
|
||||
ext v2.16B, \r0\().16B, \r0\().16B, #1
|
||||
ext v3.16B, \r0\().16B, \r0\().16B, #4
|
||||
uaddl v2.8H, v2.8B, v3.8B
|
||||
ext v30.16B, \r0\().16B, \r0\().16B, #5
|
||||
uaddl \r0\().8H, \r0\().8B, v30.8B
|
||||
ext v4.16B, \r1\().16B, \r1\().16B, #2
|
||||
mla \r0\().8H, v0.8H, v6.H[1]
|
||||
ext v5.16B, \r1\().16B, \r1\().16B, #3
|
||||
uaddl v4.8H, v4.8B, v5.8B
|
||||
ext v7.16B, \r1\().16B, \r1\().16B, #1
|
||||
mls \r0\().8H, v2.8H, v6.H[0]
|
||||
ext v0.16B, \r1\().16B, \r1\().16B, #4
|
||||
uaddl v7.8H, v7.8B, v0.8B
|
||||
ext v31.16B, \r1\().16B, \r1\().16B, #5
|
||||
uaddl \r1\().8H, \r1\().8B, v31.8B
|
||||
mla \r1\().8H, v4.8H, v6.H[1]
|
||||
mls \r1\().8H, v7.8H, v6.H[0]
|
||||
ext v0.16b, \r0\().16b, \r0\().16b, #2
|
||||
ext v1.16b, \r0\().16b, \r0\().16b, #3
|
||||
uaddl v0.8h, v0.8b, v1.8b
|
||||
ext v2.16b, \r0\().16b, \r0\().16b, #1
|
||||
ext v3.16b, \r0\().16b, \r0\().16b, #4
|
||||
uaddl v2.8h, v2.8b, v3.8b
|
||||
ext v30.16b, \r0\().16b, \r0\().16b, #5
|
||||
uaddl \r0\().8h, \r0\().8b, v30.8b
|
||||
ext v4.16b, \r1\().16b, \r1\().16b, #2
|
||||
mla \r0\().8h, v0.8h, v6.h[1]
|
||||
ext v5.16b, \r1\().16b, \r1\().16b, #3
|
||||
uaddl v4.8h, v4.8b, v5.8b
|
||||
ext v7.16b, \r1\().16b, \r1\().16b, #1
|
||||
mls \r0\().8h, v2.8h, v6.h[0]
|
||||
ext v0.16b, \r1\().16b, \r1\().16b, #4
|
||||
uaddl v7.8h, v7.8b, v0.8b
|
||||
ext v31.16b, \r1\().16b, \r1\().16b, #5
|
||||
uaddl \r1\().8h, \r1\().8b, v31.8b
|
||||
mla \r1\().8h, v4.8h, v6.h[1]
|
||||
mls \r1\().8h, v7.8h, v6.h[0]
|
||||
.endm
|
||||
|
||||
// trashes v2-v5, v30
|
||||
.macro lowpass_8_1 r0, r1, d0, narrow=1
|
||||
ext v2.8B, \r0\().8B, \r1\().8B, #2
|
||||
ext v3.8B, \r0\().8B, \r1\().8B, #3
|
||||
uaddl v2.8H, v2.8B, v3.8B
|
||||
ext v4.8B, \r0\().8B, \r1\().8B, #1
|
||||
ext v5.8B, \r0\().8B, \r1\().8B, #4
|
||||
uaddl v4.8H, v4.8B, v5.8B
|
||||
ext v30.8B, \r0\().8B, \r1\().8B, #5
|
||||
uaddl \d0\().8H, \r0\().8B, v30.8B
|
||||
mla \d0\().8H, v2.8H, v6.H[1]
|
||||
mls \d0\().8H, v4.8H, v6.H[0]
|
||||
ext v2.8b, \r0\().8b, \r1\().8b, #2
|
||||
ext v3.8b, \r0\().8b, \r1\().8b, #3
|
||||
uaddl v2.8h, v2.8b, v3.8b
|
||||
ext v4.8b, \r0\().8b, \r1\().8b, #1
|
||||
ext v5.8b, \r0\().8b, \r1\().8b, #4
|
||||
uaddl v4.8h, v4.8b, v5.8b
|
||||
ext v30.8b, \r0\().8b, \r1\().8b, #5
|
||||
uaddl \d0\().8h, \r0\().8b, v30.8b
|
||||
mla \d0\().8h, v2.8h, v6.h[1]
|
||||
mls \d0\().8h, v4.8h, v6.h[0]
|
||||
.if \narrow
|
||||
sqrshrun \d0\().8B, \d0\().8H, #5
|
||||
sqrshrun \d0\().8b, \d0\().8h, #5
|
||||
.endif
|
||||
.endm
|
||||
|
||||
// trashed v0-v7
|
||||
.macro lowpass_8.16 r0, r1, r2, r3, r4, r5
|
||||
saddl v5.4S, \r2\().4H, \r3\().4H
|
||||
saddl2 v1.4S, \r2\().8H, \r3\().8H
|
||||
saddl v6.4S, \r1\().4H, \r4\().4H
|
||||
saddl2 v2.4S, \r1\().8H, \r4\().8H
|
||||
saddl v0.4S, \r0\().4H, \r5\().4H
|
||||
saddl2 v4.4S, \r0\().8H, \r5\().8H
|
||||
saddl v5.4s, \r2\().4h, \r3\().4h
|
||||
saddl2 v1.4s, \r2\().8h, \r3\().8h
|
||||
saddl v6.4s, \r1\().4h, \r4\().4h
|
||||
saddl2 v2.4s, \r1\().8h, \r4\().8h
|
||||
saddl v0.4s, \r0\().4h, \r5\().4h
|
||||
saddl2 v4.4s, \r0\().8h, \r5\().8h
|
||||
|
||||
shl v3.4S, v5.4S, #4
|
||||
shl v5.4S, v5.4S, #2
|
||||
shl v7.4S, v6.4S, #2
|
||||
add v5.4S, v5.4S, v3.4S
|
||||
add v6.4S, v6.4S, v7.4S
|
||||
shl v3.4s, v5.4s, #4
|
||||
shl v5.4s, v5.4s, #2
|
||||
shl v7.4s, v6.4s, #2
|
||||
add v5.4s, v5.4s, v3.4s
|
||||
add v6.4s, v6.4s, v7.4s
|
||||
|
||||
shl v3.4S, v1.4S, #4
|
||||
shl v1.4S, v1.4S, #2
|
||||
shl v7.4S, v2.4S, #2
|
||||
add v1.4S, v1.4S, v3.4S
|
||||
add v2.4S, v2.4S, v7.4S
|
||||
shl v3.4s, v1.4s, #4
|
||||
shl v1.4s, v1.4s, #2
|
||||
shl v7.4s, v2.4s, #2
|
||||
add v1.4s, v1.4s, v3.4s
|
||||
add v2.4s, v2.4s, v7.4s
|
||||
|
||||
add v5.4S, v5.4S, v0.4S
|
||||
sub v5.4S, v5.4S, v6.4S
|
||||
add v5.4s, v5.4s, v0.4s
|
||||
sub v5.4s, v5.4s, v6.4s
|
||||
|
||||
add v1.4S, v1.4S, v4.4S
|
||||
sub v1.4S, v1.4S, v2.4S
|
||||
add v1.4s, v1.4s, v4.4s
|
||||
sub v1.4s, v1.4s, v2.4s
|
||||
|
||||
rshrn v5.4H, v5.4S, #10
|
||||
rshrn2 v5.8H, v1.4S, #10
|
||||
rshrn v5.4h, v5.4s, #10
|
||||
rshrn2 v5.8h, v1.4s, #10
|
||||
|
||||
sqxtun \r0\().8B, v5.8H
|
||||
sqxtun \r0\().8b, v5.8h
|
||||
.endm
|
||||
|
||||
function put_h264_qpel16_h_lowpass_neon_packed
|
||||
@@ -176,19 +176,19 @@ function \type\()_h264_qpel16_h_lowpass_neon
|
||||
endfunc
|
||||
|
||||
function \type\()_h264_qpel8_h_lowpass_neon
|
||||
1: ld1 {v28.8B, v29.8B}, [x1], x2
|
||||
ld1 {v16.8B, v17.8B}, [x1], x2
|
||||
1: ld1 {v28.8b, v29.8b}, [x1], x2
|
||||
ld1 {v16.8b, v17.8b}, [x1], x2
|
||||
subs x12, x12, #2
|
||||
lowpass_8 v28, v29, v16, v17, v28, v16
|
||||
.ifc \type,avg
|
||||
ld1 {v2.8B}, [x0], x3
|
||||
ld1 {v3.8B}, [x0]
|
||||
urhadd v28.8B, v28.8B, v2.8B
|
||||
urhadd v16.8B, v16.8B, v3.8B
|
||||
ld1 {v2.8b}, [x0], x3
|
||||
ld1 {v3.8b}, [x0]
|
||||
urhadd v28.8b, v28.8b, v2.8b
|
||||
urhadd v16.8b, v16.8b, v3.8b
|
||||
sub x0, x0, x3
|
||||
.endif
|
||||
st1 {v28.8B}, [x0], x3
|
||||
st1 {v16.8B}, [x0], x3
|
||||
st1 {v28.8b}, [x0], x3
|
||||
st1 {v16.8b}, [x0], x3
|
||||
b.ne 1b
|
||||
ret
|
||||
endfunc
|
||||
@@ -213,23 +213,23 @@ function \type\()_h264_qpel16_h_lowpass_l2_neon
|
||||
endfunc
|
||||
|
||||
function \type\()_h264_qpel8_h_lowpass_l2_neon
|
||||
1: ld1 {v26.8B, v27.8B}, [x1], x2
|
||||
ld1 {v16.8B, v17.8B}, [x1], x2
|
||||
ld1 {v28.8B}, [x3], x2
|
||||
ld1 {v29.8B}, [x3], x2
|
||||
1: ld1 {v26.8b, v27.8b}, [x1], x2
|
||||
ld1 {v16.8b, v17.8b}, [x1], x2
|
||||
ld1 {v28.8b}, [x3], x2
|
||||
ld1 {v29.8b}, [x3], x2
|
||||
subs x12, x12, #2
|
||||
lowpass_8 v26, v27, v16, v17, v26, v27
|
||||
urhadd v26.8B, v26.8B, v28.8B
|
||||
urhadd v27.8B, v27.8B, v29.8B
|
||||
urhadd v26.8b, v26.8b, v28.8b
|
||||
urhadd v27.8b, v27.8b, v29.8b
|
||||
.ifc \type,avg
|
||||
ld1 {v2.8B}, [x0], x2
|
||||
ld1 {v3.8B}, [x0]
|
||||
urhadd v26.8B, v26.8B, v2.8B
|
||||
urhadd v27.8B, v27.8B, v3.8B
|
||||
ld1 {v2.8b}, [x0], x2
|
||||
ld1 {v3.8b}, [x0]
|
||||
urhadd v26.8b, v26.8b, v2.8b
|
||||
urhadd v27.8b, v27.8b, v3.8b
|
||||
sub x0, x0, x2
|
||||
.endif
|
||||
st1 {v26.8B}, [x0], x2
|
||||
st1 {v27.8B}, [x0], x2
|
||||
st1 {v26.8b}, [x0], x2
|
||||
st1 {v27.8b}, [x0], x2
|
||||
b.ne 1b
|
||||
ret
|
||||
endfunc
|
||||
@@ -270,52 +270,52 @@ function \type\()_h264_qpel16_v_lowpass_neon
|
||||
endfunc
|
||||
|
||||
function \type\()_h264_qpel8_v_lowpass_neon
|
||||
ld1 {v16.8B}, [x1], x3
|
||||
ld1 {v17.8B}, [x1], x3
|
||||
ld1 {v18.8B}, [x1], x3
|
||||
ld1 {v19.8B}, [x1], x3
|
||||
ld1 {v20.8B}, [x1], x3
|
||||
ld1 {v21.8B}, [x1], x3
|
||||
ld1 {v22.8B}, [x1], x3
|
||||
ld1 {v23.8B}, [x1], x3
|
||||
ld1 {v24.8B}, [x1], x3
|
||||
ld1 {v25.8B}, [x1], x3
|
||||
ld1 {v26.8B}, [x1], x3
|
||||
ld1 {v27.8B}, [x1], x3
|
||||
ld1 {v28.8B}, [x1]
|
||||
ld1 {v16.8b}, [x1], x3
|
||||
ld1 {v17.8b}, [x1], x3
|
||||
ld1 {v18.8b}, [x1], x3
|
||||
ld1 {v19.8b}, [x1], x3
|
||||
ld1 {v20.8b}, [x1], x3
|
||||
ld1 {v21.8b}, [x1], x3
|
||||
ld1 {v22.8b}, [x1], x3
|
||||
ld1 {v23.8b}, [x1], x3
|
||||
ld1 {v24.8b}, [x1], x3
|
||||
ld1 {v25.8b}, [x1], x3
|
||||
ld1 {v26.8b}, [x1], x3
|
||||
ld1 {v27.8b}, [x1], x3
|
||||
ld1 {v28.8b}, [x1]
|
||||
|
||||
lowpass_8_v v16, v17, v18, v19, v20, v21, v22, v16, v17
|
||||
lowpass_8_v v18, v19, v20, v21, v22, v23, v24, v18, v19
|
||||
lowpass_8_v v20, v21, v22, v23, v24, v25, v26, v20, v21
|
||||
lowpass_8_v v22, v23, v24, v25, v26, v27, v28, v22, v23
|
||||
.ifc \type,avg
|
||||
ld1 {v24.8B}, [x0], x2
|
||||
ld1 {v25.8B}, [x0], x2
|
||||
ld1 {v26.8B}, [x0], x2
|
||||
urhadd v16.8B, v16.8B, v24.8B
|
||||
ld1 {v27.8B}, [x0], x2
|
||||
urhadd v17.8B, v17.8B, v25.8B
|
||||
ld1 {v28.8B}, [x0], x2
|
||||
urhadd v18.8B, v18.8B, v26.8B
|
||||
ld1 {v29.8B}, [x0], x2
|
||||
urhadd v19.8B, v19.8B, v27.8B
|
||||
ld1 {v30.8B}, [x0], x2
|
||||
urhadd v20.8B, v20.8B, v28.8B
|
||||
ld1 {v31.8B}, [x0], x2
|
||||
urhadd v21.8B, v21.8B, v29.8B
|
||||
urhadd v22.8B, v22.8B, v30.8B
|
||||
urhadd v23.8B, v23.8B, v31.8B
|
||||
ld1 {v24.8b}, [x0], x2
|
||||
ld1 {v25.8b}, [x0], x2
|
||||
ld1 {v26.8b}, [x0], x2
|
||||
urhadd v16.8b, v16.8b, v24.8b
|
||||
ld1 {v27.8b}, [x0], x2
|
||||
urhadd v17.8b, v17.8b, v25.8b
|
||||
ld1 {v28.8b}, [x0], x2
|
||||
urhadd v18.8b, v18.8b, v26.8b
|
||||
ld1 {v29.8b}, [x0], x2
|
||||
urhadd v19.8b, v19.8b, v27.8b
|
||||
ld1 {v30.8b}, [x0], x2
|
||||
urhadd v20.8b, v20.8b, v28.8b
|
||||
ld1 {v31.8b}, [x0], x2
|
||||
urhadd v21.8b, v21.8b, v29.8b
|
||||
urhadd v22.8b, v22.8b, v30.8b
|
||||
urhadd v23.8b, v23.8b, v31.8b
|
||||
sub x0, x0, x2, lsl #3
|
||||
.endif
|
||||
|
||||
st1 {v16.8B}, [x0], x2
|
||||
st1 {v17.8B}, [x0], x2
|
||||
st1 {v18.8B}, [x0], x2
|
||||
st1 {v19.8B}, [x0], x2
|
||||
st1 {v20.8B}, [x0], x2
|
||||
st1 {v21.8B}, [x0], x2
|
||||
st1 {v22.8B}, [x0], x2
|
||||
st1 {v23.8B}, [x0], x2
|
||||
st1 {v16.8b}, [x0], x2
|
||||
st1 {v17.8b}, [x0], x2
|
||||
st1 {v18.8b}, [x0], x2
|
||||
st1 {v19.8b}, [x0], x2
|
||||
st1 {v20.8b}, [x0], x2
|
||||
st1 {v21.8b}, [x0], x2
|
||||
st1 {v22.8b}, [x0], x2
|
||||
st1 {v23.8b}, [x0], x2
|
||||
|
||||
ret
|
||||
endfunc
|
||||
@@ -343,70 +343,70 @@ function \type\()_h264_qpel16_v_lowpass_l2_neon
|
||||
endfunc
|
||||
|
||||
function \type\()_h264_qpel8_v_lowpass_l2_neon
|
||||
ld1 {v16.8B}, [x1], x3
|
||||
ld1 {v17.8B}, [x1], x3
|
||||
ld1 {v18.8B}, [x1], x3
|
||||
ld1 {v19.8B}, [x1], x3
|
||||
ld1 {v20.8B}, [x1], x3
|
||||
ld1 {v21.8B}, [x1], x3
|
||||
ld1 {v22.8B}, [x1], x3
|
||||
ld1 {v23.8B}, [x1], x3
|
||||
ld1 {v24.8B}, [x1], x3
|
||||
ld1 {v25.8B}, [x1], x3
|
||||
ld1 {v26.8B}, [x1], x3
|
||||
ld1 {v27.8B}, [x1], x3
|
||||
ld1 {v28.8B}, [x1]
|
||||
ld1 {v16.8b}, [x1], x3
|
||||
ld1 {v17.8b}, [x1], x3
|
||||
ld1 {v18.8b}, [x1], x3
|
||||
ld1 {v19.8b}, [x1], x3
|
||||
ld1 {v20.8b}, [x1], x3
|
||||
ld1 {v21.8b}, [x1], x3
|
||||
ld1 {v22.8b}, [x1], x3
|
||||
ld1 {v23.8b}, [x1], x3
|
||||
ld1 {v24.8b}, [x1], x3
|
||||
ld1 {v25.8b}, [x1], x3
|
||||
ld1 {v26.8b}, [x1], x3
|
||||
ld1 {v27.8b}, [x1], x3
|
||||
ld1 {v28.8b}, [x1]
|
||||
|
||||
lowpass_8_v v16, v17, v18, v19, v20, v21, v22, v16, v17
|
||||
lowpass_8_v v18, v19, v20, v21, v22, v23, v24, v18, v19
|
||||
lowpass_8_v v20, v21, v22, v23, v24, v25, v26, v20, v21
|
||||
lowpass_8_v v22, v23, v24, v25, v26, v27, v28, v22, v23
|
||||
|
||||
ld1 {v24.8B}, [x12], x2
|
||||
ld1 {v25.8B}, [x12], x2
|
||||
ld1 {v26.8B}, [x12], x2
|
||||
ld1 {v27.8B}, [x12], x2
|
||||
ld1 {v28.8B}, [x12], x2
|
||||
urhadd v16.8B, v24.8B, v16.8B
|
||||
urhadd v17.8B, v25.8B, v17.8B
|
||||
ld1 {v29.8B}, [x12], x2
|
||||
urhadd v18.8B, v26.8B, v18.8B
|
||||
urhadd v19.8B, v27.8B, v19.8B
|
||||
ld1 {v30.8B}, [x12], x2
|
||||
urhadd v20.8B, v28.8B, v20.8B
|
||||
urhadd v21.8B, v29.8B, v21.8B
|
||||
ld1 {v31.8B}, [x12], x2
|
||||
urhadd v22.8B, v30.8B, v22.8B
|
||||
urhadd v23.8B, v31.8B, v23.8B
|
||||
ld1 {v24.8b}, [x12], x2
|
||||
ld1 {v25.8b}, [x12], x2
|
||||
ld1 {v26.8b}, [x12], x2
|
||||
ld1 {v27.8b}, [x12], x2
|
||||
ld1 {v28.8b}, [x12], x2
|
||||
urhadd v16.8b, v24.8b, v16.8b
|
||||
urhadd v17.8b, v25.8b, v17.8b
|
||||
ld1 {v29.8b}, [x12], x2
|
||||
urhadd v18.8b, v26.8b, v18.8b
|
||||
urhadd v19.8b, v27.8b, v19.8b
|
||||
ld1 {v30.8b}, [x12], x2
|
||||
urhadd v20.8b, v28.8b, v20.8b
|
||||
urhadd v21.8b, v29.8b, v21.8b
|
||||
ld1 {v31.8b}, [x12], x2
|
||||
urhadd v22.8b, v30.8b, v22.8b
|
||||
urhadd v23.8b, v31.8b, v23.8b
|
||||
|
||||
.ifc \type,avg
|
||||
ld1 {v24.8B}, [x0], x3
|
||||
ld1 {v25.8B}, [x0], x3
|
||||
ld1 {v26.8B}, [x0], x3
|
||||
urhadd v16.8B, v16.8B, v24.8B
|
||||
ld1 {v27.8B}, [x0], x3
|
||||
urhadd v17.8B, v17.8B, v25.8B
|
||||
ld1 {v28.8B}, [x0], x3
|
||||
urhadd v18.8B, v18.8B, v26.8B
|
||||
ld1 {v29.8B}, [x0], x3
|
||||
urhadd v19.8B, v19.8B, v27.8B
|
||||
ld1 {v30.8B}, [x0], x3
|
||||
urhadd v20.8B, v20.8B, v28.8B
|
||||
ld1 {v31.8B}, [x0], x3
|
||||
urhadd v21.8B, v21.8B, v29.8B
|
||||
urhadd v22.8B, v22.8B, v30.8B
|
||||
urhadd v23.8B, v23.8B, v31.8B
|
||||
ld1 {v24.8b}, [x0], x3
|
||||
ld1 {v25.8b}, [x0], x3
|
||||
ld1 {v26.8b}, [x0], x3
|
||||
urhadd v16.8b, v16.8b, v24.8b
|
||||
ld1 {v27.8b}, [x0], x3
|
||||
urhadd v17.8b, v17.8b, v25.8b
|
||||
ld1 {v28.8b}, [x0], x3
|
||||
urhadd v18.8b, v18.8b, v26.8b
|
||||
ld1 {v29.8b}, [x0], x3
|
||||
urhadd v19.8b, v19.8b, v27.8b
|
||||
ld1 {v30.8b}, [x0], x3
|
||||
urhadd v20.8b, v20.8b, v28.8b
|
||||
ld1 {v31.8b}, [x0], x3
|
||||
urhadd v21.8b, v21.8b, v29.8b
|
||||
urhadd v22.8b, v22.8b, v30.8b
|
||||
urhadd v23.8b, v23.8b, v31.8b
|
||||
sub x0, x0, x3, lsl #3
|
||||
.endif
|
||||
|
||||
st1 {v16.8B}, [x0], x3
|
||||
st1 {v17.8B}, [x0], x3
|
||||
st1 {v18.8B}, [x0], x3
|
||||
st1 {v19.8B}, [x0], x3
|
||||
st1 {v20.8B}, [x0], x3
|
||||
st1 {v21.8B}, [x0], x3
|
||||
st1 {v22.8B}, [x0], x3
|
||||
st1 {v23.8B}, [x0], x3
|
||||
st1 {v16.8b}, [x0], x3
|
||||
st1 {v17.8b}, [x0], x3
|
||||
st1 {v18.8b}, [x0], x3
|
||||
st1 {v19.8b}, [x0], x3
|
||||
st1 {v20.8b}, [x0], x3
|
||||
st1 {v21.8b}, [x0], x3
|
||||
st1 {v22.8b}, [x0], x3
|
||||
st1 {v23.8b}, [x0], x3
|
||||
|
||||
ret
|
||||
endfunc
|
||||
@@ -417,19 +417,19 @@ endfunc
|
||||
|
||||
function put_h264_qpel8_hv_lowpass_neon_top
|
||||
lowpass_const w12
|
||||
ld1 {v16.8H}, [x1], x3
|
||||
ld1 {v17.8H}, [x1], x3
|
||||
ld1 {v18.8H}, [x1], x3
|
||||
ld1 {v19.8H}, [x1], x3
|
||||
ld1 {v20.8H}, [x1], x3
|
||||
ld1 {v21.8H}, [x1], x3
|
||||
ld1 {v22.8H}, [x1], x3
|
||||
ld1 {v23.8H}, [x1], x3
|
||||
ld1 {v24.8H}, [x1], x3
|
||||
ld1 {v25.8H}, [x1], x3
|
||||
ld1 {v26.8H}, [x1], x3
|
||||
ld1 {v27.8H}, [x1], x3
|
||||
ld1 {v28.8H}, [x1]
|
||||
ld1 {v16.8h}, [x1], x3
|
||||
ld1 {v17.8h}, [x1], x3
|
||||
ld1 {v18.8h}, [x1], x3
|
||||
ld1 {v19.8h}, [x1], x3
|
||||
ld1 {v20.8h}, [x1], x3
|
||||
ld1 {v21.8h}, [x1], x3
|
||||
ld1 {v22.8h}, [x1], x3
|
||||
ld1 {v23.8h}, [x1], x3
|
||||
ld1 {v24.8h}, [x1], x3
|
||||
ld1 {v25.8h}, [x1], x3
|
||||
ld1 {v26.8h}, [x1], x3
|
||||
ld1 {v27.8h}, [x1], x3
|
||||
ld1 {v28.8h}, [x1]
|
||||
lowpass_8H v16, v17
|
||||
lowpass_8H v18, v19
|
||||
lowpass_8H v20, v21
|
||||
@@ -458,33 +458,33 @@ function \type\()_h264_qpel8_hv_lowpass_neon
|
||||
mov x10, x30
|
||||
bl put_h264_qpel8_hv_lowpass_neon_top
|
||||
.ifc \type,avg
|
||||
ld1 {v0.8B}, [x0], x2
|
||||
ld1 {v1.8B}, [x0], x2
|
||||
ld1 {v2.8B}, [x0], x2
|
||||
urhadd v16.8B, v16.8B, v0.8B
|
||||
ld1 {v3.8B}, [x0], x2
|
||||
urhadd v17.8B, v17.8B, v1.8B
|
||||
ld1 {v4.8B}, [x0], x2
|
||||
urhadd v18.8B, v18.8B, v2.8B
|
||||
ld1 {v5.8B}, [x0], x2
|
||||
urhadd v19.8B, v19.8B, v3.8B
|
||||
ld1 {v6.8B}, [x0], x2
|
||||
urhadd v20.8B, v20.8B, v4.8B
|
||||
ld1 {v7.8B}, [x0], x2
|
||||
urhadd v21.8B, v21.8B, v5.8B
|
||||
urhadd v22.8B, v22.8B, v6.8B
|
||||
urhadd v23.8B, v23.8B, v7.8B
|
||||
ld1 {v0.8b}, [x0], x2
|
||||
ld1 {v1.8b}, [x0], x2
|
||||
ld1 {v2.8b}, [x0], x2
|
||||
urhadd v16.8b, v16.8b, v0.8b
|
||||
ld1 {v3.8b}, [x0], x2
|
||||
urhadd v17.8b, v17.8b, v1.8b
|
||||
ld1 {v4.8b}, [x0], x2
|
||||
urhadd v18.8b, v18.8b, v2.8b
|
||||
ld1 {v5.8b}, [x0], x2
|
||||
urhadd v19.8b, v19.8b, v3.8b
|
||||
ld1 {v6.8b}, [x0], x2
|
||||
urhadd v20.8b, v20.8b, v4.8b
|
||||
ld1 {v7.8b}, [x0], x2
|
||||
urhadd v21.8b, v21.8b, v5.8b
|
||||
urhadd v22.8b, v22.8b, v6.8b
|
||||
urhadd v23.8b, v23.8b, v7.8b
|
||||
sub x0, x0, x2, lsl #3
|
||||
.endif
|
||||
|
||||
st1 {v16.8B}, [x0], x2
|
||||
st1 {v17.8B}, [x0], x2
|
||||
st1 {v18.8B}, [x0], x2
|
||||
st1 {v19.8B}, [x0], x2
|
||||
st1 {v20.8B}, [x0], x2
|
||||
st1 {v21.8B}, [x0], x2
|
||||
st1 {v22.8B}, [x0], x2
|
||||
st1 {v23.8B}, [x0], x2
|
||||
st1 {v16.8b}, [x0], x2
|
||||
st1 {v17.8b}, [x0], x2
|
||||
st1 {v18.8b}, [x0], x2
|
||||
st1 {v19.8b}, [x0], x2
|
||||
st1 {v20.8b}, [x0], x2
|
||||
st1 {v21.8b}, [x0], x2
|
||||
st1 {v22.8b}, [x0], x2
|
||||
st1 {v23.8b}, [x0], x2
|
||||
|
||||
ret x10
|
||||
endfunc
|
||||
@@ -498,45 +498,45 @@ function \type\()_h264_qpel8_hv_lowpass_l2_neon
|
||||
mov x10, x30
|
||||
bl put_h264_qpel8_hv_lowpass_neon_top
|
||||
|
||||
ld1 {v0.8B, v1.8B}, [x2], #16
|
||||
ld1 {v2.8B, v3.8B}, [x2], #16
|
||||
urhadd v0.8B, v0.8B, v16.8B
|
||||
urhadd v1.8B, v1.8B, v17.8B
|
||||
ld1 {v4.8B, v5.8B}, [x2], #16
|
||||
urhadd v2.8B, v2.8B, v18.8B
|
||||
urhadd v3.8B, v3.8B, v19.8B
|
||||
ld1 {v6.8B, v7.8B}, [x2], #16
|
||||
urhadd v4.8B, v4.8B, v20.8B
|
||||
urhadd v5.8B, v5.8B, v21.8B
|
||||
urhadd v6.8B, v6.8B, v22.8B
|
||||
urhadd v7.8B, v7.8B, v23.8B
|
||||
ld1 {v0.8b, v1.8b}, [x2], #16
|
||||
ld1 {v2.8b, v3.8b}, [x2], #16
|
||||
urhadd v0.8b, v0.8b, v16.8b
|
||||
urhadd v1.8b, v1.8b, v17.8b
|
||||
ld1 {v4.8b, v5.8b}, [x2], #16
|
||||
urhadd v2.8b, v2.8b, v18.8b
|
||||
urhadd v3.8b, v3.8b, v19.8b
|
||||
ld1 {v6.8b, v7.8b}, [x2], #16
|
||||
urhadd v4.8b, v4.8b, v20.8b
|
||||
urhadd v5.8b, v5.8b, v21.8b
|
||||
urhadd v6.8b, v6.8b, v22.8b
|
||||
urhadd v7.8b, v7.8b, v23.8b
|
||||
.ifc \type,avg
|
||||
ld1 {v16.8B}, [x0], x3
|
||||
ld1 {v17.8B}, [x0], x3
|
||||
ld1 {v18.8B}, [x0], x3
|
||||
urhadd v0.8B, v0.8B, v16.8B
|
||||
ld1 {v19.8B}, [x0], x3
|
||||
urhadd v1.8B, v1.8B, v17.8B
|
||||
ld1 {v20.8B}, [x0], x3
|
||||
urhadd v2.8B, v2.8B, v18.8B
|
||||
ld1 {v21.8B}, [x0], x3
|
||||
urhadd v3.8B, v3.8B, v19.8B
|
||||
ld1 {v22.8B}, [x0], x3
|
||||
urhadd v4.8B, v4.8B, v20.8B
|
||||
ld1 {v23.8B}, [x0], x3
|
||||
urhadd v5.8B, v5.8B, v21.8B
|
||||
urhadd v6.8B, v6.8B, v22.8B
|
||||
urhadd v7.8B, v7.8B, v23.8B
|
||||
ld1 {v16.8b}, [x0], x3
|
||||
ld1 {v17.8b}, [x0], x3
|
||||
ld1 {v18.8b}, [x0], x3
|
||||
urhadd v0.8b, v0.8b, v16.8b
|
||||
ld1 {v19.8b}, [x0], x3
|
||||
urhadd v1.8b, v1.8b, v17.8b
|
||||
ld1 {v20.8b}, [x0], x3
|
||||
urhadd v2.8b, v2.8b, v18.8b
|
||||
ld1 {v21.8b}, [x0], x3
|
||||
urhadd v3.8b, v3.8b, v19.8b
|
||||
ld1 {v22.8b}, [x0], x3
|
||||
urhadd v4.8b, v4.8b, v20.8b
|
||||
ld1 {v23.8b}, [x0], x3
|
||||
urhadd v5.8b, v5.8b, v21.8b
|
||||
urhadd v6.8b, v6.8b, v22.8b
|
||||
urhadd v7.8b, v7.8b, v23.8b
|
||||
sub x0, x0, x3, lsl #3
|
||||
.endif
|
||||
st1 {v0.8B}, [x0], x3
|
||||
st1 {v1.8B}, [x0], x3
|
||||
st1 {v2.8B}, [x0], x3
|
||||
st1 {v3.8B}, [x0], x3
|
||||
st1 {v4.8B}, [x0], x3
|
||||
st1 {v5.8B}, [x0], x3
|
||||
st1 {v6.8B}, [x0], x3
|
||||
st1 {v7.8B}, [x0], x3
|
||||
st1 {v0.8b}, [x0], x3
|
||||
st1 {v1.8b}, [x0], x3
|
||||
st1 {v2.8b}, [x0], x3
|
||||
st1 {v3.8b}, [x0], x3
|
||||
st1 {v4.8b}, [x0], x3
|
||||
st1 {v5.8b}, [x0], x3
|
||||
st1 {v6.8b}, [x0], x3
|
||||
st1 {v7.8b}, [x0], x3
|
||||
|
||||
ret x10
|
||||
endfunc
|
||||
@@ -580,8 +580,8 @@ function \type\()_h264_qpel16_hv_lowpass_l2_neon
|
||||
endfunc
|
||||
.endm
|
||||
|
||||
h264_qpel16_hv put
|
||||
h264_qpel16_hv avg
|
||||
h264_qpel16_hv put
|
||||
h264_qpel16_hv avg
|
||||
|
||||
.macro h264_qpel8 type
|
||||
function ff_\type\()_h264_qpel8_mc10_neon, export=1
|
||||
@@ -759,8 +759,8 @@ function ff_\type\()_h264_qpel8_mc33_neon, export=1
|
||||
endfunc
|
||||
.endm
|
||||
|
||||
h264_qpel8 put
|
||||
h264_qpel8 avg
|
||||
h264_qpel8 put
|
||||
h264_qpel8 avg
|
||||
|
||||
.macro h264_qpel16 type
|
||||
function ff_\type\()_h264_qpel16_mc10_neon, export=1
|
||||
@@ -931,5 +931,5 @@ function ff_\type\()_h264_qpel16_mc33_neon, export=1
|
||||
endfunc
|
||||
.endm
|
||||
|
||||
h264_qpel16 put
|
||||
h264_qpel16 avg
|
||||
h264_qpel16 put
|
||||
h264_qpel16 avg
|
||||
|
||||
@@ -264,19 +264,19 @@ endfunc
|
||||
|
||||
// uses and clobbers v28-v31 as temp registers
|
||||
.macro tr_4x4_8 in0, in1, in2, in3, out0, out1, out2, out3, p1, p2
|
||||
sshll\p1 v28.4s, \in0, #6
|
||||
mov v29.16b, v28.16b
|
||||
smull\p1 v30.4s, \in1, v0.h[1]
|
||||
smull\p1 v31.4s, \in1, v0.h[3]
|
||||
smlal\p2 v28.4s, \in2, v0.h[0] //e0
|
||||
smlsl\p2 v29.4s, \in2, v0.h[0] //e1
|
||||
smlal\p2 v30.4s, \in3, v0.h[3] //o0
|
||||
smlsl\p2 v31.4s, \in3, v0.h[1] //o1
|
||||
sshll\p1 v28.4s, \in0, #6
|
||||
mov v29.16b, v28.16b
|
||||
smull\p1 v30.4s, \in1, v0.h[1]
|
||||
smull\p1 v31.4s, \in1, v0.h[3]
|
||||
smlal\p2 v28.4s, \in2, v0.h[0] //e0
|
||||
smlsl\p2 v29.4s, \in2, v0.h[0] //e1
|
||||
smlal\p2 v30.4s, \in3, v0.h[3] //o0
|
||||
smlsl\p2 v31.4s, \in3, v0.h[1] //o1
|
||||
|
||||
add \out0, v28.4s, v30.4s
|
||||
add \out1, v29.4s, v31.4s
|
||||
sub \out2, v29.4s, v31.4s
|
||||
sub \out3, v28.4s, v30.4s
|
||||
add \out0, v28.4s, v30.4s
|
||||
add \out1, v29.4s, v31.4s
|
||||
sub \out2, v29.4s, v31.4s
|
||||
sub \out3, v28.4s, v30.4s
|
||||
.endm
|
||||
|
||||
.macro transpose8_4x4 r0, r1, r2, r3
|
||||
@@ -343,11 +343,11 @@ endfunc
|
||||
.macro idct_8x8 bitdepth
|
||||
function ff_hevc_idct_8x8_\bitdepth\()_neon, export=1
|
||||
//x0 - coeffs
|
||||
mov x1, x0
|
||||
mov x1, x0
|
||||
ld1 {v16.8h-v19.8h}, [x1], #64
|
||||
ld1 {v20.8h-v23.8h}, [x1]
|
||||
|
||||
movrel x1, trans
|
||||
movrel x1, trans
|
||||
ld1 {v0.8h}, [x1]
|
||||
|
||||
tr_8x4 7, v16,.4h, v17,.4h, v18,.4h, v19,.4h, v20,.4h, v21,.4h, v22,.4h, v23,.4h
|
||||
@@ -360,7 +360,7 @@ function ff_hevc_idct_8x8_\bitdepth\()_neon, export=1
|
||||
|
||||
transpose_8x8 v16, v17, v18, v19, v20, v21, v22, v23
|
||||
|
||||
mov x1, x0
|
||||
mov x1, x0
|
||||
st1 {v16.8h-v19.8h}, [x1], #64
|
||||
st1 {v20.8h-v23.8h}, [x1]
|
||||
|
||||
@@ -369,8 +369,8 @@ endfunc
|
||||
.endm
|
||||
|
||||
.macro butterfly e, o, tmp_p, tmp_m
|
||||
add \tmp_p, \e, \o
|
||||
sub \tmp_m, \e, \o
|
||||
add \tmp_p, \e, \o
|
||||
sub \tmp_m, \e, \o
|
||||
.endm
|
||||
|
||||
.macro tr16_8x4 in0, in1, in2, in3, offset
|
||||
@@ -399,7 +399,7 @@ endfunc
|
||||
butterfly v25.4s, v29.4s, v17.4s, v22.4s
|
||||
butterfly v26.4s, v30.4s, v18.4s, v21.4s
|
||||
butterfly v27.4s, v31.4s, v19.4s, v20.4s
|
||||
add x4, sp, #\offset
|
||||
add x4, sp, #\offset
|
||||
st1 {v16.4s-v19.4s}, [x4], #64
|
||||
st1 {v20.4s-v23.4s}, [x4]
|
||||
.endm
|
||||
@@ -416,14 +416,14 @@ endfunc
|
||||
.endm
|
||||
|
||||
.macro add_member in, t0, t1, t2, t3, t4, t5, t6, t7, op0, op1, op2, op3, op4, op5, op6, op7, p
|
||||
sum_sub v21.4s, \in, \t0, \op0, \p
|
||||
sum_sub v22.4s, \in, \t1, \op1, \p
|
||||
sum_sub v23.4s, \in, \t2, \op2, \p
|
||||
sum_sub v24.4s, \in, \t3, \op3, \p
|
||||
sum_sub v25.4s, \in, \t4, \op4, \p
|
||||
sum_sub v26.4s, \in, \t5, \op5, \p
|
||||
sum_sub v27.4s, \in, \t6, \op6, \p
|
||||
sum_sub v28.4s, \in, \t7, \op7, \p
|
||||
sum_sub v21.4s, \in, \t0, \op0, \p
|
||||
sum_sub v22.4s, \in, \t1, \op1, \p
|
||||
sum_sub v23.4s, \in, \t2, \op2, \p
|
||||
sum_sub v24.4s, \in, \t3, \op3, \p
|
||||
sum_sub v25.4s, \in, \t4, \op4, \p
|
||||
sum_sub v26.4s, \in, \t5, \op5, \p
|
||||
sum_sub v27.4s, \in, \t6, \op6, \p
|
||||
sum_sub v28.4s, \in, \t7, \op7, \p
|
||||
.endm
|
||||
|
||||
.macro butterfly16 in0, in1, in2, in3, in4, in5, in6, in7
|
||||
@@ -491,20 +491,20 @@ endfunc
|
||||
|
||||
.macro tr_16x4 name, shift, offset, step
|
||||
function func_tr_16x4_\name
|
||||
mov x1, x5
|
||||
add x3, x5, #(\step * 64)
|
||||
mov x2, #(\step * 128)
|
||||
mov x1, x5
|
||||
add x3, x5, #(\step * 64)
|
||||
mov x2, #(\step * 128)
|
||||
load16 v16.d, v17.d, v18.d, v19.d
|
||||
movrel x1, trans
|
||||
movrel x1, trans
|
||||
ld1 {v0.8h}, [x1]
|
||||
|
||||
tr16_8x4 v16, v17, v18, v19, \offset
|
||||
|
||||
add x1, x5, #(\step * 32)
|
||||
add x3, x5, #(\step * 3 *32)
|
||||
mov x2, #(\step * 128)
|
||||
add x1, x5, #(\step * 32)
|
||||
add x3, x5, #(\step * 3 *32)
|
||||
mov x2, #(\step * 128)
|
||||
load16 v20.d, v17.d, v18.d, v19.d
|
||||
movrel x1, trans, 16
|
||||
movrel x1, trans, 16
|
||||
ld1 {v1.8h}, [x1]
|
||||
smull v21.4s, v20.4h, v1.h[0]
|
||||
smull v22.4s, v20.4h, v1.h[1]
|
||||
@@ -523,16 +523,16 @@ function func_tr_16x4_\name
|
||||
add_member v19.4h, v1.h[6], v1.h[3], v1.h[0], v1.h[2], v1.h[5], v1.h[7], v1.h[4], v1.h[1], +, -, +, -, +, +, -, +
|
||||
add_member v19.8h, v1.h[7], v1.h[6], v1.h[5], v1.h[4], v1.h[3], v1.h[2], v1.h[1], v1.h[0], +, -, +, -, +, -, +, -, 2
|
||||
|
||||
add x4, sp, #\offset
|
||||
add x4, sp, #\offset
|
||||
ld1 {v16.4s-v19.4s}, [x4], #64
|
||||
|
||||
butterfly16 v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, v24.4s
|
||||
scale v29, v30, v31, v24, v20.4s, v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, \shift
|
||||
transpose16_4x4_2 v29, v30, v31, v24
|
||||
mov x1, x6
|
||||
add x3, x6, #(24 +3*32)
|
||||
mov x2, #32
|
||||
mov x4, #-32
|
||||
mov x1, x6
|
||||
add x3, x6, #(24 +3*32)
|
||||
mov x2, #32
|
||||
mov x4, #-32
|
||||
store16 v29.d, v30.d, v31.d, v24.d, x4
|
||||
|
||||
add x4, sp, #(\offset + 64)
|
||||
@@ -541,10 +541,10 @@ function func_tr_16x4_\name
|
||||
scale v29, v30, v31, v20, v20.4s, v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, \shift
|
||||
transpose16_4x4_2 v29, v30, v31, v20
|
||||
|
||||
add x1, x6, #8
|
||||
add x3, x6, #(16 + 3 * 32)
|
||||
mov x2, #32
|
||||
mov x4, #-32
|
||||
add x1, x6, #8
|
||||
add x3, x6, #(16 + 3 * 32)
|
||||
mov x2, #32
|
||||
mov x4, #-32
|
||||
store16 v29.d, v30.d, v31.d, v20.d, x4
|
||||
|
||||
ret
|
||||
@@ -557,21 +557,21 @@ function ff_hevc_idct_16x16_\bitdepth\()_neon, export=1
|
||||
mov x15, x30
|
||||
|
||||
// allocate a temp buffer
|
||||
sub sp, sp, #640
|
||||
sub sp, sp, #640
|
||||
|
||||
.irp i, 0, 1, 2, 3
|
||||
add x5, x0, #(8 * \i)
|
||||
add x6, sp, #(8 * \i * 16)
|
||||
add x5, x0, #(8 * \i)
|
||||
add x6, sp, #(8 * \i * 16)
|
||||
bl func_tr_16x4_firstpass
|
||||
.endr
|
||||
|
||||
.irp i, 0, 1, 2, 3
|
||||
add x5, sp, #(8 * \i)
|
||||
add x6, x0, #(8 * \i * 16)
|
||||
add x5, sp, #(8 * \i)
|
||||
add x6, x0, #(8 * \i * 16)
|
||||
bl func_tr_16x4_secondpass_\bitdepth
|
||||
.endr
|
||||
|
||||
add sp, sp, #640
|
||||
add sp, sp, #640
|
||||
|
||||
mov x30, x15
|
||||
ret
|
||||
@@ -591,35 +591,35 @@ idct_16x16 10
|
||||
// void ff_hevc_idct_NxN_dc_DEPTH_neon(int16_t *coeffs)
|
||||
.macro idct_dc size, bitdepth
|
||||
function ff_hevc_idct_\size\()x\size\()_dc_\bitdepth\()_neon, export=1
|
||||
ld1r {v4.8h}, [x0]
|
||||
srshr v4.8h, v4.8h, #1
|
||||
srshr v0.8h, v4.8h, #(14 - \bitdepth)
|
||||
srshr v1.8h, v4.8h, #(14 - \bitdepth)
|
||||
ld1r {v4.8h}, [x0]
|
||||
srshr v4.8h, v4.8h, #1
|
||||
srshr v0.8h, v4.8h, #(14 - \bitdepth)
|
||||
srshr v1.8h, v4.8h, #(14 - \bitdepth)
|
||||
.if \size > 4
|
||||
srshr v2.8h, v4.8h, #(14 - \bitdepth)
|
||||
srshr v3.8h, v4.8h, #(14 - \bitdepth)
|
||||
srshr v2.8h, v4.8h, #(14 - \bitdepth)
|
||||
srshr v3.8h, v4.8h, #(14 - \bitdepth)
|
||||
.if \size > 16 /* dc 32x32 */
|
||||
mov x2, #4
|
||||
mov x2, #4
|
||||
1:
|
||||
subs x2, x2, #1
|
||||
subs x2, x2, #1
|
||||
.endif
|
||||
add x12, x0, #64
|
||||
mov x13, #128
|
||||
.if \size > 8 /* dc 16x16 */
|
||||
st1 {v0.8h-v3.8h}, [x0], x13
|
||||
st1 {v0.8h-v3.8h}, [x12], x13
|
||||
st1 {v0.8h-v3.8h}, [x0], x13
|
||||
st1 {v0.8h-v3.8h}, [x12], x13
|
||||
st1 {v0.8h-v3.8h}, [x0], x13
|
||||
st1 {v0.8h-v3.8h}, [x12], x13
|
||||
st1 {v0.8h-v3.8h}, [x0], x13
|
||||
st1 {v0.8h-v3.8h}, [x12], x13
|
||||
st1 {v0.8h-v3.8h}, [x0], x13
|
||||
st1 {v0.8h-v3.8h}, [x12], x13
|
||||
st1 {v0.8h-v3.8h}, [x0], x13
|
||||
st1 {v0.8h-v3.8h}, [x12], x13
|
||||
.endif /* dc 8x8 */
|
||||
st1 {v0.8h-v3.8h}, [x0], x13
|
||||
st1 {v0.8h-v3.8h}, [x12], x13
|
||||
st1 {v0.8h-v3.8h}, [x0], x13
|
||||
st1 {v0.8h-v3.8h}, [x12], x13
|
||||
.if \size > 16 /* dc 32x32 */
|
||||
bne 1b
|
||||
.endif
|
||||
.else /* dc 4x4 */
|
||||
st1 {v0.8h-v1.8h}, [x0]
|
||||
st1 {v0.8h-v1.8h}, [x0]
|
||||
.endif
|
||||
ret
|
||||
endfunc
|
||||
|
||||
@@ -42,41 +42,41 @@ endconst
|
||||
// void put_hevc_qpel_h(int16_t *dst,
|
||||
// uint8_t *_src, ptrdiff_t _srcstride,
|
||||
// int height, intptr_t mx, intptr_t my, int width)
|
||||
dst .req x0
|
||||
dststride .req x7
|
||||
src .req x1
|
||||
srcstride .req x2
|
||||
height .req x3
|
||||
heightw .req w3
|
||||
mx .req x4
|
||||
width .req w6
|
||||
dst .req x0
|
||||
dststride .req x7
|
||||
src .req x1
|
||||
srcstride .req x2
|
||||
height .req x3
|
||||
heightw .req w3
|
||||
mx .req x4
|
||||
width .req w6
|
||||
.endif
|
||||
.ifc \type, qpel_uni
|
||||
// void put_hevc_qpel_uni_h(uint8_t *_dst, ptrdiff_t _dststride,
|
||||
// uint8_t *_src, ptrdiff_t _srcstride,
|
||||
// int height, intptr_t mx, intptr_t my, int width)
|
||||
dst .req x0
|
||||
dststride .req x1
|
||||
src .req x2
|
||||
srcstride .req x3
|
||||
height .req x4
|
||||
heightw .req w4
|
||||
mx .req x5
|
||||
width .req w7
|
||||
dst .req x0
|
||||
dststride .req x1
|
||||
src .req x2
|
||||
srcstride .req x3
|
||||
height .req x4
|
||||
heightw .req w4
|
||||
mx .req x5
|
||||
width .req w7
|
||||
.endif
|
||||
.ifc \type, qpel_bi
|
||||
// void put_hevc_qpel_bi_h(uint8_t *_dst, ptrdiff_t _dststride,
|
||||
// uint8_t *_src, ptrdiff_t _srcstride,
|
||||
// int16_t *src2, int height, intptr_t mx,
|
||||
// intptr_t my, int width)
|
||||
dst .req x0
|
||||
dststride .req x1
|
||||
src .req x2
|
||||
srcstride .req x3
|
||||
height .req x5
|
||||
heightw .req w5
|
||||
mx .req x6
|
||||
width .req w8
|
||||
dst .req x0
|
||||
dststride .req x1
|
||||
src .req x2
|
||||
srcstride .req x3
|
||||
height .req x5
|
||||
heightw .req w5
|
||||
mx .req x6
|
||||
width .req w8
|
||||
.endif
|
||||
|
||||
.ifc \type, qpel
|
||||
|
||||
+181
-181
@@ -26,295 +26,295 @@
|
||||
.if \avg
|
||||
mov x12, x0
|
||||
.endif
|
||||
1: ld1 {v0.16B}, [x1], x2
|
||||
ld1 {v1.16B}, [x1], x2
|
||||
ld1 {v2.16B}, [x1], x2
|
||||
ld1 {v3.16B}, [x1], x2
|
||||
1: ld1 {v0.16b}, [x1], x2
|
||||
ld1 {v1.16b}, [x1], x2
|
||||
ld1 {v2.16b}, [x1], x2
|
||||
ld1 {v3.16b}, [x1], x2
|
||||
.if \avg
|
||||
ld1 {v4.16B}, [x12], x2
|
||||
urhadd v0.16B, v0.16B, v4.16B
|
||||
ld1 {v5.16B}, [x12], x2
|
||||
urhadd v1.16B, v1.16B, v5.16B
|
||||
ld1 {v6.16B}, [x12], x2
|
||||
urhadd v2.16B, v2.16B, v6.16B
|
||||
ld1 {v7.16B}, [x12], x2
|
||||
urhadd v3.16B, v3.16B, v7.16B
|
||||
ld1 {v4.16b}, [x12], x2
|
||||
urhadd v0.16b, v0.16b, v4.16b
|
||||
ld1 {v5.16b}, [x12], x2
|
||||
urhadd v1.16b, v1.16b, v5.16b
|
||||
ld1 {v6.16b}, [x12], x2
|
||||
urhadd v2.16b, v2.16b, v6.16b
|
||||
ld1 {v7.16b}, [x12], x2
|
||||
urhadd v3.16b, v3.16b, v7.16b
|
||||
.endif
|
||||
subs w3, w3, #4
|
||||
st1 {v0.16B}, [x0], x2
|
||||
st1 {v1.16B}, [x0], x2
|
||||
st1 {v2.16B}, [x0], x2
|
||||
st1 {v3.16B}, [x0], x2
|
||||
st1 {v0.16b}, [x0], x2
|
||||
st1 {v1.16b}, [x0], x2
|
||||
st1 {v2.16b}, [x0], x2
|
||||
st1 {v3.16b}, [x0], x2
|
||||
b.ne 1b
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro pixels16_x2 rnd=1, avg=0
|
||||
1: ld1 {v0.16B, v1.16B}, [x1], x2
|
||||
ld1 {v2.16B, v3.16B}, [x1], x2
|
||||
1: ld1 {v0.16b, v1.16b}, [x1], x2
|
||||
ld1 {v2.16b, v3.16b}, [x1], x2
|
||||
subs w3, w3, #2
|
||||
ext v1.16B, v0.16B, v1.16B, #1
|
||||
avg v0.16B, v0.16B, v1.16B
|
||||
ext v3.16B, v2.16B, v3.16B, #1
|
||||
avg v2.16B, v2.16B, v3.16B
|
||||
ext v1.16b, v0.16b, v1.16b, #1
|
||||
avg v0.16b, v0.16b, v1.16b
|
||||
ext v3.16b, v2.16b, v3.16b, #1
|
||||
avg v2.16b, v2.16b, v3.16b
|
||||
.if \avg
|
||||
ld1 {v1.16B}, [x0], x2
|
||||
ld1 {v3.16B}, [x0]
|
||||
urhadd v0.16B, v0.16B, v1.16B
|
||||
urhadd v2.16B, v2.16B, v3.16B
|
||||
ld1 {v1.16b}, [x0], x2
|
||||
ld1 {v3.16b}, [x0]
|
||||
urhadd v0.16b, v0.16b, v1.16b
|
||||
urhadd v2.16b, v2.16b, v3.16b
|
||||
sub x0, x0, x2
|
||||
.endif
|
||||
st1 {v0.16B}, [x0], x2
|
||||
st1 {v2.16B}, [x0], x2
|
||||
st1 {v0.16b}, [x0], x2
|
||||
st1 {v2.16b}, [x0], x2
|
||||
b.ne 1b
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro pixels16_y2 rnd=1, avg=0
|
||||
sub w3, w3, #2
|
||||
ld1 {v0.16B}, [x1], x2
|
||||
ld1 {v1.16B}, [x1], x2
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
ld1 {v1.16b}, [x1], x2
|
||||
1: subs w3, w3, #2
|
||||
avg v2.16B, v0.16B, v1.16B
|
||||
ld1 {v0.16B}, [x1], x2
|
||||
avg v3.16B, v0.16B, v1.16B
|
||||
ld1 {v1.16B}, [x1], x2
|
||||
avg v2.16b, v0.16b, v1.16b
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
avg v3.16b, v0.16b, v1.16b
|
||||
ld1 {v1.16b}, [x1], x2
|
||||
.if \avg
|
||||
ld1 {v4.16B}, [x0], x2
|
||||
ld1 {v5.16B}, [x0]
|
||||
urhadd v2.16B, v2.16B, v4.16B
|
||||
urhadd v3.16B, v3.16B, v5.16B
|
||||
ld1 {v4.16b}, [x0], x2
|
||||
ld1 {v5.16b}, [x0]
|
||||
urhadd v2.16b, v2.16b, v4.16b
|
||||
urhadd v3.16b, v3.16b, v5.16b
|
||||
sub x0, x0, x2
|
||||
.endif
|
||||
st1 {v2.16B}, [x0], x2
|
||||
st1 {v3.16B}, [x0], x2
|
||||
st1 {v2.16b}, [x0], x2
|
||||
st1 {v3.16b}, [x0], x2
|
||||
b.ne 1b
|
||||
|
||||
avg v2.16B, v0.16B, v1.16B
|
||||
ld1 {v0.16B}, [x1], x2
|
||||
avg v3.16B, v0.16B, v1.16B
|
||||
avg v2.16b, v0.16b, v1.16b
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
avg v3.16b, v0.16b, v1.16b
|
||||
.if \avg
|
||||
ld1 {v4.16B}, [x0], x2
|
||||
ld1 {v5.16B}, [x0]
|
||||
urhadd v2.16B, v2.16B, v4.16B
|
||||
urhadd v3.16B, v3.16B, v5.16B
|
||||
ld1 {v4.16b}, [x0], x2
|
||||
ld1 {v5.16b}, [x0]
|
||||
urhadd v2.16b, v2.16b, v4.16b
|
||||
urhadd v3.16b, v3.16b, v5.16b
|
||||
sub x0, x0, x2
|
||||
.endif
|
||||
st1 {v2.16B}, [x0], x2
|
||||
st1 {v3.16B}, [x0], x2
|
||||
st1 {v2.16b}, [x0], x2
|
||||
st1 {v3.16b}, [x0], x2
|
||||
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro pixels16_xy2 rnd=1, avg=0
|
||||
sub w3, w3, #2
|
||||
ld1 {v0.16B, v1.16B}, [x1], x2
|
||||
ld1 {v4.16B, v5.16B}, [x1], x2
|
||||
ld1 {v0.16b, v1.16b}, [x1], x2
|
||||
ld1 {v4.16b, v5.16b}, [x1], x2
|
||||
NRND movi v26.8H, #1
|
||||
ext v1.16B, v0.16B, v1.16B, #1
|
||||
ext v5.16B, v4.16B, v5.16B, #1
|
||||
uaddl v16.8H, v0.8B, v1.8B
|
||||
uaddl2 v20.8H, v0.16B, v1.16B
|
||||
uaddl v18.8H, v4.8B, v5.8B
|
||||
uaddl2 v22.8H, v4.16B, v5.16B
|
||||
ext v1.16b, v0.16b, v1.16b, #1
|
||||
ext v5.16b, v4.16b, v5.16b, #1
|
||||
uaddl v16.8h, v0.8b, v1.8b
|
||||
uaddl2 v20.8h, v0.16b, v1.16b
|
||||
uaddl v18.8h, v4.8b, v5.8b
|
||||
uaddl2 v22.8h, v4.16b, v5.16b
|
||||
1: subs w3, w3, #2
|
||||
ld1 {v0.16B, v1.16B}, [x1], x2
|
||||
add v24.8H, v16.8H, v18.8H
|
||||
ld1 {v0.16b, v1.16b}, [x1], x2
|
||||
add v24.8h, v16.8h, v18.8h
|
||||
NRND add v24.8H, v24.8H, v26.8H
|
||||
ext v30.16B, v0.16B, v1.16B, #1
|
||||
add v1.8H, v20.8H, v22.8H
|
||||
mshrn v28.8B, v24.8H, #2
|
||||
ext v30.16b, v0.16b, v1.16b, #1
|
||||
add v1.8h, v20.8h, v22.8h
|
||||
mshrn v28.8b, v24.8h, #2
|
||||
NRND add v1.8H, v1.8H, v26.8H
|
||||
mshrn2 v28.16B, v1.8H, #2
|
||||
mshrn2 v28.16b, v1.8h, #2
|
||||
.if \avg
|
||||
ld1 {v16.16B}, [x0]
|
||||
urhadd v28.16B, v28.16B, v16.16B
|
||||
ld1 {v16.16b}, [x0]
|
||||
urhadd v28.16b, v28.16b, v16.16b
|
||||
.endif
|
||||
uaddl v16.8H, v0.8B, v30.8B
|
||||
ld1 {v2.16B, v3.16B}, [x1], x2
|
||||
uaddl2 v20.8H, v0.16B, v30.16B
|
||||
st1 {v28.16B}, [x0], x2
|
||||
add v24.8H, v16.8H, v18.8H
|
||||
uaddl v16.8h, v0.8b, v30.8b
|
||||
ld1 {v2.16b, v3.16b}, [x1], x2
|
||||
uaddl2 v20.8h, v0.16b, v30.16b
|
||||
st1 {v28.16b}, [x0], x2
|
||||
add v24.8h, v16.8h, v18.8h
|
||||
NRND add v24.8H, v24.8H, v26.8H
|
||||
ext v3.16B, v2.16B, v3.16B, #1
|
||||
add v0.8H, v20.8H, v22.8H
|
||||
mshrn v30.8B, v24.8H, #2
|
||||
ext v3.16b, v2.16b, v3.16b, #1
|
||||
add v0.8h, v20.8h, v22.8h
|
||||
mshrn v30.8b, v24.8h, #2
|
||||
NRND add v0.8H, v0.8H, v26.8H
|
||||
mshrn2 v30.16B, v0.8H, #2
|
||||
mshrn2 v30.16b, v0.8h, #2
|
||||
.if \avg
|
||||
ld1 {v18.16B}, [x0]
|
||||
urhadd v30.16B, v30.16B, v18.16B
|
||||
ld1 {v18.16b}, [x0]
|
||||
urhadd v30.16b, v30.16b, v18.16b
|
||||
.endif
|
||||
uaddl v18.8H, v2.8B, v3.8B
|
||||
uaddl2 v22.8H, v2.16B, v3.16B
|
||||
st1 {v30.16B}, [x0], x2
|
||||
uaddl v18.8h, v2.8b, v3.8b
|
||||
uaddl2 v22.8h, v2.16b, v3.16b
|
||||
st1 {v30.16b}, [x0], x2
|
||||
b.gt 1b
|
||||
|
||||
ld1 {v0.16B, v1.16B}, [x1], x2
|
||||
add v24.8H, v16.8H, v18.8H
|
||||
ld1 {v0.16b, v1.16b}, [x1], x2
|
||||
add v24.8h, v16.8h, v18.8h
|
||||
NRND add v24.8H, v24.8H, v26.8H
|
||||
ext v30.16B, v0.16B, v1.16B, #1
|
||||
add v1.8H, v20.8H, v22.8H
|
||||
mshrn v28.8B, v24.8H, #2
|
||||
ext v30.16b, v0.16b, v1.16b, #1
|
||||
add v1.8h, v20.8h, v22.8h
|
||||
mshrn v28.8b, v24.8h, #2
|
||||
NRND add v1.8H, v1.8H, v26.8H
|
||||
mshrn2 v28.16B, v1.8H, #2
|
||||
mshrn2 v28.16b, v1.8h, #2
|
||||
.if \avg
|
||||
ld1 {v16.16B}, [x0]
|
||||
urhadd v28.16B, v28.16B, v16.16B
|
||||
ld1 {v16.16b}, [x0]
|
||||
urhadd v28.16b, v28.16b, v16.16b
|
||||
.endif
|
||||
uaddl v16.8H, v0.8B, v30.8B
|
||||
uaddl2 v20.8H, v0.16B, v30.16B
|
||||
st1 {v28.16B}, [x0], x2
|
||||
add v24.8H, v16.8H, v18.8H
|
||||
uaddl v16.8h, v0.8b, v30.8b
|
||||
uaddl2 v20.8h, v0.16b, v30.16b
|
||||
st1 {v28.16b}, [x0], x2
|
||||
add v24.8h, v16.8h, v18.8h
|
||||
NRND add v24.8H, v24.8H, v26.8H
|
||||
add v0.8H, v20.8H, v22.8H
|
||||
mshrn v30.8B, v24.8H, #2
|
||||
add v0.8h, v20.8h, v22.8h
|
||||
mshrn v30.8b, v24.8h, #2
|
||||
NRND add v0.8H, v0.8H, v26.8H
|
||||
mshrn2 v30.16B, v0.8H, #2
|
||||
mshrn2 v30.16b, v0.8h, #2
|
||||
.if \avg
|
||||
ld1 {v18.16B}, [x0]
|
||||
urhadd v30.16B, v30.16B, v18.16B
|
||||
ld1 {v18.16b}, [x0]
|
||||
urhadd v30.16b, v30.16b, v18.16b
|
||||
.endif
|
||||
st1 {v30.16B}, [x0], x2
|
||||
st1 {v30.16b}, [x0], x2
|
||||
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro pixels8 rnd=1, avg=0
|
||||
1: ld1 {v0.8B}, [x1], x2
|
||||
ld1 {v1.8B}, [x1], x2
|
||||
ld1 {v2.8B}, [x1], x2
|
||||
ld1 {v3.8B}, [x1], x2
|
||||
1: ld1 {v0.8b}, [x1], x2
|
||||
ld1 {v1.8b}, [x1], x2
|
||||
ld1 {v2.8b}, [x1], x2
|
||||
ld1 {v3.8b}, [x1], x2
|
||||
.if \avg
|
||||
ld1 {v4.8B}, [x0], x2
|
||||
urhadd v0.8B, v0.8B, v4.8B
|
||||
ld1 {v5.8B}, [x0], x2
|
||||
urhadd v1.8B, v1.8B, v5.8B
|
||||
ld1 {v6.8B}, [x0], x2
|
||||
urhadd v2.8B, v2.8B, v6.8B
|
||||
ld1 {v7.8B}, [x0], x2
|
||||
urhadd v3.8B, v3.8B, v7.8B
|
||||
ld1 {v4.8b}, [x0], x2
|
||||
urhadd v0.8b, v0.8b, v4.8b
|
||||
ld1 {v5.8b}, [x0], x2
|
||||
urhadd v1.8b, v1.8b, v5.8b
|
||||
ld1 {v6.8b}, [x0], x2
|
||||
urhadd v2.8b, v2.8b, v6.8b
|
||||
ld1 {v7.8b}, [x0], x2
|
||||
urhadd v3.8b, v3.8b, v7.8b
|
||||
sub x0, x0, x2, lsl #2
|
||||
.endif
|
||||
subs w3, w3, #4
|
||||
st1 {v0.8B}, [x0], x2
|
||||
st1 {v1.8B}, [x0], x2
|
||||
st1 {v2.8B}, [x0], x2
|
||||
st1 {v3.8B}, [x0], x2
|
||||
st1 {v0.8b}, [x0], x2
|
||||
st1 {v1.8b}, [x0], x2
|
||||
st1 {v2.8b}, [x0], x2
|
||||
st1 {v3.8b}, [x0], x2
|
||||
b.ne 1b
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro pixels8_x2 rnd=1, avg=0
|
||||
1: ld1 {v0.8B, v1.8B}, [x1], x2
|
||||
ext v1.8B, v0.8B, v1.8B, #1
|
||||
ld1 {v2.8B, v3.8B}, [x1], x2
|
||||
ext v3.8B, v2.8B, v3.8B, #1
|
||||
1: ld1 {v0.8b, v1.8b}, [x1], x2
|
||||
ext v1.8b, v0.8b, v1.8b, #1
|
||||
ld1 {v2.8b, v3.8b}, [x1], x2
|
||||
ext v3.8b, v2.8b, v3.8b, #1
|
||||
subs w3, w3, #2
|
||||
avg v0.8B, v0.8B, v1.8B
|
||||
avg v2.8B, v2.8B, v3.8B
|
||||
avg v0.8b, v0.8b, v1.8b
|
||||
avg v2.8b, v2.8b, v3.8b
|
||||
.if \avg
|
||||
ld1 {v4.8B}, [x0], x2
|
||||
ld1 {v5.8B}, [x0]
|
||||
urhadd v0.8B, v0.8B, v4.8B
|
||||
urhadd v2.8B, v2.8B, v5.8B
|
||||
ld1 {v4.8b}, [x0], x2
|
||||
ld1 {v5.8b}, [x0]
|
||||
urhadd v0.8b, v0.8b, v4.8b
|
||||
urhadd v2.8b, v2.8b, v5.8b
|
||||
sub x0, x0, x2
|
||||
.endif
|
||||
st1 {v0.8B}, [x0], x2
|
||||
st1 {v2.8B}, [x0], x2
|
||||
st1 {v0.8b}, [x0], x2
|
||||
st1 {v2.8b}, [x0], x2
|
||||
b.ne 1b
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro pixels8_y2 rnd=1, avg=0
|
||||
sub w3, w3, #2
|
||||
ld1 {v0.8B}, [x1], x2
|
||||
ld1 {v1.8B}, [x1], x2
|
||||
ld1 {v0.8b}, [x1], x2
|
||||
ld1 {v1.8b}, [x1], x2
|
||||
1: subs w3, w3, #2
|
||||
avg v4.8B, v0.8B, v1.8B
|
||||
ld1 {v0.8B}, [x1], x2
|
||||
avg v5.8B, v0.8B, v1.8B
|
||||
ld1 {v1.8B}, [x1], x2
|
||||
avg v4.8b, v0.8b, v1.8b
|
||||
ld1 {v0.8b}, [x1], x2
|
||||
avg v5.8b, v0.8b, v1.8b
|
||||
ld1 {v1.8b}, [x1], x2
|
||||
.if \avg
|
||||
ld1 {v2.8B}, [x0], x2
|
||||
ld1 {v3.8B}, [x0]
|
||||
urhadd v4.8B, v4.8B, v2.8B
|
||||
urhadd v5.8B, v5.8B, v3.8B
|
||||
ld1 {v2.8b}, [x0], x2
|
||||
ld1 {v3.8b}, [x0]
|
||||
urhadd v4.8b, v4.8b, v2.8b
|
||||
urhadd v5.8b, v5.8b, v3.8b
|
||||
sub x0, x0, x2
|
||||
.endif
|
||||
st1 {v4.8B}, [x0], x2
|
||||
st1 {v5.8B}, [x0], x2
|
||||
st1 {v4.8b}, [x0], x2
|
||||
st1 {v5.8b}, [x0], x2
|
||||
b.ne 1b
|
||||
|
||||
avg v4.8B, v0.8B, v1.8B
|
||||
ld1 {v0.8B}, [x1], x2
|
||||
avg v5.8B, v0.8B, v1.8B
|
||||
avg v4.8b, v0.8b, v1.8b
|
||||
ld1 {v0.8b}, [x1], x2
|
||||
avg v5.8b, v0.8b, v1.8b
|
||||
.if \avg
|
||||
ld1 {v2.8B}, [x0], x2
|
||||
ld1 {v3.8B}, [x0]
|
||||
urhadd v4.8B, v4.8B, v2.8B
|
||||
urhadd v5.8B, v5.8B, v3.8B
|
||||
ld1 {v2.8b}, [x0], x2
|
||||
ld1 {v3.8b}, [x0]
|
||||
urhadd v4.8b, v4.8b, v2.8b
|
||||
urhadd v5.8b, v5.8b, v3.8b
|
||||
sub x0, x0, x2
|
||||
.endif
|
||||
st1 {v4.8B}, [x0], x2
|
||||
st1 {v5.8B}, [x0], x2
|
||||
st1 {v4.8b}, [x0], x2
|
||||
st1 {v5.8b}, [x0], x2
|
||||
|
||||
ret
|
||||
.endm
|
||||
|
||||
.macro pixels8_xy2 rnd=1, avg=0
|
||||
sub w3, w3, #2
|
||||
ld1 {v0.16B}, [x1], x2
|
||||
ld1 {v1.16B}, [x1], x2
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
ld1 {v1.16b}, [x1], x2
|
||||
NRND movi v19.8H, #1
|
||||
ext v4.16B, v0.16B, v4.16B, #1
|
||||
ext v6.16B, v1.16B, v6.16B, #1
|
||||
uaddl v16.8H, v0.8B, v4.8B
|
||||
uaddl v17.8H, v1.8B, v6.8B
|
||||
ext v4.16b, v0.16b, v4.16b, #1
|
||||
ext v6.16b, v1.16b, v6.16b, #1
|
||||
uaddl v16.8h, v0.8b, v4.8b
|
||||
uaddl v17.8h, v1.8b, v6.8b
|
||||
1: subs w3, w3, #2
|
||||
ld1 {v0.16B}, [x1], x2
|
||||
add v18.8H, v16.8H, v17.8H
|
||||
ext v4.16B, v0.16B, v4.16B, #1
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
add v18.8h, v16.8h, v17.8h
|
||||
ext v4.16b, v0.16b, v4.16b, #1
|
||||
NRND add v18.8H, v18.8H, v19.8H
|
||||
uaddl v16.8H, v0.8B, v4.8B
|
||||
mshrn v5.8B, v18.8H, #2
|
||||
ld1 {v1.16B}, [x1], x2
|
||||
add v18.8H, v16.8H, v17.8H
|
||||
uaddl v16.8h, v0.8b, v4.8b
|
||||
mshrn v5.8b, v18.8h, #2
|
||||
ld1 {v1.16b}, [x1], x2
|
||||
add v18.8h, v16.8h, v17.8h
|
||||
.if \avg
|
||||
ld1 {v7.8B}, [x0]
|
||||
urhadd v5.8B, v5.8B, v7.8B
|
||||
ld1 {v7.8b}, [x0]
|
||||
urhadd v5.8b, v5.8b, v7.8b
|
||||
.endif
|
||||
NRND add v18.8H, v18.8H, v19.8H
|
||||
st1 {v5.8B}, [x0], x2
|
||||
mshrn v7.8B, v18.8H, #2
|
||||
st1 {v5.8b}, [x0], x2
|
||||
mshrn v7.8b, v18.8h, #2
|
||||
.if \avg
|
||||
ld1 {v5.8B}, [x0]
|
||||
urhadd v7.8B, v7.8B, v5.8B
|
||||
ld1 {v5.8b}, [x0]
|
||||
urhadd v7.8b, v7.8b, v5.8b
|
||||
.endif
|
||||
ext v6.16B, v1.16B, v6.16B, #1
|
||||
uaddl v17.8H, v1.8B, v6.8B
|
||||
st1 {v7.8B}, [x0], x2
|
||||
ext v6.16b, v1.16b, v6.16b, #1
|
||||
uaddl v17.8h, v1.8b, v6.8b
|
||||
st1 {v7.8b}, [x0], x2
|
||||
b.gt 1b
|
||||
|
||||
ld1 {v0.16B}, [x1], x2
|
||||
add v18.8H, v16.8H, v17.8H
|
||||
ext v4.16B, v0.16B, v4.16B, #1
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
add v18.8h, v16.8h, v17.8h
|
||||
ext v4.16b, v0.16b, v4.16b, #1
|
||||
NRND add v18.8H, v18.8H, v19.8H
|
||||
uaddl v16.8H, v0.8B, v4.8B
|
||||
mshrn v5.8B, v18.8H, #2
|
||||
add v18.8H, v16.8H, v17.8H
|
||||
uaddl v16.8h, v0.8b, v4.8b
|
||||
mshrn v5.8b, v18.8h, #2
|
||||
add v18.8h, v16.8h, v17.8h
|
||||
.if \avg
|
||||
ld1 {v7.8B}, [x0]
|
||||
urhadd v5.8B, v5.8B, v7.8B
|
||||
ld1 {v7.8b}, [x0]
|
||||
urhadd v5.8b, v5.8b, v7.8b
|
||||
.endif
|
||||
NRND add v18.8H, v18.8H, v19.8H
|
||||
st1 {v5.8B}, [x0], x2
|
||||
mshrn v7.8B, v18.8H, #2
|
||||
st1 {v5.8b}, [x0], x2
|
||||
mshrn v7.8b, v18.8h, #2
|
||||
.if \avg
|
||||
ld1 {v5.8B}, [x0]
|
||||
urhadd v7.8B, v7.8B, v5.8B
|
||||
ld1 {v5.8b}, [x0]
|
||||
urhadd v7.8b, v7.8b, v5.8b
|
||||
.endif
|
||||
st1 {v7.8B}, [x0], x2
|
||||
st1 {v7.8b}, [x0], x2
|
||||
|
||||
ret
|
||||
.endm
|
||||
|
||||
@@ -1099,7 +1099,7 @@ function vsse_intra16_neon, export=1
|
||||
cbnz w4, 2b
|
||||
|
||||
3:
|
||||
add v16.4s, v16.4s, v17.4S
|
||||
add v16.4s, v16.4s, v17.4s
|
||||
uaddlv d17, v16.4s
|
||||
fmov w0, s17
|
||||
|
||||
|
||||
+104
-104
@@ -17,146 +17,146 @@
|
||||
*/
|
||||
|
||||
.macro transpose_8x8B r0, r1, r2, r3, r4, r5, r6, r7, r8, r9
|
||||
trn1 \r8\().8B, \r0\().8B, \r1\().8B
|
||||
trn2 \r9\().8B, \r0\().8B, \r1\().8B
|
||||
trn1 \r1\().8B, \r2\().8B, \r3\().8B
|
||||
trn2 \r3\().8B, \r2\().8B, \r3\().8B
|
||||
trn1 \r0\().8B, \r4\().8B, \r5\().8B
|
||||
trn2 \r5\().8B, \r4\().8B, \r5\().8B
|
||||
trn1 \r2\().8B, \r6\().8B, \r7\().8B
|
||||
trn2 \r7\().8B, \r6\().8B, \r7\().8B
|
||||
trn1 \r8\().8b, \r0\().8b, \r1\().8b
|
||||
trn2 \r9\().8b, \r0\().8b, \r1\().8b
|
||||
trn1 \r1\().8b, \r2\().8b, \r3\().8b
|
||||
trn2 \r3\().8b, \r2\().8b, \r3\().8b
|
||||
trn1 \r0\().8b, \r4\().8b, \r5\().8b
|
||||
trn2 \r5\().8b, \r4\().8b, \r5\().8b
|
||||
trn1 \r2\().8b, \r6\().8b, \r7\().8b
|
||||
trn2 \r7\().8b, \r6\().8b, \r7\().8b
|
||||
|
||||
trn1 \r4\().4H, \r0\().4H, \r2\().4H
|
||||
trn2 \r2\().4H, \r0\().4H, \r2\().4H
|
||||
trn1 \r6\().4H, \r5\().4H, \r7\().4H
|
||||
trn2 \r7\().4H, \r5\().4H, \r7\().4H
|
||||
trn1 \r5\().4H, \r9\().4H, \r3\().4H
|
||||
trn2 \r9\().4H, \r9\().4H, \r3\().4H
|
||||
trn1 \r3\().4H, \r8\().4H, \r1\().4H
|
||||
trn2 \r8\().4H, \r8\().4H, \r1\().4H
|
||||
trn1 \r4\().4h, \r0\().4h, \r2\().4h
|
||||
trn2 \r2\().4h, \r0\().4h, \r2\().4h
|
||||
trn1 \r6\().4h, \r5\().4h, \r7\().4h
|
||||
trn2 \r7\().4h, \r5\().4h, \r7\().4h
|
||||
trn1 \r5\().4h, \r9\().4h, \r3\().4h
|
||||
trn2 \r9\().4h, \r9\().4h, \r3\().4h
|
||||
trn1 \r3\().4h, \r8\().4h, \r1\().4h
|
||||
trn2 \r8\().4h, \r8\().4h, \r1\().4h
|
||||
|
||||
trn1 \r0\().2S, \r3\().2S, \r4\().2S
|
||||
trn2 \r4\().2S, \r3\().2S, \r4\().2S
|
||||
trn1 \r0\().2s, \r3\().2s, \r4\().2s
|
||||
trn2 \r4\().2s, \r3\().2s, \r4\().2s
|
||||
|
||||
trn1 \r1\().2S, \r5\().2S, \r6\().2S
|
||||
trn2 \r5\().2S, \r5\().2S, \r6\().2S
|
||||
trn1 \r1\().2s, \r5\().2s, \r6\().2s
|
||||
trn2 \r5\().2s, \r5\().2s, \r6\().2s
|
||||
|
||||
trn2 \r6\().2S, \r8\().2S, \r2\().2S
|
||||
trn1 \r2\().2S, \r8\().2S, \r2\().2S
|
||||
trn2 \r6\().2s, \r8\().2s, \r2\().2s
|
||||
trn1 \r2\().2s, \r8\().2s, \r2\().2s
|
||||
|
||||
trn1 \r3\().2S, \r9\().2S, \r7\().2S
|
||||
trn2 \r7\().2S, \r9\().2S, \r7\().2S
|
||||
trn1 \r3\().2s, \r9\().2s, \r7\().2s
|
||||
trn2 \r7\().2s, \r9\().2s, \r7\().2s
|
||||
.endm
|
||||
|
||||
.macro transpose_8x16B 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 \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 \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 \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
|
||||
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
|
||||
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
|
||||
trn1 \r3\().4s, \t1\().4s, \r7\().4s
|
||||
trn2 \r7\().4s, \t1\().4s, \r7\().4s
|
||||
.endm
|
||||
|
||||
.macro transpose_4x16B 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 \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
|
||||
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_4x8B 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 \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
|
||||
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
|
||||
|
||||
.macro transpose_4x4H r0, r1, r2, r3, r4, r5, r6, r7
|
||||
trn1 \r4\().4H, \r0\().4H, \r1\().4H
|
||||
trn2 \r5\().4H, \r0\().4H, \r1\().4H
|
||||
trn1 \r6\().4H, \r2\().4H, \r3\().4H
|
||||
trn2 \r7\().4H, \r2\().4H, \r3\().4H
|
||||
trn1 \r4\().4h, \r0\().4h, \r1\().4h
|
||||
trn2 \r5\().4h, \r0\().4h, \r1\().4h
|
||||
trn1 \r6\().4h, \r2\().4h, \r3\().4h
|
||||
trn2 \r7\().4h, \r2\().4h, \r3\().4h
|
||||
|
||||
trn1 \r0\().2S, \r4\().2S, \r6\().2S
|
||||
trn2 \r2\().2S, \r4\().2S, \r6\().2S
|
||||
trn1 \r1\().2S, \r5\().2S, \r7\().2S
|
||||
trn2 \r3\().2S, \r5\().2S, \r7\().2S
|
||||
trn1 \r0\().2s, \r4\().2s, \r6\().2s
|
||||
trn2 \r2\().2s, \r4\().2s, \r6\().2s
|
||||
trn1 \r1\().2s, \r5\().2s, \r7\().2s
|
||||
trn2 \r3\().2s, \r5\().2s, \r7\().2s
|
||||
.endm
|
||||
|
||||
.macro transpose_4x8H r0, r1, r2, r3, t4, t5, t6, t7
|
||||
trn1 \t4\().8H, \r0\().8H, \r1\().8H
|
||||
trn2 \t5\().8H, \r0\().8H, \r1\().8H
|
||||
trn1 \t6\().8H, \r2\().8H, \r3\().8H
|
||||
trn2 \t7\().8H, \r2\().8H, \r3\().8H
|
||||
trn1 \t4\().8h, \r0\().8h, \r1\().8h
|
||||
trn2 \t5\().8h, \r0\().8h, \r1\().8h
|
||||
trn1 \t6\().8h, \r2\().8h, \r3\().8h
|
||||
trn2 \t7\().8h, \r2\().8h, \r3\().8h
|
||||
|
||||
trn1 \r0\().4S, \t4\().4S, \t6\().4S
|
||||
trn2 \r2\().4S, \t4\().4S, \t6\().4S
|
||||
trn1 \r1\().4S, \t5\().4S, \t7\().4S
|
||||
trn2 \r3\().4S, \t5\().4S, \t7\().4S
|
||||
trn1 \r0\().4s, \t4\().4s, \t6\().4s
|
||||
trn2 \r2\().4s, \t4\().4s, \t6\().4s
|
||||
trn1 \r1\().4s, \t5\().4s, \t7\().4s
|
||||
trn2 \r3\().4s, \t5\().4s, \t7\().4s
|
||||
.endm
|
||||
|
||||
.macro transpose_8x8H 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 \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 \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 \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
|
||||
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
|
||||
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
|
||||
trn1 \r3\().2d, \r9\().2d, \r7\().2d
|
||||
trn2 \r7\().2d, \r9\().2d, \r7\().2d
|
||||
|
||||
.endm
|
||||
|
||||
@@ -33,81 +33,81 @@ const tab_x2, align=4
|
||||
endconst
|
||||
|
||||
function ff_opus_deemphasis_neon, export=1
|
||||
movrel x4, tab_st
|
||||
ld1 {v4.4s}, [x4]
|
||||
movrel x4, tab_x0
|
||||
ld1 {v5.4s}, [x4]
|
||||
movrel x4, tab_x1
|
||||
ld1 {v6.4s}, [x4]
|
||||
movrel x4, tab_x2
|
||||
ld1 {v7.4s}, [x4]
|
||||
movrel x4, tab_st
|
||||
ld1 {v4.4s}, [x4]
|
||||
movrel x4, tab_x0
|
||||
ld1 {v5.4s}, [x4]
|
||||
movrel x4, tab_x1
|
||||
ld1 {v6.4s}, [x4]
|
||||
movrel x4, tab_x2
|
||||
ld1 {v7.4s}, [x4]
|
||||
|
||||
fmul v0.4s, v4.4s, v0.s[0]
|
||||
fmul v0.4s, v4.4s, v0.s[0]
|
||||
|
||||
1: ld1 {v1.4s, v2.4s}, [x1], #32
|
||||
1: ld1 {v1.4s, v2.4s}, [x1], #32
|
||||
|
||||
fmla v0.4s, v5.4s, v1.s[0]
|
||||
fmul v3.4s, v7.4s, v2.s[2]
|
||||
fmla v0.4s, v5.4s, v1.s[0]
|
||||
fmul v3.4s, v7.4s, v2.s[2]
|
||||
|
||||
fmla v0.4s, v6.4s, v1.s[1]
|
||||
fmla v3.4s, v6.4s, v2.s[1]
|
||||
fmla v0.4s, v6.4s, v1.s[1]
|
||||
fmla v3.4s, v6.4s, v2.s[1]
|
||||
|
||||
fmla v0.4s, v7.4s, v1.s[2]
|
||||
fmla v3.4s, v5.4s, v2.s[0]
|
||||
fmla v0.4s, v7.4s, v1.s[2]
|
||||
fmla v3.4s, v5.4s, v2.s[0]
|
||||
|
||||
fadd v1.4s, v1.4s, v0.4s
|
||||
fadd v2.4s, v2.4s, v3.4s
|
||||
fadd v1.4s, v1.4s, v0.4s
|
||||
fadd v2.4s, v2.4s, v3.4s
|
||||
|
||||
fmla v2.4s, v4.4s, v1.s[3]
|
||||
fmla v2.4s, v4.4s, v1.s[3]
|
||||
|
||||
st1 {v1.4s, v2.4s}, [x0], #32
|
||||
fmul v0.4s, v4.4s, v2.s[3]
|
||||
st1 {v1.4s, v2.4s}, [x0], #32
|
||||
fmul v0.4s, v4.4s, v2.s[3]
|
||||
|
||||
subs w2, w2, #8
|
||||
b.gt 1b
|
||||
subs w2, w2, #8
|
||||
b.gt 1b
|
||||
|
||||
mov s0, v2.s[3]
|
||||
mov s0, v2.s[3]
|
||||
|
||||
ret
|
||||
endfunc
|
||||
|
||||
function ff_opus_postfilter_neon, export=1
|
||||
ld1 {v0.4s}, [x2]
|
||||
dup v1.4s, v0.s[1]
|
||||
dup v2.4s, v0.s[2]
|
||||
dup v0.4s, v0.s[0]
|
||||
ld1 {v0.4s}, [x2]
|
||||
dup v1.4s, v0.s[1]
|
||||
dup v2.4s, v0.s[2]
|
||||
dup v0.4s, v0.s[0]
|
||||
|
||||
add w1, w1, #2
|
||||
sub x1, x0, x1, lsl #2
|
||||
add w1, w1, #2
|
||||
sub x1, x0, x1, lsl #2
|
||||
|
||||
ld1 {v3.4s}, [x1]
|
||||
fmul v3.4s, v3.4s, v2.4s
|
||||
ld1 {v3.4s}, [x1]
|
||||
fmul v3.4s, v3.4s, v2.4s
|
||||
|
||||
1: add x1, x1, #4
|
||||
ld1 {v4.4s}, [x1]
|
||||
add x1, x1, #4
|
||||
ld1 {v5.4s}, [x1]
|
||||
add x1, x1, #4
|
||||
ld1 {v6.4s}, [x1]
|
||||
add x1, x1, #4
|
||||
ld1 {v7.4s}, [x1]
|
||||
1: add x1, x1, #4
|
||||
ld1 {v4.4s}, [x1]
|
||||
add x1, x1, #4
|
||||
ld1 {v5.4s}, [x1]
|
||||
add x1, x1, #4
|
||||
ld1 {v6.4s}, [x1]
|
||||
add x1, x1, #4
|
||||
ld1 {v7.4s}, [x1]
|
||||
|
||||
fmla v3.4s, v7.4s, v2.4s
|
||||
fadd v6.4s, v6.4s, v4.4s
|
||||
fmla v3.4s, v7.4s, v2.4s
|
||||
fadd v6.4s, v6.4s, v4.4s
|
||||
|
||||
ld1 {v4.4s}, [x0]
|
||||
fmla v4.4s, v5.4s, v0.4s
|
||||
ld1 {v4.4s}, [x0]
|
||||
fmla v4.4s, v5.4s, v0.4s
|
||||
|
||||
fmul v6.4s, v6.4s, v1.4s
|
||||
fadd v6.4s, v6.4s, v3.4s
|
||||
fmul v6.4s, v6.4s, v1.4s
|
||||
fadd v6.4s, v6.4s, v3.4s
|
||||
|
||||
fadd v4.4s, v4.4s, v6.4s
|
||||
fmul v3.4s, v7.4s, v2.4s
|
||||
fadd v4.4s, v4.4s, v6.4s
|
||||
fmul v3.4s, v7.4s, v2.4s
|
||||
|
||||
st1 {v4.4s}, [x0], #16
|
||||
st1 {v4.4s}, [x0], #16
|
||||
|
||||
subs w3, w3, #4
|
||||
b.gt 1b
|
||||
subs w3, w3, #4
|
||||
b.gt 1b
|
||||
|
||||
ret
|
||||
endfunc
|
||||
|
||||
+147
-147
@@ -46,49 +46,49 @@ function ff_sbr_sum64x5_neon, export=1
|
||||
add x3, x0, #192*4
|
||||
add x4, x0, #256*4
|
||||
mov x5, #64
|
||||
1: ld1 {v0.4S}, [x0]
|
||||
ld1 {v1.4S}, [x1], #16
|
||||
fadd v0.4S, v0.4S, v1.4S
|
||||
ld1 {v2.4S}, [x2], #16
|
||||
fadd v0.4S, v0.4S, v2.4S
|
||||
ld1 {v3.4S}, [x3], #16
|
||||
fadd v0.4S, v0.4S, v3.4S
|
||||
ld1 {v4.4S}, [x4], #16
|
||||
fadd v0.4S, v0.4S, v4.4S
|
||||
st1 {v0.4S}, [x0], #16
|
||||
1: ld1 {v0.4s}, [x0]
|
||||
ld1 {v1.4s}, [x1], #16
|
||||
fadd v0.4s, v0.4s, v1.4s
|
||||
ld1 {v2.4s}, [x2], #16
|
||||
fadd v0.4s, v0.4s, v2.4s
|
||||
ld1 {v3.4s}, [x3], #16
|
||||
fadd v0.4s, v0.4s, v3.4s
|
||||
ld1 {v4.4s}, [x4], #16
|
||||
fadd v0.4s, v0.4s, v4.4s
|
||||
st1 {v0.4s}, [x0], #16
|
||||
subs x5, x5, #4
|
||||
b.gt 1b
|
||||
ret
|
||||
endfunc
|
||||
|
||||
function ff_sbr_sum_square_neon, export=1
|
||||
movi v0.4S, #0
|
||||
1: ld1 {v1.4S}, [x0], #16
|
||||
fmla v0.4S, v1.4S, v1.4S
|
||||
movi v0.4s, #0
|
||||
1: ld1 {v1.4s}, [x0], #16
|
||||
fmla v0.4s, v1.4s, v1.4s
|
||||
subs w1, w1, #2
|
||||
b.gt 1b
|
||||
faddp v0.4S, v0.4S, v0.4S
|
||||
faddp v0.4S, v0.4S, v0.4S
|
||||
faddp v0.4s, v0.4s, v0.4s
|
||||
faddp v0.4s, v0.4s, v0.4s
|
||||
ret
|
||||
endfunc
|
||||
|
||||
function ff_sbr_neg_odd_64_neon, export=1
|
||||
mov x1, x0
|
||||
movi v5.4S, #1<<7, lsl #24
|
||||
ld2 {v0.4S, v1.4S}, [x0], #32
|
||||
eor v1.16B, v1.16B, v5.16B
|
||||
ld2 {v2.4S, v3.4S}, [x0], #32
|
||||
movi v5.4s, #1<<7, lsl #24
|
||||
ld2 {v0.4s, v1.4s}, [x0], #32
|
||||
eor v1.16b, v1.16b, v5.16b
|
||||
ld2 {v2.4s, v3.4s}, [x0], #32
|
||||
.rept 3
|
||||
st2 {v0.4S, v1.4S}, [x1], #32
|
||||
eor v3.16B, v3.16B, v5.16B
|
||||
ld2 {v0.4S, v1.4S}, [x0], #32
|
||||
st2 {v2.4S, v3.4S}, [x1], #32
|
||||
eor v1.16B, v1.16B, v5.16B
|
||||
ld2 {v2.4S, v3.4S}, [x0], #32
|
||||
st2 {v0.4s, v1.4s}, [x1], #32
|
||||
eor v3.16b, v3.16b, v5.16b
|
||||
ld2 {v0.4s, v1.4s}, [x0], #32
|
||||
st2 {v2.4s, v3.4s}, [x1], #32
|
||||
eor v1.16b, v1.16b, v5.16b
|
||||
ld2 {v2.4s, v3.4s}, [x0], #32
|
||||
.endr
|
||||
eor v3.16B, v3.16B, v5.16B
|
||||
st2 {v0.4S, v1.4S}, [x1], #32
|
||||
st2 {v2.4S, v3.4S}, [x1], #32
|
||||
eor v3.16b, v3.16b, v5.16b
|
||||
st2 {v0.4s, v1.4s}, [x1], #32
|
||||
st2 {v2.4s, v3.4s}, [x1], #32
|
||||
ret
|
||||
endfunc
|
||||
|
||||
@@ -97,26 +97,26 @@ function ff_sbr_qmf_pre_shuffle_neon, export=1
|
||||
add x2, x0, #64*4
|
||||
mov x3, #-16
|
||||
mov x4, #-4
|
||||
movi v6.4S, #1<<7, lsl #24
|
||||
ld1 {v0.2S}, [x0], #8
|
||||
st1 {v0.2S}, [x2], #8
|
||||
movi v6.4s, #1<<7, lsl #24
|
||||
ld1 {v0.2s}, [x0], #8
|
||||
st1 {v0.2s}, [x2], #8
|
||||
.rept 7
|
||||
ld1 {v1.4S}, [x1], x3
|
||||
ld1 {v2.4S}, [x0], #16
|
||||
eor v1.16B, v1.16B, v6.16B
|
||||
rev64 v1.4S, v1.4S
|
||||
ext v1.16B, v1.16B, v1.16B, #8
|
||||
st2 {v1.4S, v2.4S}, [x2], #32
|
||||
ld1 {v1.4s}, [x1], x3
|
||||
ld1 {v2.4s}, [x0], #16
|
||||
eor v1.16b, v1.16b, v6.16b
|
||||
rev64 v1.4s, v1.4s
|
||||
ext v1.16b, v1.16b, v1.16b, #8
|
||||
st2 {v1.4s, v2.4s}, [x2], #32
|
||||
.endr
|
||||
add x1, x1, #8
|
||||
ld1 {v1.2S}, [x1], x4
|
||||
ld1 {v2.2S}, [x0], #8
|
||||
ld1 {v1.S}[3], [x1]
|
||||
ld1 {v2.S}[2], [x0]
|
||||
eor v1.16B, v1.16B, v6.16B
|
||||
rev64 v1.4S, v1.4S
|
||||
st2 {v1.2S, v2.2S}, [x2], #16
|
||||
st2 {v1.S, v2.S}[2], [x2]
|
||||
ld1 {v1.2s}, [x1], x4
|
||||
ld1 {v2.2s}, [x0], #8
|
||||
ld1 {v1.s}[3], [x1]
|
||||
ld1 {v2.s}[2], [x0]
|
||||
eor v1.16b, v1.16b, v6.16b
|
||||
rev64 v1.4s, v1.4s
|
||||
st2 {v1.2s, v2.2s}, [x2], #16
|
||||
st2 {v1.s, v2.s}[2], [x2]
|
||||
ret
|
||||
endfunc
|
||||
|
||||
@@ -124,13 +124,13 @@ function ff_sbr_qmf_post_shuffle_neon, export=1
|
||||
add x2, x1, #60*4
|
||||
mov x3, #-16
|
||||
mov x4, #32
|
||||
movi v6.4S, #1<<7, lsl #24
|
||||
1: ld1 {v0.4S}, [x2], x3
|
||||
ld1 {v1.4S}, [x1], #16
|
||||
eor v0.16B, v0.16B, v6.16B
|
||||
rev64 v0.4S, v0.4S
|
||||
ext v0.16B, v0.16B, v0.16B, #8
|
||||
st2 {v0.4S, v1.4S}, [x0], #32
|
||||
movi v6.4s, #1<<7, lsl #24
|
||||
1: ld1 {v0.4s}, [x2], x3
|
||||
ld1 {v1.4s}, [x1], #16
|
||||
eor v0.16b, v0.16b, v6.16b
|
||||
rev64 v0.4s, v0.4s
|
||||
ext v0.16b, v0.16b, v0.16b, #8
|
||||
st2 {v0.4s, v1.4s}, [x0], #32
|
||||
subs x4, x4, #4
|
||||
b.gt 1b
|
||||
ret
|
||||
@@ -141,13 +141,13 @@ function ff_sbr_qmf_deint_neg_neon, export=1
|
||||
add x2, x0, #60*4
|
||||
mov x3, #-32
|
||||
mov x4, #32
|
||||
movi v2.4S, #1<<7, lsl #24
|
||||
1: ld2 {v0.4S, v1.4S}, [x1], x3
|
||||
eor v0.16B, v0.16B, v2.16B
|
||||
rev64 v1.4S, v1.4S
|
||||
ext v1.16B, v1.16B, v1.16B, #8
|
||||
st1 {v0.4S}, [x2]
|
||||
st1 {v1.4S}, [x0], #16
|
||||
movi v2.4s, #1<<7, lsl #24
|
||||
1: ld2 {v0.4s, v1.4s}, [x1], x3
|
||||
eor v0.16b, v0.16b, v2.16b
|
||||
rev64 v1.4s, v1.4s
|
||||
ext v1.16b, v1.16b, v1.16b, #8
|
||||
st1 {v0.4s}, [x2]
|
||||
st1 {v1.4s}, [x0], #16
|
||||
sub x2, x2, #16
|
||||
subs x4, x4, #4
|
||||
b.gt 1b
|
||||
@@ -159,16 +159,16 @@ function ff_sbr_qmf_deint_bfly_neon, export=1
|
||||
add x3, x0, #124*4
|
||||
mov x4, #64
|
||||
mov x5, #-16
|
||||
1: ld1 {v0.4S}, [x1], #16
|
||||
ld1 {v1.4S}, [x2], x5
|
||||
rev64 v2.4S, v0.4S
|
||||
ext v2.16B, v2.16B, v2.16B, #8
|
||||
rev64 v3.4S, v1.4S
|
||||
ext v3.16B, v3.16B, v3.16B, #8
|
||||
fadd v1.4S, v1.4S, v2.4S
|
||||
fsub v0.4S, v0.4S, v3.4S
|
||||
st1 {v0.4S}, [x0], #16
|
||||
st1 {v1.4S}, [x3], x5
|
||||
1: ld1 {v0.4s}, [x1], #16
|
||||
ld1 {v1.4s}, [x2], x5
|
||||
rev64 v2.4s, v0.4s
|
||||
ext v2.16b, v2.16b, v2.16b, #8
|
||||
rev64 v3.4s, v1.4s
|
||||
ext v3.16b, v3.16b, v3.16b, #8
|
||||
fadd v1.4s, v1.4s, v2.4s
|
||||
fsub v0.4s, v0.4s, v3.4s
|
||||
st1 {v0.4s}, [x0], #16
|
||||
st1 {v1.4s}, [x3], x5
|
||||
subs x4, x4, #4
|
||||
b.gt 1b
|
||||
ret
|
||||
@@ -178,32 +178,32 @@ function ff_sbr_hf_gen_neon, export=1
|
||||
sxtw x4, w4
|
||||
sxtw x5, w5
|
||||
movrel x6, factors
|
||||
ld1 {v7.4S}, [x6]
|
||||
dup v1.4S, v0.S[0]
|
||||
mov v2.8B, v1.8B
|
||||
mov v2.S[2], v7.S[0]
|
||||
mov v2.S[3], v7.S[0]
|
||||
fmul v1.4S, v1.4S, v2.4S
|
||||
ld1 {v0.D}[0], [x3]
|
||||
ld1 {v0.D}[1], [x2]
|
||||
fmul v0.4S, v0.4S, v1.4S
|
||||
fmul v1.4S, v0.4S, v7.4S
|
||||
rev64 v0.4S, v0.4S
|
||||
ld1 {v7.4s}, [x6]
|
||||
dup v1.4s, v0.s[0]
|
||||
mov v2.8b, v1.8b
|
||||
mov v2.s[2], v7.s[0]
|
||||
mov v2.s[3], v7.s[0]
|
||||
fmul v1.4s, v1.4s, v2.4s
|
||||
ld1 {v0.d}[0], [x3]
|
||||
ld1 {v0.d}[1], [x2]
|
||||
fmul v0.4s, v0.4s, v1.4s
|
||||
fmul v1.4s, v0.4s, v7.4s
|
||||
rev64 v0.4s, v0.4s
|
||||
sub x7, x5, x4
|
||||
add x0, x0, x4, lsl #3
|
||||
add x1, x1, x4, lsl #3
|
||||
sub x1, x1, #16
|
||||
1: ld1 {v2.4S}, [x1], #16
|
||||
ld1 {v3.2S}, [x1]
|
||||
fmul v4.4S, v2.4S, v1.4S
|
||||
fmul v5.4S, v2.4S, v0.4S
|
||||
faddp v4.4S, v4.4S, v4.4S
|
||||
faddp v5.4S, v5.4S, v5.4S
|
||||
faddp v4.4S, v4.4S, v4.4S
|
||||
faddp v5.4S, v5.4S, v5.4S
|
||||
mov v4.S[1], v5.S[0]
|
||||
fadd v4.2S, v4.2S, v3.2S
|
||||
st1 {v4.2S}, [x0], #8
|
||||
1: ld1 {v2.4s}, [x1], #16
|
||||
ld1 {v3.2s}, [x1]
|
||||
fmul v4.4s, v2.4s, v1.4s
|
||||
fmul v5.4s, v2.4s, v0.4s
|
||||
faddp v4.4s, v4.4s, v4.4s
|
||||
faddp v5.4s, v5.4s, v5.4s
|
||||
faddp v4.4s, v4.4s, v4.4s
|
||||
faddp v5.4s, v5.4s, v5.4s
|
||||
mov v4.s[1], v5.s[0]
|
||||
fadd v4.2s, v4.2s, v3.2s
|
||||
st1 {v4.2s}, [x0], #8
|
||||
sub x1, x1, #8
|
||||
subs x7, x7, #1
|
||||
b.gt 1b
|
||||
@@ -215,10 +215,10 @@ function ff_sbr_hf_g_filt_neon, export=1
|
||||
sxtw x4, w4
|
||||
mov x5, #40*2*4
|
||||
add x1, x1, x4, lsl #3
|
||||
1: ld1 {v0.2S}, [x1], x5
|
||||
ld1 {v1.S}[0], [x2], #4
|
||||
fmul v2.4S, v0.4S, v1.S[0]
|
||||
st1 {v2.2S}, [x0], #8
|
||||
1: ld1 {v0.2s}, [x1], x5
|
||||
ld1 {v1.s}[0], [x2], #4
|
||||
fmul v2.4s, v0.4s, v1.s[0]
|
||||
st1 {v2.2s}, [x0], #8
|
||||
subs x3, x3, #1
|
||||
b.gt 1b
|
||||
ret
|
||||
@@ -227,46 +227,46 @@ endfunc
|
||||
function ff_sbr_autocorrelate_neon, export=1
|
||||
mov x2, #38
|
||||
movrel x3, factors
|
||||
ld1 {v0.4S}, [x3]
|
||||
movi v1.4S, #0
|
||||
movi v2.4S, #0
|
||||
movi v3.4S, #0
|
||||
ld1 {v4.2S}, [x0], #8
|
||||
ld1 {v5.2S}, [x0], #8
|
||||
fmul v16.2S, v4.2S, v4.2S
|
||||
fmul v17.2S, v5.2S, v4.S[0]
|
||||
fmul v18.2S, v5.2S, v4.S[1]
|
||||
1: ld1 {v5.D}[1], [x0], #8
|
||||
fmla v1.2S, v4.2S, v4.2S
|
||||
fmla v2.4S, v5.4S, v4.S[0]
|
||||
fmla v3.4S, v5.4S, v4.S[1]
|
||||
mov v4.D[0], v5.D[0]
|
||||
mov v5.D[0], v5.D[1]
|
||||
ld1 {v0.4s}, [x3]
|
||||
movi v1.4s, #0
|
||||
movi v2.4s, #0
|
||||
movi v3.4s, #0
|
||||
ld1 {v4.2s}, [x0], #8
|
||||
ld1 {v5.2s}, [x0], #8
|
||||
fmul v16.2s, v4.2s, v4.2s
|
||||
fmul v17.2s, v5.2s, v4.s[0]
|
||||
fmul v18.2s, v5.2s, v4.s[1]
|
||||
1: ld1 {v5.d}[1], [x0], #8
|
||||
fmla v1.2s, v4.2s, v4.2s
|
||||
fmla v2.4s, v5.4s, v4.s[0]
|
||||
fmla v3.4s, v5.4s, v4.s[1]
|
||||
mov v4.d[0], v5.d[0]
|
||||
mov v5.d[0], v5.d[1]
|
||||
subs x2, x2, #1
|
||||
b.gt 1b
|
||||
fmul v19.2S, v4.2S, v4.2S
|
||||
fmul v20.2S, v5.2S, v4.S[0]
|
||||
fmul v21.2S, v5.2S, v4.S[1]
|
||||
fadd v22.4S, v2.4S, v20.4S
|
||||
fsub v22.4S, v22.4S, v17.4S
|
||||
fadd v23.4S, v3.4S, v21.4S
|
||||
fsub v23.4S, v23.4S, v18.4S
|
||||
rev64 v23.4S, v23.4S
|
||||
fmul v23.4S, v23.4S, v0.4S
|
||||
fadd v22.4S, v22.4S, v23.4S
|
||||
st1 {v22.4S}, [x1], #16
|
||||
fadd v23.2S, v1.2S, v19.2S
|
||||
fsub v23.2S, v23.2S, v16.2S
|
||||
faddp v23.2S, v23.2S, v23.2S
|
||||
st1 {v23.S}[0], [x1]
|
||||
fmul v19.2s, v4.2s, v4.2s
|
||||
fmul v20.2s, v5.2s, v4.s[0]
|
||||
fmul v21.2s, v5.2s, v4.s[1]
|
||||
fadd v22.4s, v2.4s, v20.4s
|
||||
fsub v22.4s, v22.4s, v17.4s
|
||||
fadd v23.4s, v3.4s, v21.4s
|
||||
fsub v23.4s, v23.4s, v18.4s
|
||||
rev64 v23.4s, v23.4s
|
||||
fmul v23.4s, v23.4s, v0.4s
|
||||
fadd v22.4s, v22.4s, v23.4s
|
||||
st1 {v22.4s}, [x1], #16
|
||||
fadd v23.2s, v1.2s, v19.2s
|
||||
fsub v23.2s, v23.2s, v16.2s
|
||||
faddp v23.2s, v23.2s, v23.2s
|
||||
st1 {v23.s}[0], [x1]
|
||||
add x1, x1, #8
|
||||
rev64 v3.2S, v3.2S
|
||||
fmul v3.2S, v3.2S, v0.2S
|
||||
fadd v2.2S, v2.2S, v3.2S
|
||||
st1 {v2.2S}, [x1]
|
||||
rev64 v3.2s, v3.2s
|
||||
fmul v3.2s, v3.2s, v0.2s
|
||||
fadd v2.2s, v2.2s, v3.2s
|
||||
st1 {v2.2s}, [x1]
|
||||
add x1, x1, #16
|
||||
faddp v1.2S, v1.2S, v1.2S
|
||||
st1 {v1.S}[0], [x1]
|
||||
faddp v1.2s, v1.2s, v1.2s
|
||||
st1 {v1.s}[0], [x1]
|
||||
ret
|
||||
endfunc
|
||||
|
||||
@@ -278,25 +278,25 @@ endfunc
|
||||
1: and x3, x3, #0x1ff
|
||||
add x8, x7, x3, lsl #3
|
||||
add x3, x3, #2
|
||||
ld1 {v2.4S}, [x0]
|
||||
ld1 {v3.2S}, [x1], #8
|
||||
ld1 {v4.2S}, [x2], #8
|
||||
ld1 {v5.4S}, [x8]
|
||||
mov v6.16B, v2.16B
|
||||
zip1 v3.4S, v3.4S, v3.4S
|
||||
zip1 v4.4S, v4.4S, v4.4S
|
||||
fmla v6.4S, v1.4S, v3.4S
|
||||
fmla v2.4S, v5.4S, v4.4S
|
||||
fcmeq v7.4S, v3.4S, #0
|
||||
bif v2.16B, v6.16B, v7.16B
|
||||
st1 {v2.4S}, [x0], #16
|
||||
ld1 {v2.4s}, [x0]
|
||||
ld1 {v3.2s}, [x1], #8
|
||||
ld1 {v4.2s}, [x2], #8
|
||||
ld1 {v5.4s}, [x8]
|
||||
mov v6.16b, v2.16b
|
||||
zip1 v3.4s, v3.4s, v3.4s
|
||||
zip1 v4.4s, v4.4s, v4.4s
|
||||
fmla v6.4s, v1.4s, v3.4s
|
||||
fmla v2.4s, v5.4s, v4.4s
|
||||
fcmeq v7.4s, v3.4s, #0
|
||||
bif v2.16b, v6.16b, v7.16b
|
||||
st1 {v2.4s}, [x0], #16
|
||||
subs x5, x5, #2
|
||||
b.gt 1b
|
||||
.endm
|
||||
|
||||
function ff_sbr_hf_apply_noise_0_neon, export=1
|
||||
movrel x9, phi_noise_0
|
||||
ld1 {v1.4S}, [x9]
|
||||
ld1 {v1.4s}, [x9]
|
||||
apply_noise_common
|
||||
ret
|
||||
endfunc
|
||||
@@ -305,14 +305,14 @@ function ff_sbr_hf_apply_noise_1_neon, export=1
|
||||
movrel x9, phi_noise_1
|
||||
and x4, x4, #1
|
||||
add x9, x9, x4, lsl #4
|
||||
ld1 {v1.4S}, [x9]
|
||||
ld1 {v1.4s}, [x9]
|
||||
apply_noise_common
|
||||
ret
|
||||
endfunc
|
||||
|
||||
function ff_sbr_hf_apply_noise_2_neon, export=1
|
||||
movrel x9, phi_noise_2
|
||||
ld1 {v1.4S}, [x9]
|
||||
ld1 {v1.4s}, [x9]
|
||||
apply_noise_common
|
||||
ret
|
||||
endfunc
|
||||
@@ -321,7 +321,7 @@ function ff_sbr_hf_apply_noise_3_neon, export=1
|
||||
movrel x9, phi_noise_3
|
||||
and x4, x4, #1
|
||||
add x9, x9, x4, lsl #4
|
||||
ld1 {v1.4S}, [x9]
|
||||
ld1 {v1.4s}, [x9]
|
||||
apply_noise_common
|
||||
ret
|
||||
endfunc
|
||||
|
||||
@@ -54,7 +54,7 @@ endconst
|
||||
prfm pldl1keep, [\data]
|
||||
mov x10, x30
|
||||
movrel x3, idct_coeff_neon
|
||||
ld1 {v0.2D}, [x3]
|
||||
ld1 {v0.2d}, [x3]
|
||||
.endm
|
||||
|
||||
.macro idct_end
|
||||
@@ -74,146 +74,146 @@ endconst
|
||||
.endm
|
||||
|
||||
.macro idct_col4_top y1, y2, y3, y4, i, l
|
||||
smull\i v7.4S, \y3\l, z2
|
||||
smull\i v16.4S, \y3\l, z6
|
||||
smull\i v17.4S, \y2\l, z1
|
||||
add v19.4S, v23.4S, v7.4S
|
||||
smull\i v18.4S, \y2\l, z3
|
||||
add v20.4S, v23.4S, v16.4S
|
||||
smull\i v5.4S, \y2\l, z5
|
||||
sub v21.4S, v23.4S, v16.4S
|
||||
smull\i v6.4S, \y2\l, z7
|
||||
sub v22.4S, v23.4S, v7.4S
|
||||
smull\i v7.4s, \y3\l, z2
|
||||
smull\i v16.4s, \y3\l, z6
|
||||
smull\i v17.4s, \y2\l, z1
|
||||
add v19.4s, v23.4s, v7.4s
|
||||
smull\i v18.4s, \y2\l, z3
|
||||
add v20.4s, v23.4s, v16.4s
|
||||
smull\i v5.4s, \y2\l, z5
|
||||
sub v21.4s, v23.4s, v16.4s
|
||||
smull\i v6.4s, \y2\l, z7
|
||||
sub v22.4s, v23.4s, v7.4s
|
||||
|
||||
smlal\i v17.4S, \y4\l, z3
|
||||
smlsl\i v18.4S, \y4\l, z7
|
||||
smlsl\i v5.4S, \y4\l, z1
|
||||
smlsl\i v6.4S, \y4\l, z5
|
||||
smlal\i v17.4s, \y4\l, z3
|
||||
smlsl\i v18.4s, \y4\l, z7
|
||||
smlsl\i v5.4s, \y4\l, z1
|
||||
smlsl\i v6.4s, \y4\l, z5
|
||||
.endm
|
||||
|
||||
.macro idct_row4_neon y1, y2, y3, y4, pass
|
||||
ld1 {\y1\().2D,\y2\().2D}, [x2], #32
|
||||
movi v23.4S, #1<<2, lsl #8
|
||||
orr v5.16B, \y1\().16B, \y2\().16B
|
||||
ld1 {\y3\().2D,\y4\().2D}, [x2], #32
|
||||
orr v6.16B, \y3\().16B, \y4\().16B
|
||||
orr v5.16B, v5.16B, v6.16B
|
||||
mov x3, v5.D[1]
|
||||
smlal v23.4S, \y1\().4H, z4
|
||||
ld1 {\y1\().2d,\y2\().2d}, [x2], #32
|
||||
movi v23.4s, #1<<2, lsl #8
|
||||
orr v5.16b, \y1\().16b, \y2\().16b
|
||||
ld1 {\y3\().2d,\y4\().2d}, [x2], #32
|
||||
orr v6.16b, \y3\().16b, \y4\().16b
|
||||
orr v5.16b, v5.16b, v6.16b
|
||||
mov x3, v5.d[1]
|
||||
smlal v23.4s, \y1\().4h, z4
|
||||
|
||||
idct_col4_top \y1, \y2, \y3, \y4, 1, .4H
|
||||
idct_col4_top \y1, \y2, \y3, \y4, 1, .4h
|
||||
|
||||
cmp x3, #0
|
||||
b.eq \pass\()f
|
||||
|
||||
smull2 v7.4S, \y1\().8H, z4
|
||||
smlal2 v17.4S, \y2\().8H, z5
|
||||
smlsl2 v18.4S, \y2\().8H, z1
|
||||
smull2 v16.4S, \y3\().8H, z2
|
||||
smlal2 v5.4S, \y2\().8H, z7
|
||||
add v19.4S, v19.4S, v7.4S
|
||||
sub v20.4S, v20.4S, v7.4S
|
||||
sub v21.4S, v21.4S, v7.4S
|
||||
add v22.4S, v22.4S, v7.4S
|
||||
smlal2 v6.4S, \y2\().8H, z3
|
||||
smull2 v7.4S, \y3\().8H, z6
|
||||
smlal2 v17.4S, \y4\().8H, z7
|
||||
smlsl2 v18.4S, \y4\().8H, z5
|
||||
smlal2 v5.4S, \y4\().8H, z3
|
||||
smlsl2 v6.4S, \y4\().8H, z1
|
||||
add v19.4S, v19.4S, v7.4S
|
||||
sub v20.4S, v20.4S, v16.4S
|
||||
add v21.4S, v21.4S, v16.4S
|
||||
sub v22.4S, v22.4S, v7.4S
|
||||
smull2 v7.4s, \y1\().8h, z4
|
||||
smlal2 v17.4s, \y2\().8h, z5
|
||||
smlsl2 v18.4s, \y2\().8h, z1
|
||||
smull2 v16.4s, \y3\().8h, z2
|
||||
smlal2 v5.4s, \y2\().8h, z7
|
||||
add v19.4s, v19.4s, v7.4s
|
||||
sub v20.4s, v20.4s, v7.4s
|
||||
sub v21.4s, v21.4s, v7.4s
|
||||
add v22.4s, v22.4s, v7.4s
|
||||
smlal2 v6.4s, \y2\().8h, z3
|
||||
smull2 v7.4s, \y3\().8h, z6
|
||||
smlal2 v17.4s, \y4\().8h, z7
|
||||
smlsl2 v18.4s, \y4\().8h, z5
|
||||
smlal2 v5.4s, \y4\().8h, z3
|
||||
smlsl2 v6.4s, \y4\().8h, z1
|
||||
add v19.4s, v19.4s, v7.4s
|
||||
sub v20.4s, v20.4s, v16.4s
|
||||
add v21.4s, v21.4s, v16.4s
|
||||
sub v22.4s, v22.4s, v7.4s
|
||||
|
||||
\pass: add \y3\().4S, v19.4S, v17.4S
|
||||
add \y4\().4S, v20.4S, v18.4S
|
||||
shrn \y1\().4H, \y3\().4S, #ROW_SHIFT
|
||||
shrn \y2\().4H, \y4\().4S, #ROW_SHIFT
|
||||
add v7.4S, v21.4S, v5.4S
|
||||
add v16.4S, v22.4S, v6.4S
|
||||
shrn \y3\().4H, v7.4S, #ROW_SHIFT
|
||||
shrn \y4\().4H, v16.4S, #ROW_SHIFT
|
||||
sub v22.4S, v22.4S, v6.4S
|
||||
sub v19.4S, v19.4S, v17.4S
|
||||
sub v21.4S, v21.4S, v5.4S
|
||||
shrn2 \y1\().8H, v22.4S, #ROW_SHIFT
|
||||
sub v20.4S, v20.4S, v18.4S
|
||||
shrn2 \y2\().8H, v21.4S, #ROW_SHIFT
|
||||
shrn2 \y3\().8H, v20.4S, #ROW_SHIFT
|
||||
shrn2 \y4\().8H, v19.4S, #ROW_SHIFT
|
||||
add \y4\().4s, v20.4s, v18.4s
|
||||
shrn \y1\().4h, \y3\().4s, #ROW_SHIFT
|
||||
shrn \y2\().4h, \y4\().4s, #ROW_SHIFT
|
||||
add v7.4s, v21.4s, v5.4s
|
||||
add v16.4s, v22.4s, v6.4s
|
||||
shrn \y3\().4h, v7.4s, #ROW_SHIFT
|
||||
shrn \y4\().4h, v16.4s, #ROW_SHIFT
|
||||
sub v22.4s, v22.4s, v6.4s
|
||||
sub v19.4s, v19.4s, v17.4s
|
||||
sub v21.4s, v21.4s, v5.4s
|
||||
shrn2 \y1\().8h, v22.4s, #ROW_SHIFT
|
||||
sub v20.4s, v20.4s, v18.4s
|
||||
shrn2 \y2\().8h, v21.4s, #ROW_SHIFT
|
||||
shrn2 \y3\().8h, v20.4s, #ROW_SHIFT
|
||||
shrn2 \y4\().8h, v19.4s, #ROW_SHIFT
|
||||
|
||||
trn1 v16.8H, \y1\().8H, \y2\().8H
|
||||
trn2 v17.8H, \y1\().8H, \y2\().8H
|
||||
trn1 v18.8H, \y3\().8H, \y4\().8H
|
||||
trn2 v19.8H, \y3\().8H, \y4\().8H
|
||||
trn1 \y1\().4S, v16.4S, v18.4S
|
||||
trn1 \y2\().4S, v17.4S, v19.4S
|
||||
trn2 \y3\().4S, v16.4S, v18.4S
|
||||
trn2 \y4\().4S, v17.4S, v19.4S
|
||||
trn1 v16.8h, \y1\().8h, \y2\().8h
|
||||
trn2 v17.8h, \y1\().8h, \y2\().8h
|
||||
trn1 v18.8h, \y3\().8h, \y4\().8h
|
||||
trn2 v19.8h, \y3\().8h, \y4\().8h
|
||||
trn1 \y1\().4s, v16.4s, v18.4s
|
||||
trn1 \y2\().4s, v17.4s, v19.4s
|
||||
trn2 \y3\().4s, v16.4s, v18.4s
|
||||
trn2 \y4\().4s, v17.4s, v19.4s
|
||||
.endm
|
||||
|
||||
.macro declare_idct_col4_neon i, l
|
||||
function idct_col4_neon\i
|
||||
dup v23.4H, z4c
|
||||
dup v23.4h, z4c
|
||||
.if \i == 1
|
||||
add v23.4H, v23.4H, v24.4H
|
||||
add v23.4h, v23.4h, v24.4h
|
||||
.else
|
||||
mov v5.D[0], v24.D[1]
|
||||
add v23.4H, v23.4H, v5.4H
|
||||
mov v5.d[0], v24.d[1]
|
||||
add v23.4h, v23.4h, v5.4h
|
||||
.endif
|
||||
smull v23.4S, v23.4H, z4
|
||||
smull v23.4s, v23.4h, z4
|
||||
|
||||
idct_col4_top v24, v25, v26, v27, \i, \l
|
||||
|
||||
mov x4, v28.D[\i - 1]
|
||||
mov x5, v29.D[\i - 1]
|
||||
mov x4, v28.d[\i - 1]
|
||||
mov x5, v29.d[\i - 1]
|
||||
cmp x4, #0
|
||||
b.eq 1f
|
||||
|
||||
smull\i v7.4S, v28\l, z4
|
||||
add v19.4S, v19.4S, v7.4S
|
||||
sub v20.4S, v20.4S, v7.4S
|
||||
sub v21.4S, v21.4S, v7.4S
|
||||
add v22.4S, v22.4S, v7.4S
|
||||
smull\i v7.4s, v28\l, z4
|
||||
add v19.4s, v19.4s, v7.4s
|
||||
sub v20.4s, v20.4s, v7.4s
|
||||
sub v21.4s, v21.4s, v7.4s
|
||||
add v22.4s, v22.4s, v7.4s
|
||||
|
||||
1: mov x4, v30.D[\i - 1]
|
||||
1: mov x4, v30.d[\i - 1]
|
||||
cmp x5, #0
|
||||
b.eq 2f
|
||||
|
||||
smlal\i v17.4S, v29\l, z5
|
||||
smlsl\i v18.4S, v29\l, z1
|
||||
smlal\i v5.4S, v29\l, z7
|
||||
smlal\i v6.4S, v29\l, z3
|
||||
smlal\i v17.4s, v29\l, z5
|
||||
smlsl\i v18.4s, v29\l, z1
|
||||
smlal\i v5.4s, v29\l, z7
|
||||
smlal\i v6.4s, v29\l, z3
|
||||
|
||||
2: mov x5, v31.D[\i - 1]
|
||||
2: mov x5, v31.d[\i - 1]
|
||||
cmp x4, #0
|
||||
b.eq 3f
|
||||
|
||||
smull\i v7.4S, v30\l, z6
|
||||
smull\i v16.4S, v30\l, z2
|
||||
add v19.4S, v19.4S, v7.4S
|
||||
sub v22.4S, v22.4S, v7.4S
|
||||
sub v20.4S, v20.4S, v16.4S
|
||||
add v21.4S, v21.4S, v16.4S
|
||||
smull\i v7.4s, v30\l, z6
|
||||
smull\i v16.4s, v30\l, z2
|
||||
add v19.4s, v19.4s, v7.4s
|
||||
sub v22.4s, v22.4s, v7.4s
|
||||
sub v20.4s, v20.4s, v16.4s
|
||||
add v21.4s, v21.4s, v16.4s
|
||||
|
||||
3: cmp x5, #0
|
||||
b.eq 4f
|
||||
|
||||
smlal\i v17.4S, v31\l, z7
|
||||
smlsl\i v18.4S, v31\l, z5
|
||||
smlal\i v5.4S, v31\l, z3
|
||||
smlsl\i v6.4S, v31\l, z1
|
||||
smlal\i v17.4s, v31\l, z7
|
||||
smlsl\i v18.4s, v31\l, z5
|
||||
smlal\i v5.4s, v31\l, z3
|
||||
smlsl\i v6.4s, v31\l, z1
|
||||
|
||||
4: addhn v7.4H, v19.4S, v17.4S
|
||||
addhn2 v7.8H, v20.4S, v18.4S
|
||||
subhn v18.4H, v20.4S, v18.4S
|
||||
subhn2 v18.8H, v19.4S, v17.4S
|
||||
4: addhn v7.4h, v19.4s, v17.4s
|
||||
addhn2 v7.8h, v20.4s, v18.4s
|
||||
subhn v18.4h, v20.4s, v18.4s
|
||||
subhn2 v18.8h, v19.4s, v17.4s
|
||||
|
||||
addhn v16.4H, v21.4S, v5.4S
|
||||
addhn2 v16.8H, v22.4S, v6.4S
|
||||
subhn v17.4H, v22.4S, v6.4S
|
||||
subhn2 v17.8H, v21.4S, v5.4S
|
||||
addhn v16.4h, v21.4s, v5.4s
|
||||
addhn2 v16.8h, v22.4s, v6.4s
|
||||
subhn v17.4h, v22.4s, v6.4s
|
||||
subhn2 v17.8h, v21.4s, v5.4s
|
||||
|
||||
ret
|
||||
endfunc
|
||||
@@ -229,33 +229,33 @@ function ff_simple_idct_put_neon, export=1
|
||||
idct_row4_neon v28, v29, v30, v31, 2
|
||||
bl idct_col4_neon1
|
||||
|
||||
sqshrun v1.8B, v7.8H, #COL_SHIFT-16
|
||||
sqshrun2 v1.16B, v16.8H, #COL_SHIFT-16
|
||||
sqshrun v3.8B, v17.8H, #COL_SHIFT-16
|
||||
sqshrun2 v3.16B, v18.8H, #COL_SHIFT-16
|
||||
sqshrun v1.8b, v7.8h, #COL_SHIFT-16
|
||||
sqshrun2 v1.16b, v16.8h, #COL_SHIFT-16
|
||||
sqshrun v3.8b, v17.8h, #COL_SHIFT-16
|
||||
sqshrun2 v3.16b, v18.8h, #COL_SHIFT-16
|
||||
|
||||
bl idct_col4_neon2
|
||||
|
||||
sqshrun v2.8B, v7.8H, #COL_SHIFT-16
|
||||
sqshrun2 v2.16B, v16.8H, #COL_SHIFT-16
|
||||
sqshrun v4.8B, v17.8H, #COL_SHIFT-16
|
||||
sqshrun2 v4.16B, v18.8H, #COL_SHIFT-16
|
||||
sqshrun v2.8b, v7.8h, #COL_SHIFT-16
|
||||
sqshrun2 v2.16b, v16.8h, #COL_SHIFT-16
|
||||
sqshrun v4.8b, v17.8h, #COL_SHIFT-16
|
||||
sqshrun2 v4.16b, v18.8h, #COL_SHIFT-16
|
||||
|
||||
zip1 v16.4S, v1.4S, v2.4S
|
||||
zip2 v17.4S, v1.4S, v2.4S
|
||||
zip1 v16.4s, v1.4s, v2.4s
|
||||
zip2 v17.4s, v1.4s, v2.4s
|
||||
|
||||
st1 {v16.D}[0], [x0], x1
|
||||
st1 {v16.D}[1], [x0], x1
|
||||
st1 {v16.d}[0], [x0], x1
|
||||
st1 {v16.d}[1], [x0], x1
|
||||
|
||||
zip1 v18.4S, v3.4S, v4.4S
|
||||
zip2 v19.4S, v3.4S, v4.4S
|
||||
zip1 v18.4s, v3.4s, v4.4s
|
||||
zip2 v19.4s, v3.4s, v4.4s
|
||||
|
||||
st1 {v17.D}[0], [x0], x1
|
||||
st1 {v17.D}[1], [x0], x1
|
||||
st1 {v18.D}[0], [x0], x1
|
||||
st1 {v18.D}[1], [x0], x1
|
||||
st1 {v19.D}[0], [x0], x1
|
||||
st1 {v19.D}[1], [x0], x1
|
||||
st1 {v17.d}[0], [x0], x1
|
||||
st1 {v17.d}[1], [x0], x1
|
||||
st1 {v18.d}[0], [x0], x1
|
||||
st1 {v18.d}[1], [x0], x1
|
||||
st1 {v19.d}[0], [x0], x1
|
||||
st1 {v19.d}[1], [x0], x1
|
||||
|
||||
idct_end
|
||||
endfunc
|
||||
@@ -267,59 +267,59 @@ function ff_simple_idct_add_neon, export=1
|
||||
idct_row4_neon v28, v29, v30, v31, 2
|
||||
bl idct_col4_neon1
|
||||
|
||||
sshr v1.8H, v7.8H, #COL_SHIFT-16
|
||||
sshr v2.8H, v16.8H, #COL_SHIFT-16
|
||||
sshr v3.8H, v17.8H, #COL_SHIFT-16
|
||||
sshr v4.8H, v18.8H, #COL_SHIFT-16
|
||||
sshr v1.8h, v7.8h, #COL_SHIFT-16
|
||||
sshr v2.8h, v16.8h, #COL_SHIFT-16
|
||||
sshr v3.8h, v17.8h, #COL_SHIFT-16
|
||||
sshr v4.8h, v18.8h, #COL_SHIFT-16
|
||||
|
||||
bl idct_col4_neon2
|
||||
|
||||
sshr v7.8H, v7.8H, #COL_SHIFT-16
|
||||
sshr v16.8H, v16.8H, #COL_SHIFT-16
|
||||
sshr v17.8H, v17.8H, #COL_SHIFT-16
|
||||
sshr v18.8H, v18.8H, #COL_SHIFT-16
|
||||
sshr v7.8h, v7.8h, #COL_SHIFT-16
|
||||
sshr v16.8h, v16.8h, #COL_SHIFT-16
|
||||
sshr v17.8h, v17.8h, #COL_SHIFT-16
|
||||
sshr v18.8h, v18.8h, #COL_SHIFT-16
|
||||
|
||||
mov x9, x0
|
||||
ld1 {v19.D}[0], [x0], x1
|
||||
zip1 v23.2D, v1.2D, v7.2D
|
||||
zip2 v24.2D, v1.2D, v7.2D
|
||||
ld1 {v19.D}[1], [x0], x1
|
||||
zip1 v25.2D, v2.2D, v16.2D
|
||||
zip2 v26.2D, v2.2D, v16.2D
|
||||
ld1 {v20.D}[0], [x0], x1
|
||||
zip1 v27.2D, v3.2D, v17.2D
|
||||
zip2 v28.2D, v3.2D, v17.2D
|
||||
ld1 {v20.D}[1], [x0], x1
|
||||
zip1 v29.2D, v4.2D, v18.2D
|
||||
zip2 v30.2D, v4.2D, v18.2D
|
||||
ld1 {v21.D}[0], [x0], x1
|
||||
uaddw v23.8H, v23.8H, v19.8B
|
||||
uaddw2 v24.8H, v24.8H, v19.16B
|
||||
ld1 {v21.D}[1], [x0], x1
|
||||
sqxtun v23.8B, v23.8H
|
||||
sqxtun2 v23.16B, v24.8H
|
||||
ld1 {v22.D}[0], [x0], x1
|
||||
uaddw v24.8H, v25.8H, v20.8B
|
||||
uaddw2 v25.8H, v26.8H, v20.16B
|
||||
ld1 {v22.D}[1], [x0], x1
|
||||
sqxtun v24.8B, v24.8H
|
||||
sqxtun2 v24.16B, v25.8H
|
||||
st1 {v23.D}[0], [x9], x1
|
||||
uaddw v25.8H, v27.8H, v21.8B
|
||||
uaddw2 v26.8H, v28.8H, v21.16B
|
||||
st1 {v23.D}[1], [x9], x1
|
||||
sqxtun v25.8B, v25.8H
|
||||
sqxtun2 v25.16B, v26.8H
|
||||
st1 {v24.D}[0], [x9], x1
|
||||
uaddw v26.8H, v29.8H, v22.8B
|
||||
uaddw2 v27.8H, v30.8H, v22.16B
|
||||
st1 {v24.D}[1], [x9], x1
|
||||
sqxtun v26.8B, v26.8H
|
||||
sqxtun2 v26.16B, v27.8H
|
||||
st1 {v25.D}[0], [x9], x1
|
||||
st1 {v25.D}[1], [x9], x1
|
||||
st1 {v26.D}[0], [x9], x1
|
||||
st1 {v26.D}[1], [x9], x1
|
||||
ld1 {v19.d}[0], [x0], x1
|
||||
zip1 v23.2d, v1.2d, v7.2d
|
||||
zip2 v24.2d, v1.2d, v7.2d
|
||||
ld1 {v19.d}[1], [x0], x1
|
||||
zip1 v25.2d, v2.2d, v16.2d
|
||||
zip2 v26.2d, v2.2d, v16.2d
|
||||
ld1 {v20.d}[0], [x0], x1
|
||||
zip1 v27.2d, v3.2d, v17.2d
|
||||
zip2 v28.2d, v3.2d, v17.2d
|
||||
ld1 {v20.d}[1], [x0], x1
|
||||
zip1 v29.2d, v4.2d, v18.2d
|
||||
zip2 v30.2d, v4.2d, v18.2d
|
||||
ld1 {v21.d}[0], [x0], x1
|
||||
uaddw v23.8h, v23.8h, v19.8b
|
||||
uaddw2 v24.8h, v24.8h, v19.16b
|
||||
ld1 {v21.d}[1], [x0], x1
|
||||
sqxtun v23.8b, v23.8h
|
||||
sqxtun2 v23.16b, v24.8h
|
||||
ld1 {v22.d}[0], [x0], x1
|
||||
uaddw v24.8h, v25.8h, v20.8b
|
||||
uaddw2 v25.8h, v26.8h, v20.16b
|
||||
ld1 {v22.d}[1], [x0], x1
|
||||
sqxtun v24.8b, v24.8h
|
||||
sqxtun2 v24.16b, v25.8h
|
||||
st1 {v23.d}[0], [x9], x1
|
||||
uaddw v25.8h, v27.8h, v21.8b
|
||||
uaddw2 v26.8h, v28.8h, v21.16b
|
||||
st1 {v23.d}[1], [x9], x1
|
||||
sqxtun v25.8b, v25.8h
|
||||
sqxtun2 v25.16b, v26.8h
|
||||
st1 {v24.d}[0], [x9], x1
|
||||
uaddw v26.8h, v29.8h, v22.8b
|
||||
uaddw2 v27.8h, v30.8h, v22.16b
|
||||
st1 {v24.d}[1], [x9], x1
|
||||
sqxtun v26.8b, v26.8h
|
||||
sqxtun2 v26.16b, v27.8h
|
||||
st1 {v25.d}[0], [x9], x1
|
||||
st1 {v25.d}[1], [x9], x1
|
||||
st1 {v26.d}[0], [x9], x1
|
||||
st1 {v26.d}[1], [x9], x1
|
||||
|
||||
idct_end
|
||||
endfunc
|
||||
@@ -333,30 +333,30 @@ function ff_simple_idct_neon, export=1
|
||||
sub x2, x2, #128
|
||||
bl idct_col4_neon1
|
||||
|
||||
sshr v1.8H, v7.8H, #COL_SHIFT-16
|
||||
sshr v2.8H, v16.8H, #COL_SHIFT-16
|
||||
sshr v3.8H, v17.8H, #COL_SHIFT-16
|
||||
sshr v4.8H, v18.8H, #COL_SHIFT-16
|
||||
sshr v1.8h, v7.8h, #COL_SHIFT-16
|
||||
sshr v2.8h, v16.8h, #COL_SHIFT-16
|
||||
sshr v3.8h, v17.8h, #COL_SHIFT-16
|
||||
sshr v4.8h, v18.8h, #COL_SHIFT-16
|
||||
|
||||
bl idct_col4_neon2
|
||||
|
||||
sshr v7.8H, v7.8H, #COL_SHIFT-16
|
||||
sshr v16.8H, v16.8H, #COL_SHIFT-16
|
||||
sshr v17.8H, v17.8H, #COL_SHIFT-16
|
||||
sshr v18.8H, v18.8H, #COL_SHIFT-16
|
||||
sshr v7.8h, v7.8h, #COL_SHIFT-16
|
||||
sshr v16.8h, v16.8h, #COL_SHIFT-16
|
||||
sshr v17.8h, v17.8h, #COL_SHIFT-16
|
||||
sshr v18.8h, v18.8h, #COL_SHIFT-16
|
||||
|
||||
zip1 v23.2D, v1.2D, v7.2D
|
||||
zip2 v24.2D, v1.2D, v7.2D
|
||||
st1 {v23.2D,v24.2D}, [x2], #32
|
||||
zip1 v25.2D, v2.2D, v16.2D
|
||||
zip2 v26.2D, v2.2D, v16.2D
|
||||
st1 {v25.2D,v26.2D}, [x2], #32
|
||||
zip1 v27.2D, v3.2D, v17.2D
|
||||
zip2 v28.2D, v3.2D, v17.2D
|
||||
st1 {v27.2D,v28.2D}, [x2], #32
|
||||
zip1 v29.2D, v4.2D, v18.2D
|
||||
zip2 v30.2D, v4.2D, v18.2D
|
||||
st1 {v29.2D,v30.2D}, [x2], #32
|
||||
zip1 v23.2d, v1.2d, v7.2d
|
||||
zip2 v24.2d, v1.2d, v7.2d
|
||||
st1 {v23.2d,v24.2d}, [x2], #32
|
||||
zip1 v25.2d, v2.2d, v16.2d
|
||||
zip2 v26.2d, v2.2d, v16.2d
|
||||
st1 {v25.2d,v26.2d}, [x2], #32
|
||||
zip1 v27.2d, v3.2d, v17.2d
|
||||
zip2 v28.2d, v3.2d, v17.2d
|
||||
st1 {v27.2d,v28.2d}, [x2], #32
|
||||
zip1 v29.2d, v4.2d, v18.2d
|
||||
zip2 v30.2d, v4.2d, v18.2d
|
||||
st1 {v29.2d,v30.2d}, [x2], #32
|
||||
|
||||
idct_end
|
||||
endfunc
|
||||
|
||||
+151
-151
@@ -330,32 +330,32 @@ endfunc
|
||||
// v17: hev
|
||||
|
||||
// convert to signed value:
|
||||
eor v3.16b, v3.16b, v21.16b // PS0 = P0 ^ 0x80
|
||||
eor v4.16b, v4.16b, v21.16b // QS0 = Q0 ^ 0x80
|
||||
eor v3.16b, v3.16b, v21.16b // PS0 = P0 ^ 0x80
|
||||
eor v4.16b, v4.16b, v21.16b // QS0 = Q0 ^ 0x80
|
||||
|
||||
movi v20.8h, #3
|
||||
ssubl v18.8h, v4.8b, v3.8b // QS0 - PS0
|
||||
ssubl2 v19.8h, v4.16b, v3.16b // (widened to 16bit)
|
||||
eor v2.16b, v2.16b, v21.16b // PS1 = P1 ^ 0x80
|
||||
eor v5.16b, v5.16b, v21.16b // QS1 = Q1 ^ 0x80
|
||||
mul v18.8h, v18.8h, v20.8h // w = 3 * (QS0 - PS0)
|
||||
mul v19.8h, v19.8h, v20.8h
|
||||
movi v20.8h, #3
|
||||
ssubl v18.8h, v4.8b, v3.8b // QS0 - PS0
|
||||
ssubl2 v19.8h, v4.16b, v3.16b // (widened to 16bit)
|
||||
eor v2.16b, v2.16b, v21.16b // PS1 = P1 ^ 0x80
|
||||
eor v5.16b, v5.16b, v21.16b // QS1 = Q1 ^ 0x80
|
||||
mul v18.8h, v18.8h, v20.8h // w = 3 * (QS0 - PS0)
|
||||
mul v19.8h, v19.8h, v20.8h
|
||||
|
||||
sqsub v20.16b, v2.16b, v5.16b // clamp(PS1-QS1)
|
||||
movi v22.16b, #4
|
||||
movi v23.16b, #3
|
||||
sqsub v20.16b, v2.16b, v5.16b // clamp(PS1-QS1)
|
||||
movi v22.16b, #4
|
||||
movi v23.16b, #3
|
||||
.if \inner
|
||||
and v20.16b, v20.16b, v17.16b // if(hev) w += clamp(PS1-QS1)
|
||||
and v20.16b, v20.16b, v17.16b // if(hev) w += clamp(PS1-QS1)
|
||||
.endif
|
||||
saddw v18.8h, v18.8h, v20.8b // w += clamp(PS1-QS1)
|
||||
saddw2 v19.8h, v19.8h, v20.16b
|
||||
sqxtn v18.8b, v18.8h // narrow result back into v18
|
||||
sqxtn2 v18.16b, v19.8h
|
||||
saddw v18.8h, v18.8h, v20.8b // w += clamp(PS1-QS1)
|
||||
saddw2 v19.8h, v19.8h, v20.16b
|
||||
sqxtn v18.8b, v18.8h // narrow result back into v18
|
||||
sqxtn2 v18.16b, v19.8h
|
||||
.if !\inner && !\simple
|
||||
eor v1.16b, v1.16b, v21.16b // PS2 = P2 ^ 0x80
|
||||
eor v6.16b, v6.16b, v21.16b // QS2 = Q2 ^ 0x80
|
||||
eor v1.16b, v1.16b, v21.16b // PS2 = P2 ^ 0x80
|
||||
eor v6.16b, v6.16b, v21.16b // QS2 = Q2 ^ 0x80
|
||||
.endif
|
||||
and v18.16b, v18.16b, v16.16b // w &= normal_limit
|
||||
and v18.16b, v18.16b, v16.16b // w &= normal_limit
|
||||
|
||||
// registers used at this point..
|
||||
// v0 -> P3 (don't corrupt)
|
||||
@@ -375,44 +375,44 @@ endfunc
|
||||
// P0 = s2u(PS0 + c2);
|
||||
|
||||
.if \simple
|
||||
sqadd v19.16b, v18.16b, v22.16b // c1 = clamp((w&hev)+4)
|
||||
sqadd v20.16b, v18.16b, v23.16b // c2 = clamp((w&hev)+3)
|
||||
sshr v19.16b, v19.16b, #3 // c1 >>= 3
|
||||
sshr v20.16b, v20.16b, #3 // c2 >>= 3
|
||||
sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1)
|
||||
sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2)
|
||||
eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80
|
||||
eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80
|
||||
eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80
|
||||
eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80
|
||||
sqadd v19.16b, v18.16b, v22.16b // c1 = clamp((w&hev)+4)
|
||||
sqadd v20.16b, v18.16b, v23.16b // c2 = clamp((w&hev)+3)
|
||||
sshr v19.16b, v19.16b, #3 // c1 >>= 3
|
||||
sshr v20.16b, v20.16b, #3 // c2 >>= 3
|
||||
sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1)
|
||||
sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2)
|
||||
eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80
|
||||
eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80
|
||||
eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80
|
||||
eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80
|
||||
.elseif \inner
|
||||
// the !is4tap case of filter_common, only used for inner blocks
|
||||
// c3 = ((c1&~hev) + 1) >> 1;
|
||||
// Q1 = s2u(QS1 - c3);
|
||||
// P1 = s2u(PS1 + c3);
|
||||
sqadd v19.16b, v18.16b, v22.16b // c1 = clamp((w&hev)+4)
|
||||
sqadd v20.16b, v18.16b, v23.16b // c2 = clamp((w&hev)+3)
|
||||
sshr v19.16b, v19.16b, #3 // c1 >>= 3
|
||||
sshr v20.16b, v20.16b, #3 // c2 >>= 3
|
||||
sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1)
|
||||
sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2)
|
||||
bic v19.16b, v19.16b, v17.16b // c1 & ~hev
|
||||
eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80
|
||||
srshr v19.16b, v19.16b, #1 // c3 >>= 1
|
||||
eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80
|
||||
sqsub v5.16b, v5.16b, v19.16b // QS1 = clamp(QS1-c3)
|
||||
sqadd v2.16b, v2.16b, v19.16b // PS1 = clamp(PS1+c3)
|
||||
eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80
|
||||
eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80
|
||||
sqadd v19.16b, v18.16b, v22.16b // c1 = clamp((w&hev)+4)
|
||||
sqadd v20.16b, v18.16b, v23.16b // c2 = clamp((w&hev)+3)
|
||||
sshr v19.16b, v19.16b, #3 // c1 >>= 3
|
||||
sshr v20.16b, v20.16b, #3 // c2 >>= 3
|
||||
sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1)
|
||||
sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2)
|
||||
bic v19.16b, v19.16b, v17.16b // c1 & ~hev
|
||||
eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80
|
||||
srshr v19.16b, v19.16b, #1 // c3 >>= 1
|
||||
eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80
|
||||
sqsub v5.16b, v5.16b, v19.16b // QS1 = clamp(QS1-c3)
|
||||
sqadd v2.16b, v2.16b, v19.16b // PS1 = clamp(PS1+c3)
|
||||
eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80
|
||||
eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80
|
||||
.else
|
||||
and v20.16b, v18.16b, v17.16b // w & hev
|
||||
sqadd v19.16b, v20.16b, v22.16b // c1 = clamp((w&hev)+4)
|
||||
sqadd v20.16b, v20.16b, v23.16b // c2 = clamp((w&hev)+3)
|
||||
sshr v19.16b, v19.16b, #3 // c1 >>= 3
|
||||
sshr v20.16b, v20.16b, #3 // c2 >>= 3
|
||||
bic v18.16b, v18.16b, v17.16b // w &= ~hev
|
||||
sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1)
|
||||
sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2)
|
||||
and v20.16b, v18.16b, v17.16b // w & hev
|
||||
sqadd v19.16b, v20.16b, v22.16b // c1 = clamp((w&hev)+4)
|
||||
sqadd v20.16b, v20.16b, v23.16b // c2 = clamp((w&hev)+3)
|
||||
sshr v19.16b, v19.16b, #3 // c1 >>= 3
|
||||
sshr v20.16b, v20.16b, #3 // c2 >>= 3
|
||||
bic v18.16b, v18.16b, v17.16b // w &= ~hev
|
||||
sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1)
|
||||
sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2)
|
||||
|
||||
// filter_mbedge:
|
||||
// a = clamp((27*w + 63) >> 7);
|
||||
@@ -424,35 +424,35 @@ endfunc
|
||||
// a = clamp((9*w + 63) >> 7);
|
||||
// Q2 = s2u(QS2 - a);
|
||||
// P2 = s2u(PS2 + a);
|
||||
movi v17.8h, #63
|
||||
sshll v22.8h, v18.8b, #3
|
||||
sshll2 v23.8h, v18.16b, #3
|
||||
saddw v22.8h, v22.8h, v18.8b
|
||||
saddw2 v23.8h, v23.8h, v18.16b
|
||||
add v16.8h, v17.8h, v22.8h
|
||||
add v17.8h, v17.8h, v23.8h // 9*w + 63
|
||||
add v19.8h, v16.8h, v22.8h
|
||||
add v20.8h, v17.8h, v23.8h // 18*w + 63
|
||||
add v22.8h, v19.8h, v22.8h
|
||||
add v23.8h, v20.8h, v23.8h // 27*w + 63
|
||||
sqshrn v16.8b, v16.8h, #7
|
||||
sqshrn2 v16.16b, v17.8h, #7 // clamp(( 9*w + 63)>>7)
|
||||
sqshrn v19.8b, v19.8h, #7
|
||||
sqshrn2 v19.16b, v20.8h, #7 // clamp((18*w + 63)>>7)
|
||||
sqshrn v22.8b, v22.8h, #7
|
||||
sqshrn2 v22.16b, v23.8h, #7 // clamp((27*w + 63)>>7)
|
||||
sqadd v1.16b, v1.16b, v16.16b // PS2 = clamp(PS2+a)
|
||||
sqsub v6.16b, v6.16b, v16.16b // QS2 = clamp(QS2-a)
|
||||
sqadd v2.16b, v2.16b, v19.16b // PS1 = clamp(PS1+a)
|
||||
sqsub v5.16b, v5.16b, v19.16b // QS1 = clamp(QS1-a)
|
||||
sqadd v3.16b, v3.16b, v22.16b // PS0 = clamp(PS0+a)
|
||||
sqsub v4.16b, v4.16b, v22.16b // QS0 = clamp(QS0-a)
|
||||
eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80
|
||||
eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80
|
||||
eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80
|
||||
eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80
|
||||
eor v1.16b, v1.16b, v21.16b // P2 = PS2 ^ 0x80
|
||||
eor v6.16b, v6.16b, v21.16b // Q2 = QS2 ^ 0x80
|
||||
movi v17.8h, #63
|
||||
sshll v22.8h, v18.8b, #3
|
||||
sshll2 v23.8h, v18.16b, #3
|
||||
saddw v22.8h, v22.8h, v18.8b
|
||||
saddw2 v23.8h, v23.8h, v18.16b
|
||||
add v16.8h, v17.8h, v22.8h
|
||||
add v17.8h, v17.8h, v23.8h // 9*w + 63
|
||||
add v19.8h, v16.8h, v22.8h
|
||||
add v20.8h, v17.8h, v23.8h // 18*w + 63
|
||||
add v22.8h, v19.8h, v22.8h
|
||||
add v23.8h, v20.8h, v23.8h // 27*w + 63
|
||||
sqshrn v16.8b, v16.8h, #7
|
||||
sqshrn2 v16.16b, v17.8h, #7 // clamp(( 9*w + 63)>>7)
|
||||
sqshrn v19.8b, v19.8h, #7
|
||||
sqshrn2 v19.16b, v20.8h, #7 // clamp((18*w + 63)>>7)
|
||||
sqshrn v22.8b, v22.8h, #7
|
||||
sqshrn2 v22.16b, v23.8h, #7 // clamp((27*w + 63)>>7)
|
||||
sqadd v1.16b, v1.16b, v16.16b // PS2 = clamp(PS2+a)
|
||||
sqsub v6.16b, v6.16b, v16.16b // QS2 = clamp(QS2-a)
|
||||
sqadd v2.16b, v2.16b, v19.16b // PS1 = clamp(PS1+a)
|
||||
sqsub v5.16b, v5.16b, v19.16b // QS1 = clamp(QS1-a)
|
||||
sqadd v3.16b, v3.16b, v22.16b // PS0 = clamp(PS0+a)
|
||||
sqsub v4.16b, v4.16b, v22.16b // QS0 = clamp(QS0-a)
|
||||
eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80
|
||||
eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80
|
||||
eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80
|
||||
eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80
|
||||
eor v1.16b, v1.16b, v21.16b // P2 = PS2 ^ 0x80
|
||||
eor v6.16b, v6.16b, v21.16b // Q2 = QS2 ^ 0x80
|
||||
.endif
|
||||
.endm
|
||||
|
||||
@@ -507,48 +507,48 @@ function ff_vp8_v_loop_filter8uv\name\()_neon, export=1
|
||||
sub x0, x0, x2, lsl #2
|
||||
sub x1, x1, x2, lsl #2
|
||||
// Load pixels:
|
||||
ld1 {v0.d}[0], [x0], x2 // P3
|
||||
ld1 {v0.d}[1], [x1], x2 // P3
|
||||
ld1 {v1.d}[0], [x0], x2 // P2
|
||||
ld1 {v1.d}[1], [x1], x2 // P2
|
||||
ld1 {v2.d}[0], [x0], x2 // P1
|
||||
ld1 {v2.d}[1], [x1], x2 // P1
|
||||
ld1 {v3.d}[0], [x0], x2 // P0
|
||||
ld1 {v3.d}[1], [x1], x2 // P0
|
||||
ld1 {v4.d}[0], [x0], x2 // Q0
|
||||
ld1 {v4.d}[1], [x1], x2 // Q0
|
||||
ld1 {v5.d}[0], [x0], x2 // Q1
|
||||
ld1 {v5.d}[1], [x1], x2 // Q1
|
||||
ld1 {v6.d}[0], [x0], x2 // Q2
|
||||
ld1 {v6.d}[1], [x1], x2 // Q2
|
||||
ld1 {v7.d}[0], [x0] // Q3
|
||||
ld1 {v7.d}[1], [x1] // Q3
|
||||
ld1 {v0.d}[0], [x0], x2 // P3
|
||||
ld1 {v0.d}[1], [x1], x2 // P3
|
||||
ld1 {v1.d}[0], [x0], x2 // P2
|
||||
ld1 {v1.d}[1], [x1], x2 // P2
|
||||
ld1 {v2.d}[0], [x0], x2 // P1
|
||||
ld1 {v2.d}[1], [x1], x2 // P1
|
||||
ld1 {v3.d}[0], [x0], x2 // P0
|
||||
ld1 {v3.d}[1], [x1], x2 // P0
|
||||
ld1 {v4.d}[0], [x0], x2 // Q0
|
||||
ld1 {v4.d}[1], [x1], x2 // Q0
|
||||
ld1 {v5.d}[0], [x0], x2 // Q1
|
||||
ld1 {v5.d}[1], [x1], x2 // Q1
|
||||
ld1 {v6.d}[0], [x0], x2 // Q2
|
||||
ld1 {v6.d}[1], [x1], x2 // Q2
|
||||
ld1 {v7.d}[0], [x0] // Q3
|
||||
ld1 {v7.d}[1], [x1] // Q3
|
||||
|
||||
dup v22.16b, w3 // flim_E
|
||||
dup v23.16b, w4 // flim_I
|
||||
dup v22.16b, w3 // flim_E
|
||||
dup v23.16b, w4 // flim_I
|
||||
|
||||
vp8_loop_filter inner=\inner, hev_thresh=w5
|
||||
|
||||
// back up to P2: u,v -= stride * 6
|
||||
sub x0, x0, x2, lsl #2
|
||||
sub x1, x1, x2, lsl #2
|
||||
sub x0, x0, x2, lsl #1
|
||||
sub x1, x1, x2, lsl #1
|
||||
sub x0, x0, x2, lsl #2
|
||||
sub x1, x1, x2, lsl #2
|
||||
sub x0, x0, x2, lsl #1
|
||||
sub x1, x1, x2, lsl #1
|
||||
|
||||
// Store pixels:
|
||||
|
||||
st1 {v1.d}[0], [x0], x2 // P2
|
||||
st1 {v1.d}[1], [x1], x2 // P2
|
||||
st1 {v2.d}[0], [x0], x2 // P1
|
||||
st1 {v2.d}[1], [x1], x2 // P1
|
||||
st1 {v3.d}[0], [x0], x2 // P0
|
||||
st1 {v3.d}[1], [x1], x2 // P0
|
||||
st1 {v4.d}[0], [x0], x2 // Q0
|
||||
st1 {v4.d}[1], [x1], x2 // Q0
|
||||
st1 {v5.d}[0], [x0], x2 // Q1
|
||||
st1 {v5.d}[1], [x1], x2 // Q1
|
||||
st1 {v6.d}[0], [x0] // Q2
|
||||
st1 {v6.d}[1], [x1] // Q2
|
||||
st1 {v1.d}[0], [x0], x2 // P2
|
||||
st1 {v1.d}[1], [x1], x2 // P2
|
||||
st1 {v2.d}[0], [x0], x2 // P1
|
||||
st1 {v2.d}[1], [x1], x2 // P1
|
||||
st1 {v3.d}[0], [x0], x2 // P0
|
||||
st1 {v3.d}[1], [x1], x2 // P0
|
||||
st1 {v4.d}[0], [x0], x2 // Q0
|
||||
st1 {v4.d}[1], [x1], x2 // Q0
|
||||
st1 {v5.d}[0], [x0], x2 // Q1
|
||||
st1 {v5.d}[1], [x1], x2 // Q1
|
||||
st1 {v6.d}[0], [x0] // Q2
|
||||
st1 {v6.d}[1], [x1] // Q2
|
||||
|
||||
ret
|
||||
endfunc
|
||||
@@ -579,7 +579,7 @@ function ff_vp8_h_loop_filter16\name\()_neon, export=1
|
||||
ld1 {v6.d}[1], [x0], x1
|
||||
ld1 {v7.d}[1], [x0], x1
|
||||
|
||||
transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31
|
||||
transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31
|
||||
|
||||
dup v22.16b, w2 // flim_E
|
||||
.if !\simple
|
||||
@@ -590,7 +590,7 @@ function ff_vp8_h_loop_filter16\name\()_neon, export=1
|
||||
|
||||
sub x0, x0, x1, lsl #4 // backup 16 rows
|
||||
|
||||
transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31
|
||||
transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31
|
||||
|
||||
// Store pixels:
|
||||
st1 {v0.d}[0], [x0], x1
|
||||
@@ -624,24 +624,24 @@ function ff_vp8_h_loop_filter8uv\name\()_neon, export=1
|
||||
sub x1, x1, #4
|
||||
|
||||
// Load pixels:
|
||||
ld1 {v0.d}[0], [x0], x2 // load u
|
||||
ld1 {v0.d}[1], [x1], x2 // load v
|
||||
ld1 {v1.d}[0], [x0], x2
|
||||
ld1 {v1.d}[1], [x1], x2
|
||||
ld1 {v2.d}[0], [x0], x2
|
||||
ld1 {v2.d}[1], [x1], x2
|
||||
ld1 {v3.d}[0], [x0], x2
|
||||
ld1 {v3.d}[1], [x1], x2
|
||||
ld1 {v4.d}[0], [x0], x2
|
||||
ld1 {v4.d}[1], [x1], x2
|
||||
ld1 {v5.d}[0], [x0], x2
|
||||
ld1 {v5.d}[1], [x1], x2
|
||||
ld1 {v6.d}[0], [x0], x2
|
||||
ld1 {v6.d}[1], [x1], x2
|
||||
ld1 {v7.d}[0], [x0], x2
|
||||
ld1 {v7.d}[1], [x1], x2
|
||||
ld1 {v0.d}[0], [x0], x2 // load u
|
||||
ld1 {v0.d}[1], [x1], x2 // load v
|
||||
ld1 {v1.d}[0], [x0], x2
|
||||
ld1 {v1.d}[1], [x1], x2
|
||||
ld1 {v2.d}[0], [x0], x2
|
||||
ld1 {v2.d}[1], [x1], x2
|
||||
ld1 {v3.d}[0], [x0], x2
|
||||
ld1 {v3.d}[1], [x1], x2
|
||||
ld1 {v4.d}[0], [x0], x2
|
||||
ld1 {v4.d}[1], [x1], x2
|
||||
ld1 {v5.d}[0], [x0], x2
|
||||
ld1 {v5.d}[1], [x1], x2
|
||||
ld1 {v6.d}[0], [x0], x2
|
||||
ld1 {v6.d}[1], [x1], x2
|
||||
ld1 {v7.d}[0], [x0], x2
|
||||
ld1 {v7.d}[1], [x1], x2
|
||||
|
||||
transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31
|
||||
transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31
|
||||
|
||||
dup v22.16b, w3 // flim_E
|
||||
dup v23.16b, w4 // flim_I
|
||||
@@ -651,25 +651,25 @@ function ff_vp8_h_loop_filter8uv\name\()_neon, export=1
|
||||
sub x0, x0, x2, lsl #3 // backup u 8 rows
|
||||
sub x1, x1, x2, lsl #3 // backup v 8 rows
|
||||
|
||||
transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31
|
||||
transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31
|
||||
|
||||
// Store pixels:
|
||||
st1 {v0.d}[0], [x0], x2 // load u
|
||||
st1 {v0.d}[1], [x1], x2 // load v
|
||||
st1 {v1.d}[0], [x0], x2
|
||||
st1 {v1.d}[1], [x1], x2
|
||||
st1 {v2.d}[0], [x0], x2
|
||||
st1 {v2.d}[1], [x1], x2
|
||||
st1 {v3.d}[0], [x0], x2
|
||||
st1 {v3.d}[1], [x1], x2
|
||||
st1 {v4.d}[0], [x0], x2
|
||||
st1 {v4.d}[1], [x1], x2
|
||||
st1 {v5.d}[0], [x0], x2
|
||||
st1 {v5.d}[1], [x1], x2
|
||||
st1 {v6.d}[0], [x0], x2
|
||||
st1 {v6.d}[1], [x1], x2
|
||||
st1 {v7.d}[0], [x0]
|
||||
st1 {v7.d}[1], [x1]
|
||||
st1 {v0.d}[0], [x0], x2 // load u
|
||||
st1 {v0.d}[1], [x1], x2 // load v
|
||||
st1 {v1.d}[0], [x0], x2
|
||||
st1 {v1.d}[1], [x1], x2
|
||||
st1 {v2.d}[0], [x0], x2
|
||||
st1 {v2.d}[1], [x1], x2
|
||||
st1 {v3.d}[0], [x0], x2
|
||||
st1 {v3.d}[1], [x1], x2
|
||||
st1 {v4.d}[0], [x0], x2
|
||||
st1 {v4.d}[1], [x1], x2
|
||||
st1 {v5.d}[0], [x0], x2
|
||||
st1 {v5.d}[1], [x1], x2
|
||||
st1 {v6.d}[0], [x0], x2
|
||||
st1 {v6.d}[1], [x1], x2
|
||||
st1 {v7.d}[0], [x0]
|
||||
st1 {v7.d}[1], [x1]
|
||||
|
||||
ret
|
||||
|
||||
|
||||
+2
-2
@@ -1579,11 +1579,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
nibble[0] = sign_extend(byte & 15, 4);
|
||||
nibble[1] = sign_extend(byte >> 4, 4);
|
||||
|
||||
out[2+n*2] = (nibble[0]*(scale<<14) + (history[0]*29336) - (history[1]*13136)) >> 14;
|
||||
out[2+n*2] = nibble[0]*scale + ((history[0]*3667 - history[1]*1642) >> 11);
|
||||
history[1] = history[0];
|
||||
history[0] = out[2+n*2];
|
||||
|
||||
out[2+n*2+1] = (nibble[1]*(scale<<14) + (history[0]*29336) - (history[1]*13136)) >> 14;
|
||||
out[2+n*2+1] = nibble[1]*scale + ((history[0]*3667 - history[1]*1642) >> 11);
|
||||
history[1] = history[0];
|
||||
history[0] = out[2+n*2+1];
|
||||
}
|
||||
|
||||
+27
-11
@@ -145,8 +145,6 @@ typedef struct APEPredictor64 {
|
||||
uint64_t coeffsA[2][4]; ///< adaption coefficients
|
||||
uint64_t coeffsB[2][5]; ///< adaption coefficients
|
||||
int64_t historybuffer[HISTORY_SIZE + PREDICTOR_SIZE];
|
||||
|
||||
unsigned int sample_pos;
|
||||
} APEPredictor64;
|
||||
|
||||
/** Decoder context */
|
||||
@@ -860,8 +858,6 @@ static void init_predictor_decoder(APEContext *ctx)
|
||||
p64->lastA[0] = p64->lastA[1] = 0;
|
||||
|
||||
p->sample_pos = 0;
|
||||
|
||||
p64->sample_pos = 0;
|
||||
}
|
||||
|
||||
/** Get inverse sign of integer (-1 for positive, 1 for negative and 0 for zero) */
|
||||
@@ -1170,7 +1166,8 @@ static void predictor_decode_mono_3930(APEContext *ctx, int count)
|
||||
static av_always_inline int predictor_update_filter(APEPredictor64 *p,
|
||||
const int decoded, const int filter,
|
||||
const int delayA, const int delayB,
|
||||
const int adaptA, const int adaptB)
|
||||
const int adaptA, const int adaptB,
|
||||
int compression_level)
|
||||
{
|
||||
int64_t predictionA, predictionB;
|
||||
int32_t sign;
|
||||
@@ -1198,7 +1195,13 @@ static av_always_inline int predictor_update_filter(APEPredictor64 *p,
|
||||
p->buf[delayB - 3] * p->coeffsB[filter][3] +
|
||||
p->buf[delayB - 4] * p->coeffsB[filter][4];
|
||||
|
||||
p->lastA[filter] = decoded + ((int64_t)((uint64_t)predictionA + (predictionB >> 1)) >> 10);
|
||||
if (compression_level < COMPRESSION_LEVEL_INSANE) {
|
||||
predictionA = (int32_t)predictionA;
|
||||
predictionB = (int32_t)predictionB;
|
||||
p->lastA[filter] = (int32_t)(decoded + (unsigned)((int32_t)(predictionA + (predictionB >> 1)) >> 10));
|
||||
} else {
|
||||
p->lastA[filter] = decoded + ((int64_t)((uint64_t)predictionA + (predictionB >> 1)) >> 10);
|
||||
}
|
||||
p->filterA[filter] = p->lastA[filter] + ((int64_t)(p->filterA[filter] * 31ULL) >> 5);
|
||||
|
||||
sign = APESIGN(decoded);
|
||||
@@ -1226,10 +1229,12 @@ static void predictor_decode_stereo_3950(APEContext *ctx, int count)
|
||||
while (count--) {
|
||||
/* Predictor Y */
|
||||
*decoded0 = predictor_update_filter(p, *decoded0, 0, YDELAYA, YDELAYB,
|
||||
YADAPTCOEFFSA, YADAPTCOEFFSB);
|
||||
YADAPTCOEFFSA, YADAPTCOEFFSB,
|
||||
ctx->compression_level);
|
||||
decoded0++;
|
||||
*decoded1 = predictor_update_filter(p, *decoded1, 1, XDELAYA, XDELAYB,
|
||||
XADAPTCOEFFSA, XADAPTCOEFFSB);
|
||||
XADAPTCOEFFSA, XADAPTCOEFFSB,
|
||||
ctx->compression_level);
|
||||
decoded1++;
|
||||
|
||||
/* Combined */
|
||||
@@ -1611,13 +1616,24 @@ static int ape_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
s->samples -= blockstodecode;
|
||||
|
||||
if (avctx->err_recognition & AV_EF_CRCCHECK &&
|
||||
s->fileversion >= 3900 && s->bps < 24) {
|
||||
s->fileversion >= 3900) {
|
||||
uint32_t crc = s->CRC_state;
|
||||
const AVCRC *crc_tab = av_crc_get_table(AV_CRC_32_IEEE_LE);
|
||||
int stride = s->bps == 24 ? 4 : (s->bps>>3);
|
||||
int offset = s->bps == 24;
|
||||
int bytes = s->bps >> 3;
|
||||
|
||||
for (i = 0; i < blockstodecode; i++) {
|
||||
for (ch = 0; ch < s->channels; ch++) {
|
||||
uint8_t *smp = frame->data[ch] + (i*(s->bps >> 3));
|
||||
crc = av_crc(crc_tab, crc, smp, s->bps >> 3);
|
||||
#if HAVE_BIGENDIAN
|
||||
uint8_t *smp_native = frame->data[ch] + i*stride;
|
||||
uint8_t smp[4];
|
||||
for(int j = 0; j<stride; j++)
|
||||
smp[j] = smp_native[stride-j-1];
|
||||
#else
|
||||
uint8_t *smp = frame->data[ch] + i*stride;
|
||||
#endif
|
||||
crc = av_crc(crc_tab, crc, smp+offset, bytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,4 +48,3 @@ function ff_scalarproduct_int16_neon, export=1
|
||||
vmov.32 r0, d3[0]
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ A .endif
|
||||
.endif
|
||||
|
||||
// Begin loop
|
||||
01:
|
||||
1:
|
||||
.if TOTAL_TAPS == 0
|
||||
// Things simplify a lot in this case
|
||||
// In fact this could be pipelined further if it's worth it...
|
||||
@@ -241,7 +241,7 @@ A .endif
|
||||
str ST0, [PST, #-4]!
|
||||
str ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
|
||||
str ST0, [PSAMP], #4 * MAX_CHANNELS
|
||||
bne 01b
|
||||
bne 1b
|
||||
.else
|
||||
.if \fir_taps & 1
|
||||
.set LOAD_REG, 1
|
||||
@@ -333,7 +333,7 @@ T orr AC0, AC0, AC1
|
||||
str ST3, [PST, #-4]!
|
||||
str ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
|
||||
str ST3, [PSAMP], #4 * MAX_CHANNELS
|
||||
bne 01b
|
||||
bne 1b
|
||||
.endif
|
||||
b 99f
|
||||
|
||||
|
||||
+2
-2
@@ -170,7 +170,7 @@ static uint8_t get_shear_params_valid(AV1DecContext *s, int idx)
|
||||
int16_t alpha, beta, gamma, delta, divf, divs;
|
||||
int64_t v, w;
|
||||
int32_t *param = &s->cur_frame.gm_params[idx][0];
|
||||
if (param[2] < 0)
|
||||
if (param[2] <= 0)
|
||||
return 0;
|
||||
|
||||
alpha = av_clip_int16(param[2] - (1 << AV1_WARPEDMODEL_PREC_BITS));
|
||||
@@ -675,7 +675,7 @@ static int set_context_with_sequence(AVCodecContext *avctx,
|
||||
avctx->color_range =
|
||||
seq->color_config.color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
|
||||
avctx->color_primaries = seq->color_config.color_primaries;
|
||||
avctx->colorspace = seq->color_config.color_primaries;
|
||||
avctx->colorspace = seq->color_config.matrix_coefficients;
|
||||
avctx->color_trc = seq->color_config.transfer_characteristics;
|
||||
|
||||
switch (seq->color_config.chroma_sample_position) {
|
||||
|
||||
+4
-4
@@ -870,7 +870,7 @@ static int binkb_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
|
||||
|
||||
binkb_init_bundles(c);
|
||||
ref_start = frame->data[plane_idx];
|
||||
ref_end = frame->data[plane_idx] + (bh * frame->linesize[plane_idx] + bw) * 8;
|
||||
ref_end = frame->data[plane_idx] + ((bh - 1) * frame->linesize[plane_idx] + bw - 1) * 8;
|
||||
|
||||
for (i = 0; i < 64; i++)
|
||||
coordmap[i] = (i & 7) + (i >> 3) * stride;
|
||||
@@ -926,7 +926,7 @@ static int binkb_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
|
||||
xoff = binkb_get_value(c, BINKB_SRC_X_OFF);
|
||||
yoff = binkb_get_value(c, BINKB_SRC_Y_OFF) + ybias;
|
||||
ref = dst + xoff + yoff * stride;
|
||||
if (ref < ref_start || ref + 8*stride > ref_end) {
|
||||
if (ref < ref_start || ref > ref_end) {
|
||||
av_log(c->avctx, AV_LOG_WARNING, "Reference block is out of bounds\n");
|
||||
} else if (ref + 8*stride < dst || ref >= dst + 8*stride) {
|
||||
c->put_pixels_tab(dst, ref, stride, 8);
|
||||
@@ -942,7 +942,7 @@ static int binkb_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
|
||||
xoff = binkb_get_value(c, BINKB_SRC_X_OFF);
|
||||
yoff = binkb_get_value(c, BINKB_SRC_Y_OFF) + ybias;
|
||||
ref = dst + xoff + yoff * stride;
|
||||
if (ref < ref_start || ref + 8 * stride > ref_end) {
|
||||
if (ref < ref_start || ref > ref_end) {
|
||||
av_log(c->avctx, AV_LOG_WARNING, "Reference block is out of bounds\n");
|
||||
} else if (ref + 8*stride < dst || ref >= dst + 8*stride) {
|
||||
c->put_pixels_tab(dst, ref, stride, 8);
|
||||
@@ -974,7 +974,7 @@ static int binkb_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
|
||||
xoff = binkb_get_value(c, BINKB_SRC_X_OFF);
|
||||
yoff = binkb_get_value(c, BINKB_SRC_Y_OFF) + ybias;
|
||||
ref = dst + xoff + yoff * stride;
|
||||
if (ref < ref_start || ref + 8 * stride > ref_end) {
|
||||
if (ref < ref_start || ref > ref_end) {
|
||||
av_log(c->avctx, AV_LOG_WARNING, "Reference block is out of bounds\n");
|
||||
} else if (ref + 8*stride < dst || ref >= dst + 8*stride) {
|
||||
c->put_pixels_tab(dst, ref, stride, 8);
|
||||
|
||||
+13
-8
@@ -155,6 +155,7 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part)
|
||||
int n_zeros = 0, step = 256, dominant = 0;
|
||||
int pos = 0, level = 0;
|
||||
BitCount *bits = s->bits;
|
||||
int passes = 1;
|
||||
|
||||
memset(buf, 0, entries * sizeof(*buf));
|
||||
if (base_2_part) {
|
||||
@@ -216,24 +217,28 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part)
|
||||
x = 0;
|
||||
n_zeros = 0;
|
||||
for (i = 0; n_zeros < entries; i++) {
|
||||
if (x >= max_x)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (pos >= entries) {
|
||||
pos = 0;
|
||||
level += 1 << low_bits;
|
||||
level += passes << low_bits;
|
||||
passes = 1;
|
||||
if (bits[x].bit && bits[x].count > entries - n_zeros)
|
||||
passes = bits[x].count / (entries - n_zeros);
|
||||
}
|
||||
|
||||
if (level > 1 << 16)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (x >= max_x)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (buf[pos] >= level) {
|
||||
if (bits[x].bit)
|
||||
buf[pos] += 1 << low_bits;
|
||||
buf[pos] += passes << low_bits;
|
||||
else
|
||||
n_zeros++;
|
||||
|
||||
bits[x].count--;
|
||||
av_assert1(bits[x].count >= passes);
|
||||
bits[x].count -= passes;
|
||||
x += bits[x].count == 0;
|
||||
}
|
||||
|
||||
@@ -265,14 +270,14 @@ static inline int shift(int a, int b)
|
||||
|
||||
static int predictor_calc_error(int *k, int *state, int order, int error)
|
||||
{
|
||||
int i, x = error - shift_down(k[order-1] * state[order-1], LATTICE_SHIFT);
|
||||
int i, x = error - (unsigned)shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT);
|
||||
int *k_ptr = &(k[order-2]),
|
||||
*state_ptr = &(state[order-2]);
|
||||
|
||||
for (i = order-2; i >= 0; i--, k_ptr--, state_ptr--) {
|
||||
unsigned k_value = *k_ptr, state_value = *state_ptr;
|
||||
|
||||
x -= shift_down(k_value * state_value, LATTICE_SHIFT);
|
||||
x -= (unsigned) shift_down(k_value * (unsigned)state_value, LATTICE_SHIFT);
|
||||
state_ptr[1] = state_value + shift_down(k_value * x, LATTICE_SHIFT);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ int64_t ff_dot_product(const int16_t *a, const int16_t *b, int length);
|
||||
*
|
||||
* @return value << offset, if offset>=0; value >> -offset - otherwise
|
||||
*/
|
||||
static inline int bidir_sal(int value, int offset)
|
||||
static inline unsigned bidir_sal(unsigned value, int offset)
|
||||
{
|
||||
if(offset < 0) return value >> -offset;
|
||||
else return value << offset;
|
||||
|
||||
@@ -90,4 +90,3 @@ const FFCodec ff_cljr_decoder = {
|
||||
FF_CODEC_DECODE_CB(decode_frame),
|
||||
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||
};
|
||||
|
||||
|
||||
+5
-2
@@ -70,6 +70,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
|
||||
int buf_size = avpkt->size;
|
||||
CamStudioContext *c = avctx->priv_data;
|
||||
int ret;
|
||||
int bpp = avctx->bits_per_coded_sample / 8;
|
||||
int bugdelta = FFALIGN(avctx->width * bpp, 4) * avctx->height
|
||||
- (avctx->width & ~3) * bpp * avctx->height;
|
||||
|
||||
if (buf_size < 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "coded frame too small\n");
|
||||
@@ -83,7 +86,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
|
||||
switch ((buf[0] >> 1) & 7) {
|
||||
case 0: { // lzo compression
|
||||
int outlen = c->decomp_size, inlen = buf_size - 2;
|
||||
if (av_lzo1x_decode(c->decomp_buf, &outlen, &buf[2], &inlen) || outlen) {
|
||||
if (av_lzo1x_decode(c->decomp_buf, &outlen, &buf[2], &inlen) || (outlen && outlen != bugdelta)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
@@ -92,7 +95,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
|
||||
case 1: { // zlib compression
|
||||
#if CONFIG_ZLIB
|
||||
unsigned long dlen = c->decomp_size;
|
||||
if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK || dlen != c->decomp_size) {
|
||||
if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK || (dlen != c->decomp_size && dlen != c->decomp_size - bugdelta)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
+3
-3
@@ -140,7 +140,7 @@ static int extract_packet_props(AVCodecInternal *avci, const AVPacket *pkt)
|
||||
if (pkt) {
|
||||
ret = av_packet_copy_props(avci->last_pkt_props, pkt);
|
||||
if (!ret)
|
||||
avci->last_pkt_props->opaque = (void *)(intptr_t)pkt->size; // Needed for ff_decode_frame_props().
|
||||
avci->last_pkt_props->stream_index = pkt->size; // Needed for ff_decode_frame_props().
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -461,7 +461,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
pkt->dts = AV_NOPTS_VALUE;
|
||||
if (!(codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
|
||||
// See extract_packet_props() comment.
|
||||
avci->last_pkt_props->opaque = (void *)((intptr_t)avci->last_pkt_props->opaque - consumed);
|
||||
avci->last_pkt_props->stream_index = avci->last_pkt_props->stream_index - consumed;
|
||||
avci->last_pkt_props->pts = AV_NOPTS_VALUE;
|
||||
avci->last_pkt_props->dts = AV_NOPTS_VALUE;
|
||||
}
|
||||
@@ -1355,7 +1355,7 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
|
||||
int ret = ff_decode_frame_props_from_pkt(avctx, frame, pkt);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
frame->pkt_size = (int)(intptr_t)pkt->opaque;
|
||||
frame->pkt_size = pkt->stream_index;
|
||||
}
|
||||
#if FF_API_REORDERED_OPAQUE
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
@@ -157,7 +157,7 @@ static inline uint64_t get_ue_coef(GetBitContext *gb, const AVDOVIRpuDataHeader
|
||||
|
||||
case RPU_COEFF_FLOAT:
|
||||
fpart.u32 = get_bits_long(gb, 32);
|
||||
return fpart.f32 * (1 << hdr->coef_log2_denom);
|
||||
return fpart.f32 * (1LL << hdr->coef_log2_denom);
|
||||
}
|
||||
|
||||
return 0; /* unreachable */
|
||||
@@ -176,7 +176,7 @@ static inline int64_t get_se_coef(GetBitContext *gb, const AVDOVIRpuDataHeader *
|
||||
|
||||
case RPU_COEFF_FLOAT:
|
||||
fpart.u32 = get_bits_long(gb, 32);
|
||||
return fpart.f32 * (1 << hdr->coef_log2_denom);
|
||||
return fpart.f32 * (1LL << hdr->coef_log2_denom);
|
||||
}
|
||||
|
||||
return 0; /* unreachable */
|
||||
|
||||
+1
-1
@@ -444,7 +444,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
if (n & 0x80)
|
||||
s->sample[idx] = sign_extend((n & 0x7f) << 9, 16);
|
||||
else
|
||||
s->sample[idx] += s->scale * wady_table[n & 0x7f];
|
||||
s->sample[idx] += s->scale * (unsigned)wady_table[n & 0x7f];
|
||||
*output_samples++ = av_clip_int16(s->sample[idx]);
|
||||
idx ^= stereo;
|
||||
}
|
||||
|
||||
@@ -337,4 +337,3 @@ const AVDVProfile *av_dv_codec_profile2(int width, int height,
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
@@ -376,7 +376,8 @@ static int encode_dvd_subtitles(AVCodecContext *avctx,
|
||||
x2 = vrect.x + vrect.w - 1;
|
||||
y2 = vrect.y + vrect.h - 1;
|
||||
|
||||
if (x2 > avctx->width || y2 > avctx->height) {
|
||||
if ((avctx->width > 0 && x2 > avctx->width) ||
|
||||
(avctx->height > 0 && y2 > avctx->height)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "canvas_size(%d:%d) is too small(%d:%d) for render\n",
|
||||
avctx->width, avctx->height, x2, y2);
|
||||
ret = AVERROR(EINVAL);
|
||||
|
||||
+3
-1
@@ -104,7 +104,9 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx)
|
||||
ff_fdctdsp_init(&fdsp, avctx);
|
||||
ff_me_cmp_init(&mecc, avctx);
|
||||
ff_pixblockdsp_init(&pdsp, avctx);
|
||||
ff_set_cmp(&mecc, mecc.ildct_cmp, avctx->ildct_cmp);
|
||||
ret = ff_set_cmp(&mecc, mecc.ildct_cmp, avctx->ildct_cmp);
|
||||
if (ret < 0)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
s->get_pixels = pdsp.get_pixels;
|
||||
s->ildct_cmp = mecc.ildct_cmp[5];
|
||||
|
||||
+10
-10
@@ -89,11 +89,6 @@ static CodeBook unpack_codebook(GetBitContext* gb, unsigned depth,
|
||||
unsigned i, j;
|
||||
CodeBook cb = { 0 };
|
||||
|
||||
if (size >= INT_MAX / 34 || get_bits_left(gb) < size * 34)
|
||||
return cb;
|
||||
|
||||
if (size >= INT_MAX / sizeof(MacroBlock))
|
||||
return cb;
|
||||
cb.blocks = av_malloc(size ? size * sizeof(MacroBlock) : 1);
|
||||
if (!cb.blocks)
|
||||
return cb;
|
||||
@@ -163,7 +158,7 @@ static MacroBlock decode_macroblock(Escape124Context* s, GetBitContext* gb,
|
||||
|
||||
// This condition can occur with invalid bitstreams and
|
||||
// *codebook_index == 2
|
||||
if (block_index >= s->codebooks[*codebook_index].size)
|
||||
if (block_index >= s->codebooks[*codebook_index].size || !s->codebooks[*codebook_index].blocks)
|
||||
return (MacroBlock) { { 0 } };
|
||||
|
||||
return s->codebooks[*codebook_index].blocks[block_index];
|
||||
@@ -225,7 +220,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
// represent a lower bound of the space needed for skipped superblocks. Non
|
||||
// skipped SBs need more space.
|
||||
if (get_bits_left(&gb) < 64 + s->num_superblocks * 23LL / 4320)
|
||||
return -1;
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
frame_flags = get_bits_long(&gb, 32);
|
||||
frame_size = get_bits_long(&gb, 32);
|
||||
@@ -242,7 +237,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
if ((ret = av_frame_ref(frame, s->frame)) < 0)
|
||||
return ret;
|
||||
|
||||
return frame_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
@@ -276,9 +271,14 @@ static int escape124_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
}
|
||||
|
||||
av_freep(&s->codebooks[i].blocks);
|
||||
if (cb_size >= INT_MAX / 34 || get_bits_left(&gb) < (int)cb_size * 34)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (cb_size >= INT_MAX / sizeof(MacroBlock))
|
||||
return AVERROR_INVALIDDATA;
|
||||
s->codebooks[i] = unpack_codebook(&gb, cb_depth, cb_size);
|
||||
if (!s->codebooks[i].blocks)
|
||||
return -1;
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
|
||||
*got_frame = 1;
|
||||
|
||||
return frame_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+16
-7
@@ -334,7 +334,10 @@ static int huf_unpack_enc_table(GetByteContext *gb,
|
||||
return ret;
|
||||
|
||||
for (; im <= iM; im++) {
|
||||
uint64_t l = freq[im] = get_bits(&gbit, 6);
|
||||
int l;
|
||||
if (get_bits_left(&gbit) < 6)
|
||||
return AVERROR_INVALIDDATA;
|
||||
l = freq[im] = get_bits(&gbit, 6);
|
||||
|
||||
if (l == LONG_ZEROCODE_RUN) {
|
||||
int zerun = get_bits(&gbit, 8) + SHORTEST_LONG_RUN;
|
||||
@@ -1930,8 +1933,10 @@ static int decode_header(EXRContext *s, AVFrame *frame)
|
||||
|
||||
bytestream2_get_buffer(gb, key, FFMIN(sizeof(key) - 1, var_size));
|
||||
if (strncmp("scanlineimage", key, var_size) &&
|
||||
strncmp("tiledimage", key, var_size))
|
||||
return AVERROR_PATCHWELCOME;
|
||||
strncmp("tiledimage", key, var_size)) {
|
||||
ret = AVERROR_PATCHWELCOME;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
continue;
|
||||
} else if ((var_size = check_header_variable(s, "preview",
|
||||
@@ -1939,12 +1944,16 @@ static int decode_header(EXRContext *s, AVFrame *frame)
|
||||
uint32_t pw = bytestream2_get_le32(gb);
|
||||
uint32_t ph = bytestream2_get_le32(gb);
|
||||
uint64_t psize = pw * ph;
|
||||
if (psize > INT64_MAX / 4)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (psize > INT64_MAX / 4) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto fail;
|
||||
}
|
||||
psize *= 4;
|
||||
|
||||
if ((int64_t)psize >= bytestream2_get_bytes_left(gb))
|
||||
return AVERROR_INVALIDDATA;
|
||||
if ((int64_t)psize >= bytestream2_get_bytes_left(gb)) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
bytestream2_skip(gb, psize);
|
||||
|
||||
|
||||
@@ -50,4 +50,3 @@ static inline int RENAME(get_context)(PlaneContext *p, TYPE *src,
|
||||
p->quant_table[1][(LT - T) & 0xFF] +
|
||||
p->quant_table[2][(T - RT) & 0xFF];
|
||||
}
|
||||
|
||||
|
||||
@@ -475,6 +475,11 @@ static int read_extra_header(FFV1Context *f)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (f->num_h_slices > MAX_SLICES / f->num_v_slices) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "slice count unsupported\n");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
f->quant_table_count = get_symbol(c, state, 0);
|
||||
if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES || !f->quant_table_count) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "quant table count %d is invalid\n", f->quant_table_count);
|
||||
|
||||
@@ -201,4 +201,3 @@ static int RENAME(encode_rgb_frame)(FFV1Context *s, const uint8_t *src[4],
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -366,19 +366,19 @@ static int decode_subframe_fixed(FLACContext *s, int32_t *decoded,
|
||||
break; \
|
||||
case 1: \
|
||||
for (int i = pred_order; i < blocksize; i++) \
|
||||
decoded[i] = (int64_t)residual[i] + (int64_t)decoded[i-1];\
|
||||
decoded[i] = (uint64_t)residual[i] + (uint64_t)decoded[i-1];\
|
||||
break; \
|
||||
case 2: \
|
||||
for (int i = pred_order; i < blocksize; i++) \
|
||||
decoded[i] = (int64_t)residual[i] + 2*(int64_t)decoded[i-1] - (int64_t)decoded[i-2]; \
|
||||
decoded[i] = (uint64_t)residual[i] + 2*(uint64_t)decoded[i-1] - (uint64_t)decoded[i-2]; \
|
||||
break; \
|
||||
case 3: \
|
||||
for (int i = pred_order; i < blocksize; i++) \
|
||||
decoded[i] = (int64_t)residual[i] + 3*(int64_t)decoded[i-1] - 3*(int64_t)decoded[i-2] + (int64_t)decoded[i-3]; \
|
||||
decoded[i] = (uint64_t)residual[i] + 3*(uint64_t)decoded[i-1] - 3*(uint64_t)decoded[i-2] + (uint64_t)decoded[i-3]; \
|
||||
break; \
|
||||
case 4: \
|
||||
for (int i = pred_order; i < blocksize; i++) \
|
||||
decoded[i] = (int64_t)residual[i] + 4*(int64_t)decoded[i-1] - 6*(int64_t)decoded[i-2] + 4*(int64_t)decoded[i-3] - (int64_t)decoded[i-4]; \
|
||||
decoded[i] = (uint64_t)residual[i] + 4*(uint64_t)decoded[i-1] - 6*(uint64_t)decoded[i-2] + 4*(uint64_t)decoded[i-3] - (uint64_t)decoded[i-4]; \
|
||||
break; \
|
||||
default: \
|
||||
av_log(s->avctx, AV_LOG_ERROR, "illegal pred order %d\n", pred_order); \
|
||||
@@ -513,7 +513,7 @@ static int decode_subframe_lpc_33bps(FLACContext *s, int64_t *decoded,
|
||||
for (i = pred_order; i < s->blocksize; i++, decoded++) {
|
||||
int64_t sum = 0;
|
||||
for (j = 0; j < pred_order; j++)
|
||||
sum += (int64_t)coeffs[j] * decoded[j];
|
||||
sum += (int64_t)coeffs[j] * (uint64_t)decoded[j];
|
||||
decoded[j] = residual[i] + (sum >> qlevel);
|
||||
}
|
||||
|
||||
@@ -706,10 +706,10 @@ static void decorrelate_33bps(int ch_mode, int32_t **decoded, int64_t *decoded_3
|
||||
int i;
|
||||
if (ch_mode == FLAC_CHMODE_LEFT_SIDE ) {
|
||||
for (i = 0; i < len; i++)
|
||||
decoded[1][i] = decoded[0][i] - decoded_33bps[i];
|
||||
decoded[1][i] = decoded[0][i] - (uint64_t)decoded_33bps[i];
|
||||
} else if (ch_mode == FLAC_CHMODE_RIGHT_SIDE ) {
|
||||
for (i = 0; i < len; i++)
|
||||
decoded[0][i] = decoded[1][i] + decoded_33bps[i];
|
||||
decoded[0][i] = decoded[1][i] + (uint64_t)decoded_33bps[i];
|
||||
} else if (ch_mode == FLAC_CHMODE_MID_SIDE ) {
|
||||
for (i = 0; i < len; i++) {
|
||||
uint64_t a = decoded[0][i];
|
||||
|
||||
+10
-9
@@ -145,7 +145,8 @@ typedef struct G2MContext {
|
||||
int got_header;
|
||||
|
||||
uint8_t *framebuf;
|
||||
int framebuf_stride, old_width, old_height;
|
||||
int framebuf_stride;
|
||||
unsigned int framebuf_allocated;
|
||||
|
||||
uint8_t *synth_tile, *jpeg_tile, *epic_buf, *epic_buf_base;
|
||||
int tile_stride, epic_buf_stride, old_tile_w, old_tile_h;
|
||||
@@ -1160,14 +1161,13 @@ static int g2m_init_buffers(G2MContext *c)
|
||||
{
|
||||
int aligned_height;
|
||||
|
||||
if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) {
|
||||
c->framebuf_stride = FFALIGN(c->width + 15, 16) * 3;
|
||||
aligned_height = c->height + 15;
|
||||
av_free(c->framebuf);
|
||||
c->framebuf = av_calloc(c->framebuf_stride, aligned_height);
|
||||
if (!c->framebuf)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
c->framebuf_stride = FFALIGN(c->width + 15, 16) * 3;
|
||||
aligned_height = c->height + 15;
|
||||
|
||||
av_fast_mallocz(&c->framebuf, &c->framebuf_allocated, c->framebuf_stride * aligned_height);
|
||||
if (!c->framebuf)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if (!c->synth_tile || !c->jpeg_tile ||
|
||||
(c->compression == 2 && !c->epic_buf_base) ||
|
||||
c->old_tile_w < c->tile_width ||
|
||||
@@ -1617,6 +1617,7 @@ static av_cold int g2m_decode_end(AVCodecContext *avctx)
|
||||
av_freep(&c->jpeg_tile);
|
||||
av_freep(&c->cursor);
|
||||
av_freep(&c->framebuf);
|
||||
c->framebuf_allocated = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ static int16_t long_term_filter(AudioDSPContext *adsp, int pitch_delay_int,
|
||||
if (tmp > 0)
|
||||
L_temp0 >>= tmp;
|
||||
else
|
||||
L_temp1 >>= -tmp;
|
||||
L_temp1 >>= FFMIN(-tmp, 31);
|
||||
|
||||
/* Check if longer filter increases the values of R'(k). */
|
||||
if (L_temp1 > L_temp0) {
|
||||
@@ -581,7 +581,7 @@ void ff_g729_postfilter(AudioDSPContext *adsp, int16_t* ht_prev_data, int* voici
|
||||
int16_t ff_g729_adaptive_gain_control(int gain_before, int gain_after, int16_t *speech,
|
||||
int subframe_size, int16_t gain_prev)
|
||||
{
|
||||
int gain; // (3.12)
|
||||
unsigned gain; // (3.12)
|
||||
int n;
|
||||
int exp_before, exp_after;
|
||||
|
||||
@@ -603,7 +603,7 @@ int16_t ff_g729_adaptive_gain_control(int gain_before, int gain_after, int16_t *
|
||||
gain = ((gain_before - gain_after) << 14) / gain_after + 0x4000;
|
||||
gain = bidir_sal(gain, exp_after - exp_before);
|
||||
}
|
||||
gain = av_clip_int16(gain);
|
||||
gain = FFMIN(gain, 32767);
|
||||
gain = (gain * G729_AGC_FAC1 + 0x4000) >> 15; // gain * (1-0.9875)
|
||||
} else
|
||||
gain = 0;
|
||||
|
||||
@@ -281,7 +281,7 @@ static int decode_slice(MpegEncContext *s)
|
||||
ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y,
|
||||
s->mb_x, s->mb_y, ER_MB_ERROR & part_mask);
|
||||
|
||||
if (s->avctx->err_recognition & AV_EF_IGNORE_ERR)
|
||||
if ((s->avctx->err_recognition & AV_EF_IGNORE_ERR) && get_bits_left(&s->gb) > 0)
|
||||
continue;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ static inline int get_nalsize(int nal_length_size, const uint8_t *buf,
|
||||
|
||||
if (*buf_index >= buf_size - nal_length_size) {
|
||||
// the end of the buffer is reached, refill it
|
||||
return AVERROR(EAGAIN);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
for (i = 0; i < nal_length_size; i++)
|
||||
|
||||
@@ -162,4 +162,3 @@ static void MCFUNC(hl_motion)(const H264Context *h, H264SliceContext *sl,
|
||||
if (USES_LIST(mb_type, 1))
|
||||
prefetch_motion(h, sl, 1, PIXEL_SHIFT, CHROMA_IDC);
|
||||
}
|
||||
|
||||
|
||||
@@ -646,10 +646,10 @@ static int h264_parse(AVCodecParserContext *s,
|
||||
int64_t num = time_base.num * (int64_t)avctx->pkt_timebase.den;
|
||||
if (s->dts != AV_NOPTS_VALUE) {
|
||||
// got DTS from the stream, update reference timestamp
|
||||
p->reference_dts = s->dts - av_rescale(s->dts_ref_dts_delta, num, den);
|
||||
p->reference_dts = av_sat_sub64(s->dts, av_rescale(s->dts_ref_dts_delta, num, den));
|
||||
} else if (p->reference_dts != AV_NOPTS_VALUE) {
|
||||
// compute DTS based on reference timestamp
|
||||
s->dts = p->reference_dts + av_rescale(s->dts_ref_dts_delta, num, den);
|
||||
s->dts = av_sat_add64(p->reference_dts, av_rescale(s->dts_ref_dts_delta, num, den));
|
||||
}
|
||||
|
||||
if (p->reference_dts != AV_NOPTS_VALUE && s->pts == AV_NOPTS_VALUE)
|
||||
|
||||
+4
-2
@@ -109,6 +109,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
float scale = 1.f / 8.f;
|
||||
unsigned b, chunk;
|
||||
int version, ret;
|
||||
unsigned hfr_group_count;
|
||||
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
|
||||
c->crc_table = av_crc_get_table(AV_CRC_16_ANSI);
|
||||
@@ -229,11 +230,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
if (c->total_band_count < c->base_band_count)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
c->hfr_group_count = ceil2(c->total_band_count - (c->base_band_count + c->stereo_band_count),
|
||||
hfr_group_count = ceil2(c->total_band_count - (c->base_band_count + c->stereo_band_count),
|
||||
c->bands_per_hfr_group);
|
||||
|
||||
if (c->base_band_count + c->stereo_band_count + (unsigned long)c->hfr_group_count > 128ULL)
|
||||
if (c->base_band_count + c->stereo_band_count + (uint64_t)hfr_group_count > 128ULL)
|
||||
return AVERROR_INVALIDDATA;
|
||||
c->hfr_group_count = hfr_group_count;
|
||||
|
||||
for (int i = 0; i < avctx->ch_layout.nb_channels; i++) {
|
||||
c->ch[i].chan_type = r[i];
|
||||
|
||||
@@ -1568,4 +1568,3 @@ void ff_hevc_hls_mvd_coding(HEVCLocalContext *lc, int x0, int y0, int log2_cb_si
|
||||
case 0: lc->pu.mvd.y = 0; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal,
|
||||
den = ps->sps->vui.vui_time_scale;
|
||||
}
|
||||
|
||||
if (num != 0 && den != 0)
|
||||
if (num > 0 && den > 0)
|
||||
av_reduce(&avctx->framerate.den, &avctx->framerate.num,
|
||||
num, den, 1 << 30);
|
||||
|
||||
|
||||
+13
-5
@@ -374,7 +374,7 @@ static void export_stream_params(HEVCContext *s, const HEVCSPS *sps)
|
||||
den = sps->vui.vui_time_scale;
|
||||
}
|
||||
|
||||
if (num != 0 && den != 0)
|
||||
if (num > 0 && den > 0)
|
||||
av_reduce(&avctx->framerate.den, &avctx->framerate.num,
|
||||
num, den, 1 << 30);
|
||||
}
|
||||
@@ -1523,7 +1523,8 @@ static void luma_mc_uni(HEVCLocalContext *lc, uint8_t *dst, ptrdiff_t dststride,
|
||||
|
||||
if (x_off < QPEL_EXTRA_BEFORE || y_off < QPEL_EXTRA_AFTER ||
|
||||
x_off >= pic_width - block_w - QPEL_EXTRA_AFTER ||
|
||||
y_off >= pic_height - block_h - QPEL_EXTRA_AFTER) {
|
||||
y_off >= pic_height - block_h - QPEL_EXTRA_AFTER ||
|
||||
ref == s->frame) {
|
||||
const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift;
|
||||
int offset = QPEL_EXTRA_BEFORE * srcstride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shift);
|
||||
int buf_offset = QPEL_EXTRA_BEFORE * edge_emu_stride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shift);
|
||||
@@ -1673,6 +1674,7 @@ static void chroma_mc_uni(HEVCLocalContext *lc, uint8_t *dst0,
|
||||
intptr_t my = av_mod_uintp2(mv->y, 2 + vshift);
|
||||
intptr_t _mx = mx << (1 - hshift);
|
||||
intptr_t _my = my << (1 - vshift);
|
||||
int emu = src0 == s->frame->data[1] || src0 == s->frame->data[2];
|
||||
|
||||
x_off += mv->x >> (2 + hshift);
|
||||
y_off += mv->y >> (2 + vshift);
|
||||
@@ -1680,7 +1682,8 @@ static void chroma_mc_uni(HEVCLocalContext *lc, uint8_t *dst0,
|
||||
|
||||
if (x_off < EPEL_EXTRA_BEFORE || y_off < EPEL_EXTRA_AFTER ||
|
||||
x_off >= pic_width - block_w - EPEL_EXTRA_AFTER ||
|
||||
y_off >= pic_height - block_h - EPEL_EXTRA_AFTER) {
|
||||
y_off >= pic_height - block_h - EPEL_EXTRA_AFTER ||
|
||||
emu) {
|
||||
const int edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift;
|
||||
int offset0 = EPEL_EXTRA_BEFORE * (srcstride + (1 << s->ps.sps->pixel_shift));
|
||||
int buf_offset0 = EPEL_EXTRA_BEFORE *
|
||||
@@ -1920,13 +1923,13 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int x0, int y0,
|
||||
|
||||
if (current_mv.pred_flag & PF_L0) {
|
||||
ref0 = refPicList[0].ref[current_mv.ref_idx[0]];
|
||||
if (!ref0)
|
||||
if (!ref0 || !ref0->frame->data[0])
|
||||
return;
|
||||
hevc_await_progress(s, ref0, ¤t_mv.mv[0], y0, nPbH);
|
||||
}
|
||||
if (current_mv.pred_flag & PF_L1) {
|
||||
ref1 = refPicList[1].ref[current_mv.ref_idx[1]];
|
||||
if (!ref1)
|
||||
if (!ref1 || !ref1->frame->data[0])
|
||||
return;
|
||||
hevc_await_progress(s, ref1, ¤t_mv.mv[1], y0, nPbH);
|
||||
}
|
||||
@@ -2590,6 +2593,11 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *hevc_lclist,
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
hls_sao_param(lc, x_ctb >> s->ps.sps->log2_ctb_size, y_ctb >> s->ps.sps->log2_ctb_size);
|
||||
|
||||
s->deblock[ctb_addr_rs].beta_offset = s->sh.beta_offset;
|
||||
s->deblock[ctb_addr_rs].tc_offset = s->sh.tc_offset;
|
||||
s->filter_slice_edges[ctb_addr_rs] = s->sh.slice_loop_filter_across_slices_enabled_flag;
|
||||
|
||||
more_data = hls_coding_quadtree(lc, x_ctb, y_ctb, s->ps.sps->log2_ctb_size, 0);
|
||||
|
||||
if (more_data < 0) {
|
||||
|
||||
@@ -695,9 +695,9 @@ static void decode_422_bitstream(HYuvDecContext *s, int count)
|
||||
/* TODO instead of restarting the read when the code isn't in the first level
|
||||
* of the joint table, jump into the 2nd level of the individual table. */
|
||||
#define READ_2PIX_PLANE16(dst0, dst1, plane){\
|
||||
dst0 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\
|
||||
dst0 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)*4;\
|
||||
dst0 += get_bits(&s->gb, 2);\
|
||||
dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\
|
||||
dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)*4;\
|
||||
dst1 += get_bits(&s->gb, 2);\
|
||||
}
|
||||
static void decode_plane_bitstream(HYuvDecContext *s, int width, int plane)
|
||||
@@ -755,7 +755,7 @@ static void decode_plane_bitstream(HYuvDecContext *s, int width, int plane)
|
||||
}
|
||||
}
|
||||
if( width&1 && get_bits_left(&s->gb)>0 ) {
|
||||
int dst = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;
|
||||
int dst = (unsigned)get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;
|
||||
s->temp16[0][width-1] = dst + get_bits(&s->gb, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,4 +45,3 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *p
|
||||
*loss_ptr = loss;
|
||||
return best;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,6 +171,9 @@ static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx,
|
||||
int luma_size, chroma_size;
|
||||
ptrdiff_t luma_pitch, chroma_pitch;
|
||||
|
||||
luma_width = FFALIGN(luma_width , 2);
|
||||
luma_height = FFALIGN(luma_height, 2);
|
||||
|
||||
if (luma_width < 16 || luma_width > 640 ||
|
||||
luma_height < 16 || luma_height > 480 ||
|
||||
luma_width & 1 || luma_height & 1) {
|
||||
|
||||
+10
-16
@@ -721,11 +721,10 @@ static void encode_cblk(Jpeg2000EncoderContext *s, Jpeg2000T1Context *t1, Jpeg20
|
||||
|
||||
if (max == 0){
|
||||
cblk->nonzerobits = 0;
|
||||
bpno = 0;
|
||||
} else{
|
||||
cblk->nonzerobits = av_log2(max) + 1 - NMSEDEC_FRACBITS;
|
||||
bpno = cblk->nonzerobits - 1;
|
||||
}
|
||||
bpno = cblk->nonzerobits - 1;
|
||||
|
||||
cblk->data[0] = 0;
|
||||
ff_mqc_initenc(&t1->mqc, cblk->data + 1);
|
||||
@@ -1531,6 +1530,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
int tileno, ret;
|
||||
Jpeg2000EncoderContext *s = avctx->priv_data;
|
||||
uint8_t *chunkstart, *jp2cstart, *jp2hstart;
|
||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
|
||||
|
||||
if ((ret = ff_alloc_packet(avctx, pkt, avctx->width*avctx->height*9 + AV_INPUT_BUFFER_MIN_SIZE)) < 0)
|
||||
return ret;
|
||||
@@ -1543,7 +1543,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
s->lambda = s->picture->quality * LAMBDA_SCALE;
|
||||
|
||||
if (avctx->pix_fmt == AV_PIX_FMT_BGR48 || avctx->pix_fmt == AV_PIX_FMT_GRAY16)
|
||||
if (s->cbps[0] > 8)
|
||||
copy_frame_16(s);
|
||||
else
|
||||
copy_frame_8(s);
|
||||
@@ -1587,7 +1587,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
bytestream_put_byte(&s->buf, 1);
|
||||
bytestream_put_byte(&s->buf, 0);
|
||||
bytestream_put_byte(&s->buf, 0);
|
||||
if (avctx->pix_fmt == AV_PIX_FMT_RGB24 || avctx->pix_fmt == AV_PIX_FMT_PAL8) {
|
||||
if ((desc->flags & AV_PIX_FMT_FLAG_RGB) || avctx->pix_fmt == AV_PIX_FMT_PAL8) {
|
||||
bytestream_put_be32(&s->buf, 16);
|
||||
} else if (s->ncomponents == 1) {
|
||||
bytestream_put_be32(&s->buf, 17);
|
||||
@@ -1717,6 +1717,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx)
|
||||
Jpeg2000EncoderContext *s = avctx->priv_data;
|
||||
Jpeg2000CodingStyle *codsty = &s->codsty;
|
||||
Jpeg2000QuantStyle *qntsty = &s->qntsty;
|
||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
|
||||
|
||||
s->avctx = avctx;
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "init\n");
|
||||
@@ -1729,7 +1730,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx)
|
||||
|
||||
if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && (s->pred != FF_DWT97_INT || s->format != CODEC_JP2)) {
|
||||
av_log(s->avctx, AV_LOG_WARNING, "Forcing lossless jp2 for pal8\n");
|
||||
s->pred = FF_DWT97_INT;
|
||||
s->pred = 1;
|
||||
s->format = CODEC_JP2;
|
||||
}
|
||||
|
||||
@@ -1759,20 +1760,13 @@ static av_cold int j2kenc_init(AVCodecContext *avctx)
|
||||
s->width = avctx->width;
|
||||
s->height = avctx->height;
|
||||
|
||||
s->ncomponents = desc->nb_components;
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (avctx->pix_fmt == AV_PIX_FMT_GRAY16 || avctx->pix_fmt == AV_PIX_FMT_RGB48)
|
||||
s->cbps[i] = 16;
|
||||
else
|
||||
s->cbps[i] = 8;
|
||||
s->cbps[i] = desc->comp[i].depth;
|
||||
}
|
||||
|
||||
if (avctx->pix_fmt == AV_PIX_FMT_RGB24 || avctx->pix_fmt == AV_PIX_FMT_RGB48){
|
||||
s->ncomponents = 3;
|
||||
} else if (avctx->pix_fmt == AV_PIX_FMT_GRAY8 || avctx->pix_fmt == AV_PIX_FMT_PAL8 || avctx->pix_fmt == AV_PIX_FMT_GRAY16){
|
||||
s->ncomponents = 1;
|
||||
} else{ // planar YUV
|
||||
if ((desc->flags & AV_PIX_FMT_FLAG_PLANAR) && s->ncomponents > 1) {
|
||||
s->planar = 1;
|
||||
s->ncomponents = 3;
|
||||
ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt,
|
||||
s->chroma_shift, s->chroma_shift + 1);
|
||||
if (ret)
|
||||
@@ -1810,7 +1804,7 @@ static const AVOption options[] = {
|
||||
{ "tile_height", "Tile Height", OFFSET(tile_height), AV_OPT_TYPE_INT, { .i64 = 256 }, 1, 1<<30, VE, },
|
||||
{ "pred", "DWT Type", OFFSET(pred), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, "pred" },
|
||||
{ "dwt97int", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" },
|
||||
{ "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" },
|
||||
{ "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "pred" },
|
||||
{ "sop", "SOP marker", OFFSET(sop), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, },
|
||||
{ "eph", "EPH marker", OFFSET(eph), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, },
|
||||
{ "prog", "Progression Order", OFFSET(prog), AV_OPT_TYPE_INT, { .i64 = 0 }, JPEG2000_PGOD_LRCP, JPEG2000_PGOD_CPRL, VE, "prog" },
|
||||
|
||||
@@ -323,6 +323,16 @@ static int get_siz(Jpeg2000DecoderContext *s)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (s->image_offset_x >= s->width || s->image_offset_y >= s->height) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "image offsets outside image");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (s->reduction_factor && (s->image_offset_x || s->image_offset_y) ){
|
||||
av_log(s->avctx, AV_LOG_ERROR, "reduction factor with image offsets is not fully implemented");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
s->ncomponents = ncomponents;
|
||||
|
||||
if (s->tile_width <= 0 || s->tile_height <= 0) {
|
||||
@@ -388,7 +398,7 @@ static int get_siz(Jpeg2000DecoderContext *s)
|
||||
dimy = FFMAX(dimy, ff_jpeg2000_ceildiv(o_dimy, s->cdy[i]));
|
||||
}
|
||||
|
||||
ret = ff_set_dimensions(s->avctx, dimx, dimy);
|
||||
ret = ff_set_dimensions(s->avctx, dimx << s->avctx->lowres, dimy << s->avctx->lowres);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -2471,6 +2481,14 @@ static av_cold int jpeg2000_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
Jpeg2000DecoderContext *s = avctx->priv_data;
|
||||
|
||||
if (avctx->lowres)
|
||||
av_log(avctx, AV_LOG_WARNING, "lowres is overriden by reduction_factor but set anyway\n");
|
||||
if (!s->reduction_factor && avctx->lowres < JPEG2000_MAX_RESLEVELS) {
|
||||
s->reduction_factor = avctx->lowres;
|
||||
}
|
||||
if (avctx->lowres != s->reduction_factor && avctx->lowres)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
ff_jpeg2000dsp_init(&s->dsp);
|
||||
ff_jpeg2000_init_tier1_luts();
|
||||
|
||||
|
||||
@@ -382,6 +382,19 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
|
||||
state->T3 = s->t3;
|
||||
state->reset = s->reset;
|
||||
ff_jpegls_reset_coding_parameters(state, 0);
|
||||
|
||||
/* Testing parameters here, we cannot test in LSE or SOF because
|
||||
* these interdepend and are allowed in either order
|
||||
*/
|
||||
if (state->maxval >= (1<<state->bpp) ||
|
||||
state->T1 > state->T2 ||
|
||||
state->T2 > state->T3 ||
|
||||
state->T3 > state->maxval ||
|
||||
state->reset > FFMAX(255, state->maxval)) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto end;
|
||||
}
|
||||
|
||||
ff_jpegls_init_state(state);
|
||||
|
||||
if (s->bits <= 8)
|
||||
|
||||
+28
-14
@@ -152,6 +152,8 @@ static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int src_len, i
|
||||
if (expected != (unsigned int)zstream->total_out) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %lu)\n",
|
||||
expected, zstream->total_out);
|
||||
if (expected > (unsigned int)zstream->total_out)
|
||||
return (unsigned int)zstream->total_out;
|
||||
return AVERROR_UNKNOWN;
|
||||
}
|
||||
return zstream->total_out;
|
||||
@@ -169,8 +171,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
int row, col;
|
||||
unsigned char *encoded = avpkt->data, *outptr;
|
||||
uint8_t *y_out, *u_out, *v_out;
|
||||
unsigned int width = avctx->width; // Real image width
|
||||
unsigned int height = avctx->height; // Real image height
|
||||
int width = avctx->width; // Real image width
|
||||
int height = avctx->height; // Real image height
|
||||
unsigned int mszh_dlen;
|
||||
unsigned char yq, y1q, uq, vq;
|
||||
int uqvq, ret;
|
||||
@@ -227,16 +229,19 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
break;
|
||||
case COMP_MSZH_NOCOMP: {
|
||||
int bppx2;
|
||||
int aligned_width = width;
|
||||
switch (c->imgtype) {
|
||||
case IMGTYPE_YUV111:
|
||||
case IMGTYPE_RGB24:
|
||||
bppx2 = 6;
|
||||
break;
|
||||
case IMGTYPE_YUV422:
|
||||
aligned_width &= ~3;
|
||||
case IMGTYPE_YUV211:
|
||||
bppx2 = 4;
|
||||
break;
|
||||
case IMGTYPE_YUV411:
|
||||
aligned_width &= ~3;
|
||||
case IMGTYPE_YUV420:
|
||||
bppx2 = 3;
|
||||
break;
|
||||
@@ -244,7 +249,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
bppx2 = 0; // will error out below
|
||||
break;
|
||||
}
|
||||
if (len < ((width * height * bppx2) >> 1))
|
||||
if (len < ((aligned_width * height * bppx2) >> 1))
|
||||
return AVERROR_INVALIDDATA;
|
||||
break;
|
||||
}
|
||||
@@ -276,12 +281,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
ret = zlib_decomp(avctx, buf + 8 + mthread_inlen, len - 8 - mthread_inlen,
|
||||
mthread_outlen, mthread_outlen);
|
||||
if (ret < 0) return ret;
|
||||
len = c->decomp_size;
|
||||
} else {
|
||||
int ret = zlib_decomp(avctx, buf, len, 0, c->decomp_size);
|
||||
if (ret < 0) return ret;
|
||||
len = ret;
|
||||
}
|
||||
encoded = c->decomp_buf;
|
||||
len = c->decomp_size;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@@ -309,8 +315,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
}
|
||||
break;
|
||||
case IMGTYPE_YUV422:
|
||||
pixel_ptr = 0;
|
||||
for (row = 0; row < height; row++) {
|
||||
pixel_ptr = row * width * 2;
|
||||
yq = uq = vq =0;
|
||||
for (col = 0; col < width/4; col++) {
|
||||
encoded[pixel_ptr] = yq -= encoded[pixel_ptr];
|
||||
@@ -326,8 +332,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
}
|
||||
break;
|
||||
case IMGTYPE_YUV411:
|
||||
pixel_ptr = 0;
|
||||
for (row = 0; row < height; row++) {
|
||||
pixel_ptr = row * width / 2 * 3;
|
||||
yq = uq = vq =0;
|
||||
for (col = 0; col < width/4; col++) {
|
||||
encoded[pixel_ptr] = yq -= encoded[pixel_ptr];
|
||||
@@ -403,6 +409,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
v_out[ col >> 1 ] = *encoded++ + 128;
|
||||
v_out[(col >> 1) + 1] = *encoded++ + 128;
|
||||
}
|
||||
if (col && col < width) {
|
||||
u_out[ col >> 1 ] = u_out[(col>>1) - 1];
|
||||
v_out[ col >> 1 ] = v_out[(col>>1) - 1];
|
||||
}
|
||||
|
||||
y_out -= frame->linesize[0];
|
||||
u_out -= frame->linesize[1];
|
||||
v_out -= frame->linesize[2];
|
||||
@@ -424,6 +435,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
u_out[col >> 2] = *encoded++ + 128;
|
||||
v_out[col >> 2] = *encoded++ + 128;
|
||||
}
|
||||
if (col && col < width) {
|
||||
u_out[col >> 2] = u_out[(col>>2) - 1];
|
||||
v_out[col >> 2] = v_out[(col>>2) - 1];
|
||||
}
|
||||
y_out -= frame->linesize[0];
|
||||
u_out -= frame->linesize[1];
|
||||
v_out -= frame->linesize[2];
|
||||
@@ -481,6 +496,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
FFALIGN(avctx->height, 4);
|
||||
unsigned int max_decomp_size;
|
||||
int subsample_h, subsample_v;
|
||||
int partial_h_supported = 0;
|
||||
|
||||
if (avctx->extradata_size < 8) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Extradata size too small.\n");
|
||||
@@ -502,26 +518,24 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 1:1:1.\n");
|
||||
break;
|
||||
case IMGTYPE_YUV422:
|
||||
c->decomp_size = basesize * 2;
|
||||
c->decomp_size = (avctx->width & ~3) * avctx->height * 2;
|
||||
max_decomp_size = max_basesize * 2;
|
||||
avctx->pix_fmt = AV_PIX_FMT_YUV422P;
|
||||
av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:2:2.\n");
|
||||
if (avctx->width % 4) {
|
||||
avpriv_request_sample(avctx, "Unsupported dimensions");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
partial_h_supported = 1;
|
||||
break;
|
||||
case IMGTYPE_RGB24:
|
||||
c->decomp_size = basesize * 3;
|
||||
c->decomp_size = FFALIGN(avctx->width*3, 4) * avctx->height;
|
||||
max_decomp_size = max_basesize * 3;
|
||||
avctx->pix_fmt = AV_PIX_FMT_BGR24;
|
||||
av_log(avctx, AV_LOG_DEBUG, "Image type is RGB 24.\n");
|
||||
break;
|
||||
case IMGTYPE_YUV411:
|
||||
c->decomp_size = basesize / 2 * 3;
|
||||
c->decomp_size = (avctx->width & ~3) * avctx->height / 2 * 3;
|
||||
max_decomp_size = max_basesize / 2 * 3;
|
||||
avctx->pix_fmt = AV_PIX_FMT_YUV411P;
|
||||
av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:1:1.\n");
|
||||
partial_h_supported = 1;
|
||||
break;
|
||||
case IMGTYPE_YUV211:
|
||||
c->decomp_size = basesize * 2;
|
||||
@@ -541,7 +555,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &subsample_h, &subsample_v);
|
||||
if (avctx->width % (1<<subsample_h) || avctx->height % (1<<subsample_v)) {
|
||||
if ((avctx->width % (1<<subsample_h) && !partial_h_supported) || avctx->height % (1<<subsample_v)) {
|
||||
avpriv_request_sample(avctx, "Unsupported dimensions");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
+30
-10
@@ -575,7 +575,13 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
{
|
||||
libx265Context *ctx = avctx->priv_data;
|
||||
x265_picture x265pic;
|
||||
x265_picture x265pic_out = { 0 };
|
||||
#if (X265_BUILD >= 210) && (X265_BUILD < 213)
|
||||
x265_picture x265pic_layers_out[MAX_SCALABLE_LAYERS];
|
||||
x265_picture* x265pic_lyrptr_out[MAX_SCALABLE_LAYERS];
|
||||
#else
|
||||
x265_picture x265pic_solo_out = { 0 };
|
||||
#endif
|
||||
x265_picture* x265pic_out;
|
||||
x265_nal *nal;
|
||||
x265_sei *sei;
|
||||
uint8_t *dst;
|
||||
@@ -698,8 +704,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
}
|
||||
}
|
||||
|
||||
#if (X265_BUILD >= 210) && (X265_BUILD < 213)
|
||||
for (i = 0; i < MAX_SCALABLE_LAYERS; i++)
|
||||
x265pic_lyrptr_out[i] = &x265pic_layers_out[i];
|
||||
|
||||
ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal,
|
||||
pic ? &x265pic : NULL, &x265pic_out);
|
||||
pic ? &x265pic : NULL, x265pic_lyrptr_out);
|
||||
#else
|
||||
ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal,
|
||||
pic ? &x265pic : NULL, &x265pic_solo_out);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < sei->numPayloads; i++)
|
||||
av_free(sei->payloads[i].payload);
|
||||
@@ -729,10 +743,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
pkt->flags |= AV_PKT_FLAG_KEY;
|
||||
}
|
||||
|
||||
pkt->pts = x265pic_out.pts;
|
||||
pkt->dts = x265pic_out.dts;
|
||||
#if (X265_BUILD >= 210) && (X265_BUILD < 213)
|
||||
x265pic_out = x265pic_lyrptr_out[0];
|
||||
#else
|
||||
x265pic_out = &x265pic_solo_out;
|
||||
#endif
|
||||
|
||||
switch (x265pic_out.sliceType) {
|
||||
pkt->pts = x265pic_out->pts;
|
||||
pkt->dts = x265pic_out->dts;
|
||||
|
||||
switch (x265pic_out->sliceType) {
|
||||
case X265_TYPE_IDR:
|
||||
case X265_TYPE_I:
|
||||
pict_type = AV_PICTURE_TYPE_I;
|
||||
@@ -750,16 +770,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
}
|
||||
|
||||
#if X265_BUILD >= 130
|
||||
if (x265pic_out.sliceType == X265_TYPE_B)
|
||||
if (x265pic_out->sliceType == X265_TYPE_B)
|
||||
#else
|
||||
if (x265pic_out.frameData.sliceType == 'b')
|
||||
if (x265pic_out->frameData.sliceType == 'b')
|
||||
#endif
|
||||
pkt->flags |= AV_PKT_FLAG_DISPOSABLE;
|
||||
|
||||
ff_side_data_set_encoder_stats(pkt, x265pic_out.frameData.qp * FF_QP2LAMBDA, NULL, 0, pict_type);
|
||||
ff_side_data_set_encoder_stats(pkt, x265pic_out->frameData.qp * FF_QP2LAMBDA, NULL, 0, pict_type);
|
||||
|
||||
if (x265pic_out.userData) {
|
||||
int idx = (int)(intptr_t)x265pic_out.userData - 1;
|
||||
if (x265pic_out->userData) {
|
||||
int idx = (int)(intptr_t)x265pic_out->userData - 1;
|
||||
ReorderedData *rd = &ctx->rd[idx];
|
||||
|
||||
#if FF_API_REORDERED_OPAQUE
|
||||
|
||||
+7
-2
@@ -473,8 +473,9 @@ static int zero_cmp(MpegEncContext *s, const uint8_t *a, const uint8_t *b,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type)
|
||||
int ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type)
|
||||
{
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
memset(cmp, 0, sizeof(void *) * 6);
|
||||
@@ -533,9 +534,13 @@ void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type)
|
||||
#endif
|
||||
default:
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"internal error in cmp function selection\n");
|
||||
"invalid cmp function selection\n");
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define BUTTERFLY2(o1, o2, i1, i2) \
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ void ff_me_cmp_init_ppc(MECmpContext *c, AVCodecContext *avctx);
|
||||
void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx);
|
||||
void ff_me_cmp_init_mips(MECmpContext *c, AVCodecContext *avctx);
|
||||
|
||||
void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type);
|
||||
int ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type);
|
||||
|
||||
void ff_dsputil_init_dwt(MECmpContext *c);
|
||||
|
||||
|
||||
@@ -309,6 +309,7 @@ int ff_init_me(MpegEncContext *s){
|
||||
MotionEstContext * const c= &s->me;
|
||||
int cache_size= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<<ME_MAP_SHIFT);
|
||||
int dia_size= FFMAX(FFABS(s->avctx->dia_size)&255, FFABS(s->avctx->pre_dia_size)&255);
|
||||
int ret;
|
||||
|
||||
if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -FFMIN(ME_MAP_SIZE, MAX_SAB_SIZE)){
|
||||
av_log(s->avctx, AV_LOG_ERROR, "ME_MAP size is too small for SAB diamond\n");
|
||||
@@ -324,10 +325,12 @@ int ff_init_me(MpegEncContext *s){
|
||||
av_log(s->avctx, AV_LOG_INFO, "ME_MAP size may be a little small for the selected diamond size\n");
|
||||
}
|
||||
|
||||
ff_set_cmp(&s->mecc, s->mecc.me_pre_cmp, c->avctx->me_pre_cmp);
|
||||
ff_set_cmp(&s->mecc, s->mecc.me_cmp, c->avctx->me_cmp);
|
||||
ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, c->avctx->me_sub_cmp);
|
||||
ff_set_cmp(&s->mecc, s->mecc.mb_cmp, c->avctx->mb_cmp);
|
||||
ret = ff_set_cmp(&s->mecc, s->mecc.me_pre_cmp, c->avctx->me_pre_cmp);
|
||||
ret |= ff_set_cmp(&s->mecc, s->mecc.me_cmp, c->avctx->me_cmp);
|
||||
ret |= ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, c->avctx->me_sub_cmp);
|
||||
ret |= ff_set_cmp(&s->mecc, s->mecc.mb_cmp, c->avctx->mb_cmp);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
c->flags = get_flags(c, 0, c->avctx->me_cmp &FF_CMP_CHROMA);
|
||||
c->sub_flags= get_flags(c, 0, c->avctx->me_sub_cmp&FF_CMP_CHROMA);
|
||||
|
||||
@@ -185,7 +185,7 @@ static YuvPixel mp_get_yuv_from_rgb(MotionPixelsContext *mp, int x, int y)
|
||||
int color;
|
||||
|
||||
color = *(uint16_t *)&mp->frame->data[0][y * mp->frame->linesize[0] + x * 2];
|
||||
return mp_rgb_yuv_table[color];
|
||||
return mp_rgb_yuv_table[color & 0x7FFF];
|
||||
}
|
||||
|
||||
static void mp_set_rgb_from_yuv(MotionPixelsContext *mp, int x, int y, const YuvPixel *p)
|
||||
|
||||
@@ -2956,6 +2956,10 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
GetBitContext *gb = &m->gb;
|
||||
int ret;
|
||||
|
||||
// Check for minimal intra MB size (considering mb header, luma & chroma dc VLC, ac EOB VLC)
|
||||
if (avpkt->size*8LL < (avctx->width+15)/16 * ((avctx->height+15)/16) * (2 + 3*4 + 2*2 + 2*6))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
ret = ff_get_buffer(avctx, frame, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user