Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b213175c9 |
@@ -1,23 +0,0 @@
|
||||
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
|
||||
@@ -1,29 +0,0 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release/7.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
|
||||
@@ -1,80 +0,0 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release/7.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-7.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,597 +1,6 @@
|
||||
Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version 7.0.3:
|
||||
avformat/libopenmpt: fix seeking weirdness
|
||||
avformat/hls: add cmfv/cmfa exceptions
|
||||
avformat/lrcdec: support arbitrary precision timestamp
|
||||
Changelog: update
|
||||
avcodec/ffv1dec: Disable frame threading due to race condition
|
||||
libavcodec/tests/motion: Add check for avcodec_alloc_context3()
|
||||
avcodec/tests/avpacket: Add av_free() to avoid memory leak
|
||||
examples: Add av_freep to avoid potential memory leak
|
||||
avcodec/tests/avpacket: Add av_packet_free() to avoid memory leak
|
||||
avcodec/fits: Clear naxis
|
||||
avcodec/vqavideo; Check bytestream2_get_buffer() reading next_codebook_buffer
|
||||
avcodec/lzf: Check for input space
|
||||
avcodec/imc: Clear padding of buf16
|
||||
avcodec/iff: Clear ham_buf
|
||||
avcodec/cri: Check bytestream2_get_buffer() for end
|
||||
avcodec/cri: Factor read_len out
|
||||
avformat/dashdec: Allocate space for appended "/"
|
||||
avcodec/mpegvideo_dec: Fix lowres=3 field select interlaced mpeg4 frame
|
||||
avformat/mxg: clear AV_INPUT_BUFFER_PADDING_SIZE
|
||||
avformat/vqf: Ensure that comm_chunk is fully read
|
||||
avformat/mov: make sure file_checksum is fully initialized
|
||||
avformat/asfdec_f: Check amount of value read
|
||||
avcodec/jpegxl_parser: add sanity check for frame size
|
||||
avformat/concatdec: Clip duration in one more case in get_best_effort_duration()
|
||||
avcodec/ffv1dec: Check k in get_vlc_symbol()
|
||||
avcodec/cfhd: Check idwt_buf size before allocation
|
||||
avcodec/ivi: Check luma/chroma mb_size
|
||||
avcodec/motion_est: don't add offsets to NULL pointers
|
||||
swscale/swscale_unscaled: don't add offsets to NULL pointers
|
||||
libavcodec/alsdec.c: Add check for av_malloc_array() and av_calloc()
|
||||
avcodec/psd: Move frame allocation after RLE processing
|
||||
avcodec/smacker: Move buffer allocation to later
|
||||
fftools/cmdutils: don't try to load arguments from file if not needed
|
||||
avcodec/opus: don't materialize buf pointer from null
|
||||
avfilter/avfilter: fix forwarding EOF for simple API filters in filter_activate_default
|
||||
avcodec/speexdec: consider differing frame sizes in remaining space check
|
||||
lavc/vvc: Fix condition for using default scaling factor
|
||||
avformat/iff: Check nb_channels == 0 in CHNL
|
||||
avcodec/osq: Request a coding mode 2 sample
|
||||
avcodec/osq: Switch back to av_ceil_log2()
|
||||
avcodec/osq: Add note about update_stats() count
|
||||
avcodec/osq: Fix signed integer overflow in update_stats()
|
||||
avcodec/mss2dsp: use FF_PTR_ADD to add offsets to a pointer
|
||||
avformat/movenc: fix writing reserved bits in EC3SpecificBox
|
||||
avcodec/hevc/hevcdec: Check num_entry_point_offsets
|
||||
avcodec/speexdec: Pass and check remaining packets to decode functions
|
||||
avcodec/rkmppdec: Fix double-free on error
|
||||
avformat/matroskadec: check that channels fit in signed 32bit int
|
||||
avcodec/takdec: Check remaining space for first predictors
|
||||
avcodec/svq3: Check there are bits left before decompression
|
||||
avcodec/sonic: Check num_taps
|
||||
avformat/imf_cpl: fix indention after previous commit
|
||||
avformat/imf_cpl: do not continue looping forever
|
||||
avformat/mov: reject negative ELST durations
|
||||
avformat/avidec: Ignore duplicate GAB2
|
||||
avcodec/h264_mb: Fix tmp_cr for arm
|
||||
avcodec/vorbisdec: Dont treat overread as error
|
||||
avformat/iff: Check nb_channels == 0 in MHDR
|
||||
tests/fate/filter-video: Fix dependancy for codecview
|
||||
libpostproc: check minimum size
|
||||
avformat/hls: Fix flash1.bogulus.cfd support
|
||||
avformat/hls: Split allowed_segment_extensions off allowed_extensions
|
||||
avformat/hls: Fix Youtube AAC
|
||||
avformat/hls: add fmp4 to allowed_extensions
|
||||
avformat/hls: Add ec3 to allowed_extensions
|
||||
avformat/hls: Add cmfv and cmfa to allowed_extensions
|
||||
postproc/postprocess_template: Fix reading uninitialized pixels in dering_C()
|
||||
configure: Clearer documentation for "disable-safe-bitstream-reader"
|
||||
avcodec/osq: avoid undefined negation
|
||||
swscale/output: Fix integer overflow in yuv2gbrp_full_X_c()
|
||||
avcodec/libtheora: fix setting keyframe_mask
|
||||
avfilter/buffersrc: check for valid sample rate
|
||||
doc: replace http/git by https urls
|
||||
configure: update copyright year
|
||||
avformat/hls: Partially revert "reduce default max reload to 3"
|
||||
aacenc_tns: clamp filter direction energy measurement
|
||||
fftools/ffmpeg_demux: don't flag timestamps as unreliable if they are generated
|
||||
configure: Use MSYSTEM_CARCH for default arch on msys2
|
||||
avfilter/avfiltergraph: fix regression in picking channel layout
|
||||
configure: Enable -fno-common for Darwin targets, avoid linker warnings
|
||||
configure: Only try to use the -no_warn_duplicate_libraries flag on Darwin
|
||||
configure: Silence Xcode warnings about duplicate libraries
|
||||
lsws/ppc/yuv2rgb_altivec: Fix build in non-VSX environments with Clang v2
|
||||
lsws/ppc/yuv2rgb_altivec: Fix build in non-VSX environments with Clang
|
||||
Changelog: update
|
||||
doc/t2h: Support texinfo 7.1 and 7.2 pretest
|
||||
avformat/iamf_parse: ensure there's at most one of each parameter types in audio elements
|
||||
avformat/iamf_parse: add missing constrains for num_parameters in audio_element_oub()
|
||||
avformat/iamf_parse: add missing av_free() call on failure path
|
||||
avformat/iamf_writer: ensure the stream groups are not empty
|
||||
avformat/iamf_writer: fix setting num_samples_per_frame for OPUS
|
||||
avformat/iamf_parse: fix setting duration for the last subblock in a parameter definition
|
||||
avformat/iamf_parse: add checks to parameter definition durations
|
||||
avformat/iamfdec: don't set individual streams as dependent
|
||||
avformat/iff: Check that we have a stream in read_dst_frame()
|
||||
avformat/mlvdec: fix size checks
|
||||
avformat/wavdec: Fix overflow of intermediate in block_align check
|
||||
avformat/mxfdec: Check edit unit for overflow in mxf_set_current_edit_unit()
|
||||
avformat/hls: Fix twitter
|
||||
libavformat/hls: Be more restrictive on mpegts extensions
|
||||
avformat/hls: .ts is always ok even if its a mov/mp4
|
||||
avcodec/h263dec: Check against previous dimensions instead of coded
|
||||
avformat/hls: Print input format in error message
|
||||
avformat/hls: Be more picky on extensions
|
||||
avformat/mxfdec: Check avio_read() success in mxf_decrypt_triplet()
|
||||
avcodec/huffyuvdec: Initialize whole output for decode_gray_bitstream()
|
||||
avformat/iamf_reader: Initialize padding and check read in ff_iamf_read_packet()
|
||||
avformat/ipmovie: Check signature_buffer read
|
||||
avformat/wtvdec: Initialize buf
|
||||
avcodec/cbs_vp9: Initialize VP9RawSuperframeIndex
|
||||
avformat/vqf: Propagate errors from add_metadata()
|
||||
avformat/vqf: Check avio_read() in add_metadata()
|
||||
avformat/dashdec: Check whitelist
|
||||
avutil/avstring: dont mess with NULL pointers in av_match_list()
|
||||
avfilter/vf_v360: Fix NULL pointer use
|
||||
avcodec/mpegvideo_enc: Check FLV1 resolution limits
|
||||
avcodec/ffv1enc: Fix handling of 32bit unsigned symbols
|
||||
avformat/mov: Factorize sanity check out
|
||||
avcodec/vc1dec: Clear block_index in vc1_decode_reset()
|
||||
avcodec/aacsbr_template: Clear n_q on error
|
||||
avformat/iamf_parse: Check output_channel_count
|
||||
avcodec/osq: Fixes several undefined overflows in do_decode()
|
||||
swscale/output: Fix undefined overflow in yuv2rgba64_full_X_c_template()
|
||||
avfilter/af_pan: Fix sscanf() use
|
||||
avfilter/vf_grayworld: Use the correct pointer for av_log()
|
||||
avfilter/vf_addroi: Add missing NULL termination to addroi_var_names[]()
|
||||
avcodec/get_buffer: Use av_buffer_mallocz() for audio same as its done for video
|
||||
avformat/jpegxl_anim_dec: clear buffer padding
|
||||
avformat/rmdec: check that buf if completely filled
|
||||
avcodec/cfhdenc: Clear dwt_tmp
|
||||
avcodec/hapdec: Clear tex buffer
|
||||
avformat/mxfdec: Check that key was read sucessfull
|
||||
avformat/rpl: Fix check for negative values
|
||||
avformat/mlvdec: Check avio_read()
|
||||
avcodec/utils: Fix block align overflow for ADPCM_IMA_WAV
|
||||
avformat/matroskadec: Check pre_ns for overflow
|
||||
tools/target_dec_fuzzer: Adjust threshold for EACMV
|
||||
tools/target_dec_fuzzer: Adjust threshold for MVC1
|
||||
tools/target_dec_fuzzer: Adjust Threshold for indeo5
|
||||
avutil/timecode: Avoid fps overflow in av_timecode_get_smpte_from_framenum()
|
||||
avcodec/webp: Check ref_x/y
|
||||
avcodec/ilbcdec: Initialize tempbuff2
|
||||
avformat/qcp: Check for read failure in header
|
||||
avcodec/eatgq: Check bytestream2_get_buffer() for failure
|
||||
avformat/dxa: check bpc
|
||||
swscale/slice: clear allocated memory in alloc_lines()
|
||||
avcodec/h2645_parse: Ignore NAL with nuh_layer_id == 63
|
||||
avformat/iamf_parse: reject ambisonics mode > 1
|
||||
avcodec/mjpegdec: Disallow progressive bayer images
|
||||
avformat/icodec: fix integer overflow with nb_pal
|
||||
doc/developer: Document relationship between git accounts and MAINTAINERS
|
||||
doc/infra: Document trac backup system
|
||||
doc/infra: Document gitolite
|
||||
avformat/vividas: Check avio_read() for failure
|
||||
avformat/ilbc: Check avio_read() for failure
|
||||
avformat/nistspheredec: Clear buffer
|
||||
avformat/mccdec: Initialize and check rate.den
|
||||
avformat/rpl: check channels
|
||||
INSTALL: explain the circular dependency issue and solution
|
||||
avformat/mpegts: Initialize predefined_SLConfigDescriptor_seen
|
||||
avformat/mxfdec: Fix overflow in midpoint computation
|
||||
swscale/output: used unsigned for bit accumulation
|
||||
avcodec/rangecoder: only perform renorm check/loop for callers that need it
|
||||
avcodec/ffv1dec: Fix end computation with ec=2
|
||||
avcodec/ffv1enc: Prevent generation of files with broken slices
|
||||
avformat/matroskadec: Check desc_bytes so bits fit in 64bit
|
||||
avformat/mov: Avoid overflow in dts
|
||||
avcodec/ffv1enc: Correct error message about unsupported version
|
||||
avcodec/ffv1enc: Slice combination is unsupported
|
||||
avcodec/ffv1enc: 2Pass mode is not possible with golomb coding
|
||||
avcodec/ffv1enc: Fix >8bit context size
|
||||
avcodec/xan: Add basic input size check
|
||||
avcodec/imm4: Check input size
|
||||
avcodec/svq3: Check for minimum size input
|
||||
avcodec/eacmv: Check input size for intra frames
|
||||
tools/target_dec_fuzzer: Adapt threshold for RASC
|
||||
avcodec/encode: Check bitrate
|
||||
avcodec/cbs_h266_syntax_template: Check bit depth with range extension
|
||||
avcodec/osq: use unsigned for decorrelation
|
||||
avcodec/jfdctint_template: use unsigned z* in row_fdct()
|
||||
avformat/asf: Check picsize
|
||||
avcodec/osq: Treat sum = 0 as k = 0
|
||||
avformat/mxfdec: Check timecode for overflow
|
||||
avformat/mxfdec: More offset_temp checks
|
||||
avformat/flvdec: Free metaVideoColor
|
||||
swscale/output: Fix undefined integer overflow in yuv2rgba64_2_c_template()
|
||||
swscale/swscale: Use unsigned operation to avoid undefined behavior
|
||||
avcodec/vc2enc: basic sanity check on slice_max_bytes
|
||||
avformat/mvdec: Check if name was fully read
|
||||
avcodec/wmavoice: Do not use uninitialized pitch[0]
|
||||
avformat/argo_brp: Check that ASF chunk header is completely read
|
||||
avcodec/notchlc: Check bytes left before reading
|
||||
avcodec/vc1_block: propagate error codes
|
||||
avformat/apetag: Check APETAGEX
|
||||
avcodec/magicyuvenc: better slice height
|
||||
avcodec/avcodec: Warn about data returned from get_buffer*()
|
||||
avformat/av1dec: Better fix for 70872/clusterfuzz-testcase-minimized-ffmpeg_dem_OBU_fuzzer-6005782487826432
|
||||
avcodec/apac: Fix discards ‘const’ qualifier
|
||||
avcodec/alsdec: clear last_acf_mantissa
|
||||
avcodec/aic: Clear slice_data
|
||||
avcodec/vc1dec: Clear mb_type_base and ttblk_base
|
||||
avcodec/shorten: clear padding
|
||||
avformat/mpeg: Check an avio_read() for failure
|
||||
avcodec/apac: Clean padding space
|
||||
avcodec/mvha: Clear remaining space after inflate()
|
||||
bsf/media100_to_mjpegb: Clear output buffer padding
|
||||
avformat/iamfdec: Check nb_layers before dereferencing layer
|
||||
avformat/av1dec: Check bits left before get_leb128()
|
||||
avformat/segafilm: Set keyframe
|
||||
avcodec/sga: av_assert1 check init_get_bits8()
|
||||
tools/target_dec_fuzzer: Check that FFv1 doesnt leave uninitialized memory in its buffers
|
||||
avdevice/dshow: Initialize 2 pointers
|
||||
avcodec/dxva2: initialize hr in ff_dxva2_common_end_frame()
|
||||
avcodec/dxva2: initialize validate
|
||||
avcodec/dxva2: Initialize ConfigBitstreamRaw
|
||||
avcodec/dxva2: Initialize dxva_size and check it
|
||||
avfilter/vf_xfade: Compute w2, h2 with float
|
||||
avfilter/vf_v360: Assert that vf was initialized
|
||||
avfilter/vf_tonemap_opencl: Dereference after NULL check
|
||||
avfilter/af_surround: Check output format
|
||||
avfilter/vf_xfade_opencl: Check ff_inlink_consume_frame() for failure
|
||||
avformat/lmlm4: Eliminate some AVERROR(EIO)
|
||||
tools/target_dec_fuzzer: Use av_buffer_allocz() to avoid missing slices to have unpredictable content
|
||||
avformat/wtvdec: Check length of read mpeg2_descriptor
|
||||
avformat/wtvdec: clear sectors
|
||||
avcodec/parser: ensure input padding is zeroed
|
||||
avformat/jpegxl_anim_dec: ensure input padding is zeroed
|
||||
avformat/img2dec: Clear padding data after EOF
|
||||
avformat/wavdec: Check if there are 16 bytes before testing them
|
||||
avformat/mov: (v4) fix get_eia608_packet
|
||||
configure: Improve the check for the rsync --contimeout option
|
||||
rtmpproto: Avoid rare crashes in the fail: codepath in rtmp_open
|
||||
lavc/aarch64: Fix ff_pred16x16_plane_neon_10
|
||||
lavc/aarch64: Fix ff_pred8x8_plane_neon_10
|
||||
vp9: recon: Use emulated edge to prevent buffer overflows
|
||||
arm: vp9mc: Load only 12 pixels in the 4 pixel wide horizontal filter
|
||||
aarch64: vp9mc: Load only 12 pixels in the 4 pixel wide horizontal filter
|
||||
avfilter/f_loop: fix aloop activate logic
|
||||
avfilter/f_loop: fix length of aloop leftover buffer
|
||||
avcodec/jpegxl_parser: fix reading lz77-pair as initial entropy symbol
|
||||
avcodec/jpegxl_parser: check entropy_decoder_read_symbol return value
|
||||
fftools/ffplay: fix crash when vk renderer is null
|
||||
avutil/wchar_filename: re-introduce explicit cast of void* to char*
|
||||
avcodec/libx265: unbreak build for X265_BUILD >= 213
|
||||
avutil/iamf: fix doxygen
|
||||
avformat/mov_chan: add extra checks to channel description count
|
||||
lavc/hevcdec: set per-CTB filter parameters for WPP
|
||||
lavc/hevc: check framerate num/den to be strictly positive
|
||||
lavc/libx265: unbreak build for X265_BUILD >= 210
|
||||
avformat/libzmq: fix check for zmq protocol prefix
|
||||
configure: improve check for POSIX ioctl
|
||||
configure: restore autodetection of v4l2 and fbdev
|
||||
avformat/iamf_parse: Fix return of uninitialized value
|
||||
avformat/iamf_parse: use get_bits_long() to read the remaining AAC extradata bits
|
||||
avformat/iamf_parse: fix parsing AAC DecoderConfigDescriptor
|
||||
avformat/isom: make parameters used for loging a pointer to void
|
||||
avformat/iamf_parse: clear padding
|
||||
avformat/hlsenc: correctly reset subtitle stream counter per-varstream
|
||||
libavcodec/arm/mlpdsp_armv5te: fix label format to work with binutils 2.43
|
||||
avformat/iamf_parse: ignore Audio Elements with an unsupported type
|
||||
lavc/vaapi_av1: Avoid sending the same slice buffer multiple times
|
||||
lavc/vaapi_decode: Make it possible to send multiple slice params buffers
|
||||
avformat/mov: fix track handling when mixing IAMF and video tracks
|
||||
|
||||
version 7.0.2:
|
||||
avcodec/snow: Fix off by 1 error in run_buffer
|
||||
avcodec/utils: apply the same alignment to YUV410 as we do to YUV420 for snow
|
||||
avformat/iamf_parse: Check for 0 samples
|
||||
swscale: [loongarch] Fix checkasm-sw_yuv2rgb failure.
|
||||
avcodec/aacps_tablegen_template: don't redefine CONFIG_HARDCODED_TABLES
|
||||
avutil/hwcontext_vaapi: use the correct type for VASurfaceAttribExternalBuffers.buffers
|
||||
avcodec/pcm-bluray/dvd: Use correct pointer types on BE
|
||||
avcodec/pngenc: fix sBIT writing for indexed-color PNGs
|
||||
avcodec/pngdec: use 8-bit sBIT cap for indexed PNGs per spec
|
||||
avformat/mov: check that child boxes of trak are only present inside it
|
||||
avformat/mov: check that sample and chunk count is 1 for HEIF
|
||||
avcodec/videotoolboxenc: Fix bitrate doesn't work as expected
|
||||
avdevice/dshow: Don't skip audio devices if no video device is present
|
||||
avcodec/hdrenc: Allocate more space
|
||||
avcodec/cfhdenc: Height of 16 is not supported
|
||||
avcodec/cfhdenc: Allocate more space
|
||||
avcodec/osq: fix integer overflow when applying factor
|
||||
avcodec/osq: avoid using too large numbers for shifts and integers in update_residue_parameter()
|
||||
avcodec/vaapi_encode: Check hwctx
|
||||
avcodec/proresdec: Consider negative bits left
|
||||
avcodec/alsdec: Clear shift_value
|
||||
avcodec/hevc/hevcdec: Do not allow slices to depend on failed slices
|
||||
avformat/mov: add an EOF check in IPRP
|
||||
avfilter/vf_xfade: Check ff_inlink_consume_frame() for failure
|
||||
avutil/slicethread: Check pthread_*_init() for failure
|
||||
avutil/frame: Check log2_crop_align
|
||||
avutil/buffer: Check ff_mutex_init() for failure
|
||||
avformat/xmv: Check this_packet_size
|
||||
avformat/webpenc: Check filesize in trailer
|
||||
avformat/ty: rec_size seems to only need 32bit
|
||||
avformat/tty: Check avio_size()
|
||||
avformat/siff: Basic pkt_size check
|
||||
avformat/sauce: Check avio_size() for failure
|
||||
avformat/sapdec: Check ffurl_get_file_handle() for error
|
||||
avformat/nsvdec: Check asize for PCM
|
||||
avformat/mp3dec: Check header_filesize
|
||||
avformat/mp3dec; Check for avio_size() failure
|
||||
avformat/mov: Use 64bit for str_size
|
||||
avformat/mm: Check length
|
||||
avformat/hnm: Check *chunk_size
|
||||
avformat/hlsenc: Check ret
|
||||
avformat/bintext: Check avio_size() return
|
||||
avformat/asfdec_o: Check size of index object
|
||||
avfilter/vf_scale: Check ff_scale_adjust_dimensions() for failure
|
||||
avfilter/scale_eval: Use 64bit, check values in ff_scale_adjust_dimensions()
|
||||
avfilter/vf_lut3d: Check av_scanf()
|
||||
avfilter/vf_elbg: Use unsigned for shifting into the top bit
|
||||
avfilter/vf_premultiply: Use AV_PIX_MAX_PLANES
|
||||
avfilter/vf_deshake_opencl: Ensure that the first iteration initializes the best variables
|
||||
avformat/iamf_parse: Check for negative sample sizes
|
||||
swscale/output: Fix integer overflows in yuv2rgba64_X_c_template
|
||||
avformat/mxfdec: Reorder elements of expression in bisect loop
|
||||
avutil/timecode: Use a 64bit framenum internally
|
||||
avcodec/pnmdec: Use 64bit for input size check
|
||||
avformat/mov: Check extradata in mov_read_iacb()
|
||||
avcodec/mpeg12enc: Use av_rescale() in vbv_buffer_size computation
|
||||
avcodec/utvideoenc: Use unsigned shift to build flags
|
||||
avcodec/j2kenc: Merge dwt_norm into lambda
|
||||
avcodec/vc2enc: Fix overflows with storing large values
|
||||
avcodec/mpegvideo_enc: Do not duplicate pictures on shifting
|
||||
avdevice/dshow_capture: Fix error handling in ff_dshow_##prefix##_Create()
|
||||
avcodec/tiff: Check value on positive signed targets
|
||||
avfilter/vf_convolution_opencl: Assert that the filter name is one of the filters
|
||||
avfilter/vf_bm3d: Dont round MSE2SSE to an integer
|
||||
avdevice/dshow: Remove NULL check on pin
|
||||
avdevice/dshow: check ff_dshow_pin_ConnectionMediaType() for failure
|
||||
avdevice/dshow: Check device_filter_unique_name before use
|
||||
avdevice/dshow: Cleanup also on av_log case
|
||||
avdevice/dshow_filter: Use wcscpy_s()
|
||||
avcodec/flac_parser: Assert that we do not overrun the link_penalty array
|
||||
avcodec/osq: avoid signed overflow in downsample path
|
||||
avcodec/pixlet: Simplify pfx computation
|
||||
avcodec/motion_est: Fix score squaring overflow
|
||||
avcodec/mlpenc: Use 64 for ml, mr
|
||||
avcodec/loco: Check loco_get_rice() for failure
|
||||
avcodec/loco: check get_ur_golomb_jpegls() for failure
|
||||
avcodec/leaddec: Check init_get_bits8() for failure
|
||||
avcodec/imm4: check cbphi for error
|
||||
avcodec/iff: Use signed count
|
||||
avcodec/golomb: Assert that k is in the supported range for get_ur/sr_golomb()
|
||||
avcodec/golomb: Document return for get_ur_golomb_jpegls() and get_sr_golomb_flac()
|
||||
avcodec/dxv: Fix type in get_opcodes()
|
||||
avcodec/cri: Check length
|
||||
avcodec/xsubdec: Check parse_timecode()
|
||||
avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit
|
||||
avfilter/vf_tiltandshift: Free dst on error
|
||||
doc/examples/mux: remove nop
|
||||
avcodec/proresenc_kostya: use unsigned alpha for rotation
|
||||
avformat/rtpenc_rfc4175: Use 64bit in computation if copy_offset
|
||||
avformat/rtmpproto: Use AV_DICT_MATCH_CASE instead of litteral number
|
||||
avformat/rtmppkt: Simplify and deobfuscate amf_tag_skip() slightly
|
||||
avformat/rmdec: use 64bit for audio_framesize checks
|
||||
avutil/wchar_filename: Correct sizeof
|
||||
avutil/hwcontext_d3d11va: correct sizeof IDirect3DSurface9
|
||||
avutil/hwcontext_d3d11va: Free AVD3D11FrameDescriptor on error
|
||||
avutil/hwcontext_d3d11va: correct sizeof AVD3D11FrameDescriptor
|
||||
avcodec/vvc/refs: Use unsigned mask
|
||||
doc/examples/vaapi_encode: Try to check fwrite() for failure
|
||||
avformat/usmdec: Initialize value
|
||||
avformat/tls_schannel: Initialize ret
|
||||
avformat/subfile: Assert that whence is a known case
|
||||
avformat/subfile: Merge if into switch()
|
||||
avformat/rtsp: Check that lower transport is handled in one of the if()
|
||||
avformat/rtsp: initialize reply1
|
||||
avformat/rtsp: use < 0 for error check
|
||||
avformat/rtpenc_vc2hq: Check sizes
|
||||
avfilter/af_aderivative: Free out on error
|
||||
swscale/swscale: Use ptrdiff_t for linesize computations
|
||||
avfilter/af_amerge: Cleanup on av_channel_layout_copy() failure
|
||||
avfilter/af_afir: Assert format
|
||||
avfilter/af_afftdn: Assert format
|
||||
avfilter/af_pan: check nb_output_channels before use
|
||||
cbs_av1: Reject thirty-two zero bits in uvlc code
|
||||
avfilter/af_mcompand: compute half frequency in double
|
||||
avfilter/af_channelsplit: Assert that av_channel_layout_channel_from_index() succeeds
|
||||
avfilter/af_aresample: Cleanup on av_channel_layout_copy() failure
|
||||
tools/coverity: Phase 1 study of anti-halicogenic for coverity av_rescale()
|
||||
avfilter/vf_avgblur: Check plane instead of AVFrame
|
||||
avfilter/drawutils: Fix depthb computation
|
||||
avfilter/avf_showcwt: Check av_parse_video_rate() for failure
|
||||
avformat/rdt: Check pkt_len
|
||||
avformat/mpeg: Check len in mpegps_probe()
|
||||
avformat/mxfenc: resurrects the error print
|
||||
avdevice/dshow: Check ICaptureGraphBuilder2_SetFiltergraph() for failure
|
||||
avcodec/mfenc: check IMFSample_ConvertToContiguousBuffer() for failure
|
||||
avcodec/vc1_loopfilter: Factor duplicate code in vc1_b_h_intfi_loop_filter()
|
||||
avcodec/vvc/ctu: Remove dead ret check
|
||||
avcodec/vvc/dec: Remove constant eos_at_start
|
||||
avformat/img2dec: assert no pipe on ts_from_file
|
||||
avcodec/cbs_jpeg: Try to move the read entity to one side in a test
|
||||
fftools/ffplay: Check vulkan_params
|
||||
fftools/ffmpeg_enc: Initialize Decoder
|
||||
fftools/ffmpeg_enc: Initialize fd
|
||||
fftools/ffmpeg_enc: simplify opaque_ref check
|
||||
avformat/mov: Check edit list for overflow
|
||||
fftools/ffmpeg: Check read() for failure
|
||||
avcodec/vvc/dec: Check ff_init_cabac_decoder() for failure
|
||||
MAINTAINERS: Add Timo Rothenpieler to server admins
|
||||
swscale/output: Avoid undefined overflow in yuv2rgb_write_full()
|
||||
swscale/output: alpha can become negative after scaling, use multiply
|
||||
avcodec/targaenc: Allocate space for the palette
|
||||
avcodec/r210enc: Use av_rescale for bitrate
|
||||
avcodec/jfdctint_template: Fewer integer anomalies
|
||||
avcodec/snowenc: MV limits due to mv_penalty table size
|
||||
tools/target_dec_fuzzer: Adjust threshold for MV30
|
||||
tools/target_dec_fuzzer: Adjust threshold for jpeg2000
|
||||
avformat/mxfdec: Check container_ul->desc before use
|
||||
avcodec/libvpxenc: Cleanup on error
|
||||
MAINTAINERS: Update the entries for the release maintainer for FFmpeg
|
||||
doc/developer: Provide information about git send-email and gmail
|
||||
avfilter/vf_rotate: Check ff_draw_init2() return value
|
||||
avformat/mov: Use int64_t in intermediate for corrected_dts
|
||||
avformat/mov: Use 64bit in intermediate for current_dts
|
||||
avformat/matroskadec: Assert that num_levels is non negative
|
||||
avformat/libzmq: Check av_strstart()
|
||||
avformat/img2dec: Little JFIF / Exif cleanup
|
||||
avformat/img2dec: Move DQT after unrelated if()
|
||||
avformat/imfdec: Simplify get_next_track_with_minimum_timestamp()
|
||||
avdevice/xcbgrab: Check sscanf() return
|
||||
fftools/cmdutils: Add protective () to FLAGS
|
||||
avformat/sdp: Check before appending ","
|
||||
avcodec/libx264: Check init_get_bits8() return code
|
||||
avcodec/ilbcdec: Remove dead code
|
||||
avcodec/vp8: Check cond init
|
||||
avcodec/vp8: Check mutex init
|
||||
avcodec/proresenc_anatoliy: Assert that AV_PROFILE_UNKNOWN is replaced
|
||||
avcodec/pcm-dvdenc: 64bit pkt-size
|
||||
avcodec/notchlc: Check init_get_bits8() for failure
|
||||
avcodec/tests/dct: Use 64bit in intermediate for error computation
|
||||
avcodec/scpr3: Check add_dec() for failure
|
||||
avcodec/rv34: assert that size is not 0 in rv34_gen_vlc_ext()
|
||||
avcodec/wavpackenc: Use unsigned for potential 31bit shift
|
||||
avcodec/vvc/mvs: Initialize mvf
|
||||
avcodec/tests/jpeg2000dwt: Use 64bit in comparission
|
||||
avcodec/tests/jpeg2000dwt: Use 64bit in err2 computation
|
||||
avformat/fwse: Remove always false expression
|
||||
avcodec/sga: Make it clear that the return is intentionally not checked
|
||||
avformat/asfdec_f: Use 64bit for preroll computation
|
||||
avformat/argo_asf: Use 64bit in offset intermediate
|
||||
avformat/ape: Use 64bit for final frame size
|
||||
avformat/ac4dec: Check remaining space in ac4_probe()
|
||||
avdevice/pulse_audio_enc: Use av_rescale() to avoid integer overflow
|
||||
avcodec/vlc: Cleanup on multi table alloc failure in ff_vlc_init_multi_from_lengths()
|
||||
avcodec/tiff: Assert init_get_bits8() success in unpack_gray()
|
||||
avcodec/tiff: Assert init_get_bits8() success in horizontal_fill()
|
||||
tools/decode_simple: Check avcodec_send_packet() for errors on flushing
|
||||
swscale/yuv2rgb: Use 64bit for brightness computation
|
||||
swscale/x86/swscale: use a clearer name for INPUT_PLANER_RGB_A_FUNC_CASE
|
||||
avutil/tests/opt: Check av_set_options_string() for failure
|
||||
avutil/tests/dict: Check av_dict_set() before get for failure
|
||||
avdevice/dshow: fix badly indented line
|
||||
avformat/demux: resurrect dead stores
|
||||
avcodec/tests/bitstream_template: Assert bits_init8() return
|
||||
tools/enc_recon_frame_test: Assert that av_image_get_linesize() succeeds
|
||||
avformat/iamf_writer: disallow Opus extradata with mapping family other than 0
|
||||
avformat/iamf_parse: sanitize audio_roll_distance values
|
||||
avformat/iamf: byteswap values in OpusHeader
|
||||
avformat/iamf: rename Codec Config seek_preroll to audio_roll_distance
|
||||
avformat/iamf_writer: fix coded audio_roll_distance values
|
||||
avformat/iamf_writer: fix PCM endian-ness flag
|
||||
avformat/movenc: fix channel count and samplerate fields for IAMF tracks
|
||||
avformat/iamf_parse: keep substream count consistent
|
||||
avformat/iamf_parse: add missing padding to AAC extradata
|
||||
avformat/iamf_parse: 0 layers are not allowed
|
||||
avformat/iamf_parse: consider nb_substreams when accessing substreams array
|
||||
avformat/iamf_parse: Remove dead case
|
||||
avcodec/png: more informative error message for invalid sBIT size
|
||||
avcodec/pngdec: avoid erroring with sBIT on indexed-color images
|
||||
avfilter/vf_tiltandshift: fix buffer offset for yuv422p input
|
||||
avutil/timestamp: avoid possible FPE when 0 is passed to av_ts_make_time_string2()
|
||||
avformat/mov: add more checks for infe atom size
|
||||
avformat/mov: check for EOF inside the infe list parsing loop
|
||||
avformat/mov: check extent_offset calculation for overflow
|
||||
avformat/mov: check that iloc offset values fit on an int64_t
|
||||
avcodec/pngenc: fix mDCv typo
|
||||
avcodec/pngdec: fix mDCv typo
|
||||
avcodec/nvenc: fix segfault in intra-only mode
|
||||
avdevice/avfoundation: add external video devices
|
||||
aarch64: Add OpenBSD runtime detection of dotprod and i8mm using sysctl
|
||||
fftools/ffplay_renderer: use correct NULL value for Vulkan type
|
||||
qsv: Initialize impl_value
|
||||
avutil/hwcontext_qsv: fix GCC 14.1 warnings
|
||||
avcodec/mediacodecenc: workaround the alignment requirement for H.265
|
||||
avcodec/mediacodecenc: workaround the alignment requirement only for H.264
|
||||
lavc/lpc: fix off-by-one in R-V V compute_autocorr
|
||||
lavc/vp9: reset segmentation fields when segmentation isn't enabled
|
||||
configure: enable ffnvcodec, nvenc, nvdec for FreeBSD
|
||||
lavc/sbrdsp: fix potential overflow in noise table
|
||||
|
||||
version 7.0.1:
|
||||
lavc/flacdsp: do not assume maximum R-V VL
|
||||
avformat/flacdec: Reorder allocations to avoid leak on error
|
||||
avcodec/adts_parser: Don't presume buffer to be padded
|
||||
avformat/movenc: Check av_malloc()
|
||||
avcodec/vp8: Return error on error
|
||||
avformat/mov: store sample_sizes as unsigned ints
|
||||
avformat/vvc: fix parsing sps_subpic_id
|
||||
avformat/vvc: initialize some ptl flags
|
||||
avcodec/mscc & mwsc: Check loop counts before use
|
||||
avcodec/mpegvideo_enc: Fix potential overflow in RD
|
||||
avcodec/mpeg4videodec: assert impossible wrap points
|
||||
avcodec/mpeg12dec: Use 64bit in bit computation
|
||||
avcodec/vqcdec: Check init_get_bits8() for failure
|
||||
avcodec/vvc/dec: Check init_get_bits8() for failure
|
||||
avcodec/vble: Check av_image_get_buffer_size() for failure
|
||||
avcodec/vp3: Replace check by assert
|
||||
avcodec/vp8: Forward return of ff_vpx_init_range_decoder()
|
||||
avcodec/jpeg2000dec: remove ST=3 case
|
||||
avcodec/qsvdec: Check av_image_get_buffer_size() for failure
|
||||
avcodec/exr: Fix preview overflow
|
||||
avcodec/decode: decode_simple_internal() only implements audio and video
|
||||
avcodec/fmvc: remove dead assignment
|
||||
avcodec/h2645_sei: Remove dead checks
|
||||
avcodec/h264_slice: Remove dead sps check
|
||||
avcodec/lpc: copy levenson coeffs only when they have been computed
|
||||
avutil/tests/base64: Check with too short output array
|
||||
libavutil/base64: Try not to write over the array end
|
||||
avcodec/cbs_av1: Avoid shift overflow
|
||||
fftools/ffplay: Check return of swr_alloc_set_opts2()
|
||||
tools/opt_common: Check for malloc failure
|
||||
doc/examples/demux_decode: Simplify loop
|
||||
avformat/concatdec: Check file
|
||||
avcodec/mpegvideo_enc: Fix 1 line and one column images
|
||||
avcodec/amrwbdec: assert mode to be valid in decode_fixed_vector()
|
||||
avcodec/wavarc: fix integer overflow in decode_5elp() block type 2
|
||||
swscale/output: Fix integer overflow in yuv2rgba64_full_1_c_template()
|
||||
swscale/output: Fix integer overflow in yuv2rgba64_1_c_template
|
||||
avcodec/av1dec: Change bit_depth to int
|
||||
avcodec/av1dec: bit_depth cannot be another values than 8,10,12
|
||||
avcodec/avs3_parser: assert the return value of init_get_bits()
|
||||
avcodec/avs2_parser: Assert init_get_bits8() success with const size 15
|
||||
avfilter/avfiltergraph: return value of ff_request_frame() is unused
|
||||
avformat/mxfdec: Check body_offset
|
||||
avformat/kvag: Check sample_rate
|
||||
avcodec/atrac9dec: Check init_get_bits8() for failure
|
||||
avcodec/ac3_parser: Check init_get_bits8() for failure
|
||||
avcodec/pngdec: Check last AVFrame before deref
|
||||
avcodec/hevcdec: Check ref frame
|
||||
doc/examples/qsv_transcode: Initialize pointer before free
|
||||
doc/examples/qsv_transcode: Simplify str_to_dict() loop
|
||||
doc/examples/vaapi_transcode: Simplify loop
|
||||
doc/examples/qsv_transcode: Simplify loop
|
||||
avcodec/cbs_h2645: Check NAL space
|
||||
avfilter/vf_thumbnail_cuda: Set ret before checking it
|
||||
avfilter/signature_lookup: Dont copy uninitialized stuff around
|
||||
avfilter/signature_lookup: Fix 2 differences to the refernce SW
|
||||
avcodec/x86/vp3dsp_init: Set correct function pointer, fix crash
|
||||
avformat/mp3dec: change bogus error message if read_header encounters EOF
|
||||
avformat/mp3dec: simplify inner frame size check in mp3_read_header
|
||||
avformat/mp3dec: only call ffio_ensure_seekback once
|
||||
avcodec/cbs_h266: read vps_ptl_max_tid before using it
|
||||
avcodec/cbs_h266: fix sh_collocated_from_l0_flag and sh_collocated_ref_idx infer
|
||||
avformat/vvc: fix parsing some early VPS bitstream values
|
||||
avformat/vvc: fix writing general_constraint_info bytes
|
||||
avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
|
||||
lavd/v4l2: Use proper field type for second parameter of ioctl() with BSD's
|
||||
vulkan_av1: Fix force_integer_mv value
|
||||
vaapi_av1: Fix force_integer_mv value
|
||||
av1dec: Add force_integer_mv derived field for decoder use
|
||||
avutil/iamf: fix offsets for mix_gain options
|
||||
avformat/iamfdec: check nb_streams in header read
|
||||
avformat/mov: free the infe allocated item data on failure
|
||||
avformat/iamf_writer: reject duplicated stream ids in a stream group
|
||||
avformat/mov: don't read key_size bytes twice in the keys atom
|
||||
avformat/mov: take into account the first eight bytes in the keys atom
|
||||
avformat/mov: fix the check for the heif item parsing loop
|
||||
avutil/iamf: fix mix_gain_class name
|
||||
av1dec: Fix RefFrameSignBias calculation
|
||||
avcodec/codec_par: always clear extradata_size in avcodec_parameters_to_context()
|
||||
avcodec/mediacodecenc: Fix return empty packet when bsf is used
|
||||
avcodec/hevcdec: Fix precedence, bogus film grain warning
|
||||
avcodec/hevcdec: fix segfault on invalid film grain metadata
|
||||
lavc/vvc: Skip enhancement layer NAL units
|
||||
avformat/mov: ignore old infe box versions
|
||||
vulkan_av1: add workaround for NVIDIA drivers tested on broken CTS
|
||||
lavc/vulkan_av1: Use av1dec reference order hint information
|
||||
lavc/av1: Record reference ordering information for each frame
|
||||
doc/encoders: add missing libxvid option
|
||||
doc/encoders: remove non-existent flag
|
||||
fate/ffmpeg: Avoid dependency on samples
|
||||
avcodec/wavpack: Remove always-false check
|
||||
avcodec/wavpack: Fix leak and segfault on reallocation error
|
||||
avcodec/lossless_videoencdsp: Don't presume alignment in diff_bytes
|
||||
avcodec/ppc/h264dsp: Fix left shifts of negative numbers
|
||||
|
||||
version 7.0:
|
||||
- DXV DXT1 encoder
|
||||
- LEAD MCMP decoder
|
||||
@@ -608,7 +17,7 @@ version 7.0:
|
||||
- qrencode filter and qrencodesrc source
|
||||
- quirc filter
|
||||
- lavu/eval: introduce randomi() function in expressions
|
||||
- VVC decoder (experimental)
|
||||
- VVC decoder
|
||||
- fsync filter
|
||||
- Raw Captions with Time (RCWT) closed caption muxer
|
||||
- ffmpeg CLI -bsf option may now be used for input as well as output
|
||||
@@ -629,15 +38,6 @@ version 7.0:
|
||||
- ffplay with hwaccel decoding support (depends on vulkan renderer via libplacebo)
|
||||
- dnn filter libtorch backend
|
||||
- Android content URIs protocol
|
||||
- AOMedia Film Grain Synthesis 1 (AFGS1)
|
||||
- RISC-V optimizations for AAC, FLAC, JPEG-2000, LPC, RV4.0, SVQ, VC1, VP8, and more
|
||||
- Loongarch optimizations for HEVC decoding
|
||||
- Important AArch64 optimizations for HEVC
|
||||
- IAMF support inside MP4/ISOBMFF
|
||||
- Support for HEIF/AVIF still images and tiled still images
|
||||
- Dolby Vision profile 10 support in AV1
|
||||
- Support for Ambient Viewing Environment metadata in MP4/ISOBMFF
|
||||
- HDR10 metadata passthrough when encoding with libx264, libx265, and libsvtav1
|
||||
|
||||
|
||||
version 6.1:
|
||||
|
||||
@@ -15,11 +15,3 @@ NOTICE
|
||||
------
|
||||
|
||||
- Non system dependencies (e.g. libx264, libvpx) are disabled by default.
|
||||
|
||||
NOTICE for Package Maintainers
|
||||
------------------------------
|
||||
|
||||
- It is recommended to build FFmpeg twice, first with minimal external dependencies so
|
||||
that 3rd party packages, which depend on FFmpegs libavutil/libavfilter/libavcodec/libavformat
|
||||
can then be built. And last build FFmpeg with full dependancies (which may in turn depend on
|
||||
some of these 3rd party packages). This avoids circular dependencies during build.
|
||||
|
||||
+5
-7
@@ -34,8 +34,8 @@ Miscellaneous Areas
|
||||
===================
|
||||
|
||||
documentation Stefano Sabatini, Mike Melanson, Timothy Gu, Gyan Doshi
|
||||
project server day to day operations Árpád Gereöffy, Michael Niedermayer, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov, Timo Rothenpieler
|
||||
project server emergencies Árpád Gereöffy, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov, Timo Rothenpieler
|
||||
project server day to day operations Árpád Gereöffy, Michael Niedermayer, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov
|
||||
project server emergencies Árpád Gereöffy, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov
|
||||
presets Robert Swain
|
||||
metadata subsystem Aurelien Jacobs
|
||||
release management Michael Niedermayer
|
||||
@@ -535,12 +535,10 @@ wm4
|
||||
Releases
|
||||
========
|
||||
|
||||
7.0 Michael Niedermayer
|
||||
6.1 Michael Niedermayer
|
||||
5.1 Michael Niedermayer
|
||||
4.4 Michael Niedermayer
|
||||
3.4 Michael Niedermayer
|
||||
2.8 Michael Niedermayer
|
||||
2.7 Michael Niedermayer
|
||||
2.6 Michael Niedermayer
|
||||
2.5 Michael Niedermayer
|
||||
|
||||
If you want to maintain an older release, please contact us
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
┌─────────────────────────────────────────┐
|
||||
│ RELEASE NOTES for FFmpeg 7.0 "Dijkstra" │
|
||||
└─────────────────────────────────────────┘
|
||||
|
||||
The FFmpeg Project proudly presents FFmpeg 7.0 "Dijkstra", about 6
|
||||
months after the release of FFmpeg 6.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.
|
||||
@@ -430,9 +430,7 @@ Advanced options (experts only):
|
||||
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
|
||||
--disable-safe-bitstream-reader
|
||||
disable buffer boundary checking in bitreaders
|
||||
(This disables some security checks and can cause undefined behavior,
|
||||
crashes and arbitrary code execution, it may be faster, but
|
||||
should only be used with trusted input)
|
||||
(faster, but may crash)
|
||||
--sws-max-filter-size=N the max filter size swscale uses [$sws_max_filter_size_default]
|
||||
|
||||
Optimization options (experts only):
|
||||
@@ -2214,7 +2212,6 @@ ARCH_EXT_LIST_PPC="
|
||||
ldbrx
|
||||
power8
|
||||
ppc4xx
|
||||
vec_xl
|
||||
vsx
|
||||
"
|
||||
|
||||
@@ -2520,7 +2517,6 @@ HAVE_LIST="
|
||||
opencl_videotoolbox
|
||||
perl
|
||||
pod2man
|
||||
posix_ioctl
|
||||
texi2html
|
||||
xmllint
|
||||
zlib_gzip
|
||||
@@ -2752,7 +2748,6 @@ altivec_deps="ppc"
|
||||
dcbzl_deps="ppc"
|
||||
ldbrx_deps="ppc"
|
||||
ppc4xx_deps="ppc"
|
||||
vec_xl_deps="altivec"
|
||||
vsx_deps="altivec"
|
||||
power8_deps="vsx"
|
||||
|
||||
@@ -2856,7 +2851,6 @@ h264_sei_select="atsc_a53 golomb"
|
||||
hevcparse_select="golomb"
|
||||
hevc_sei_select="atsc_a53 golomb"
|
||||
frame_thread_encoder_deps="encoders threads"
|
||||
iamfdec_select="iso_media mpeg4audio"
|
||||
inflate_wrapper_deps="zlib"
|
||||
intrax8_select="blockdsp wmv2dsp"
|
||||
iso_media_select="mpeg4audio"
|
||||
@@ -2900,7 +2894,7 @@ asv1_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp"
|
||||
asv2_decoder_select="blockdsp bswapdsp idctdsp"
|
||||
asv2_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp"
|
||||
atrac1_decoder_select="sinewin"
|
||||
av1_decoder_select="atsc_a53 cbs_av1 dovi_rpu"
|
||||
av1_decoder_select="cbs_av1 atsc_a53"
|
||||
bink_decoder_select="blockdsp hpeldsp"
|
||||
binkaudio_dct_decoder_select="wma_freqs"
|
||||
binkaudio_rdft_decoder_select="wma_freqs"
|
||||
@@ -3489,7 +3483,7 @@ libcelt_decoder_deps="libcelt"
|
||||
libcodec2_decoder_deps="libcodec2"
|
||||
libcodec2_encoder_deps="libcodec2"
|
||||
libdav1d_decoder_deps="libdav1d"
|
||||
libdav1d_decoder_select="atsc_a53 dovi_rpu"
|
||||
libdav1d_decoder_select="atsc_a53"
|
||||
libdavs2_decoder_deps="libdavs2"
|
||||
libdavs2_decoder_select="avs2_parser"
|
||||
libfdk_aac_decoder_deps="libfdk_aac"
|
||||
@@ -4067,8 +4061,6 @@ 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
|
||||
@@ -5769,13 +5761,6 @@ case $target_os in
|
||||
clang_version=$($cc -dumpversion)
|
||||
test ${clang_version%%.*} -eq 11 && add_cflags -fno-stack-check
|
||||
fi
|
||||
|
||||
# Xcode Clang doesn't default to -fno-common while upstream llvm.org
|
||||
# Clang (and GCC) do. This avoids linker warnings on Xcode 16.3 about
|
||||
# "reducing alignment of section __DATA,__common from 0x8000 to 0x4000
|
||||
# because it exceeds segment maximum alignment".
|
||||
check_cflags -fno-common
|
||||
|
||||
;;
|
||||
msys*)
|
||||
die "Native MSYS builds are discouraged, please use the MINGW environment."
|
||||
@@ -6366,11 +6351,6 @@ 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"'
|
||||
@@ -6459,9 +6439,6 @@ check_cc intrinsics_neon arm_neon.h "int16x8_t test = vdupq_n_s16(0)"
|
||||
|
||||
check_ldflags -Wl,--as-needed
|
||||
check_ldflags -Wl,-z,noexecstack
|
||||
if [ $target_os = "darwin" ]; then
|
||||
check_ldflags -Wl,-no_warn_duplicate_libraries
|
||||
fi
|
||||
|
||||
if ! disabled network; then
|
||||
check_func getaddrinfo $network_extralibs
|
||||
@@ -7151,16 +7128,14 @@ enabled makeinfo \
|
||||
disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
|
||||
perl -v > /dev/null 2>&1 && enable perl || disable perl
|
||||
pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
|
||||
rsync --help 2> /dev/null | grep -q 'contimeout=' && enable rsync_contimeout || disable rsync_contimeout
|
||||
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;"
|
||||
@@ -7335,7 +7310,7 @@ fi
|
||||
|
||||
if enabled x86; then
|
||||
case $target_os in
|
||||
freebsd|mingw32*|mingw64*|win32|win64|linux|cygwin*)
|
||||
mingw32*|mingw64*|win32|win64|linux|cygwin*)
|
||||
;;
|
||||
*)
|
||||
disable ffnvcodec cuvid nvdec nvenc
|
||||
@@ -7920,7 +7895,6 @@ 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}"
|
||||
@@ -8170,7 +8144,7 @@ cat > $TMPH <<EOF
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
|
||||
#define FFMPEG_LICENSE "$(c_escape $license)"
|
||||
#define CONFIG_THIS_YEAR 2025
|
||||
#define CONFIG_THIS_YEAR 2024
|
||||
#define FFMPEG_DATADIR "$(eval c_escape $datadir)"
|
||||
#define AVCONV_DATADIR "$(eval c_escape $datadir)"
|
||||
#define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
|
||||
|
||||
+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 = 7.0.3
|
||||
PROJECT_NUMBER =
|
||||
|
||||
# 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
|
||||
|
||||
@@ -63,3 +63,4 @@ 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.
|
||||
|
||||
|
||||
@@ -567,13 +567,6 @@ prefer to use #EXT-X-START if it's in playlist instead of live_start_index.
|
||||
@item allowed_extensions
|
||||
',' separated list of file extensions that hls is allowed to access.
|
||||
|
||||
@item extension_picky
|
||||
This blocks disallowed extensions from probing
|
||||
It also requires all available segments to have matching extensions to the format
|
||||
except mpegts, which is always allowed.
|
||||
It is recommended to set the whitelists correctly instead of depending on extensions
|
||||
Enabled by default.
|
||||
|
||||
@item max_reload
|
||||
Maximum number of times a insufficient list is attempted to be reloaded.
|
||||
Default value is 1000.
|
||||
|
||||
@@ -390,10 +390,6 @@ If you apply a patch, send an
|
||||
answer to ffmpeg-devel (or wherever you got the patch from) saying that
|
||||
you applied the patch.
|
||||
|
||||
@subheading Credit any researchers
|
||||
If a commit/patch fixes an issues found by some researcher, always credit the
|
||||
researcher in the commit message for finding/reporting the issue.
|
||||
|
||||
@subheading Always wait long enough before pushing changes
|
||||
Do NOT commit to code actively maintained by others without permission.
|
||||
Send a patch to ffmpeg-devel. If no one answers within a reasonable
|
||||
@@ -638,11 +634,6 @@ patch is inline or attached per mail.
|
||||
You can check @url{https://patchwork.ffmpeg.org}, if your patch does not show up, its mime type
|
||||
likely was wrong.
|
||||
|
||||
@subheading How to setup git send-email?
|
||||
|
||||
Please see @url{https://git-send-email.io/}.
|
||||
For gmail additionally see @url{https://shallowsky.com/blog/tech/email/gmail-app-passwds.html}.
|
||||
|
||||
@subheading Sending patches from email clients
|
||||
Using @code{git send-email} might not be desirable for everyone. The
|
||||
following trick allows to send patches via email clients in a safe
|
||||
@@ -927,25 +918,6 @@ In case you need finer control over how valgrind is invoked, use the
|
||||
@code{--target-exec='valgrind <your_custom_valgrind_options>} option in
|
||||
your configure line instead.
|
||||
|
||||
@anchor{Maintenance}
|
||||
@chapter Maintenance process
|
||||
|
||||
@anchor{MAINTAINERS}
|
||||
@section MAINTAINERS
|
||||
|
||||
The developers maintaining each part of the codebase are listed in @file{MAINTAINERS}.
|
||||
Being listed in @file{MAINTAINERS}, gives one the right to have git write access to
|
||||
the specific repository.
|
||||
|
||||
@anchor{Becoming a maintainer}
|
||||
@section Becoming a maintainer
|
||||
|
||||
People add themselves to @file{MAINTAINERS} by sending a patch like any other code
|
||||
change. These get reviewed by the community like any other patch. It is expected
|
||||
that, if someone has an objection to a new maintainer, she is willing to object
|
||||
in public with her full name and is willing to take over maintainership for the area.
|
||||
|
||||
|
||||
@anchor{Release process}
|
||||
@chapter Release process
|
||||
|
||||
|
||||
+4
-6
@@ -3045,6 +3045,9 @@ Enable high quality AC prediction.
|
||||
@item gray
|
||||
Only encode grayscale.
|
||||
|
||||
@item gmc
|
||||
Enable the use of global motion compensation (GMC).
|
||||
|
||||
@item qpel
|
||||
Enable quarter-pixel motion compensation.
|
||||
|
||||
@@ -3056,9 +3059,7 @@ Place global headers in extradata instead of every keyframe.
|
||||
|
||||
@end table
|
||||
|
||||
@item gmc
|
||||
Enable the use of global motion compensation (GMC). Default is 0
|
||||
(disabled).
|
||||
@item trellis
|
||||
|
||||
@item me_quality
|
||||
Set motion estimation quality level. Possible values in decreasing order of
|
||||
@@ -3113,9 +3114,6 @@ be better than any of the two specified individually. In other
|
||||
words, the resulting quality will be the worse one of the two
|
||||
effects.
|
||||
|
||||
@item trellis
|
||||
Set rate-distortion optimal quantization.
|
||||
|
||||
@item ssim
|
||||
Set structural similarity (SSIM) displaying method. Possible values:
|
||||
|
||||
|
||||
@@ -95,7 +95,6 @@ int main(int argc, char *argv[])
|
||||
avio_ctx = avio_alloc_context(avio_ctx_buffer, avio_ctx_buffer_size,
|
||||
0, &bd, &read_packet, NULL, NULL);
|
||||
if (!avio_ctx) {
|
||||
av_freep(&avio_ctx_buffer);
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -138,9 +138,11 @@ static int decode_packet(AVCodecContext *dec, const AVPacket *pkt)
|
||||
ret = output_audio_frame(frame);
|
||||
|
||||
av_frame_unref(frame);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int open_codec_context(int *stream_idx,
|
||||
|
||||
+2
-1
@@ -347,7 +347,8 @@ static int write_audio_frame(AVFormatContext *oc, OutputStream *ost)
|
||||
if (frame) {
|
||||
/* convert samples from native format to destination codec format, using the resampler */
|
||||
/* compute destination number of samples */
|
||||
dst_nb_samples = swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples;
|
||||
dst_nb_samples = av_rescale_rnd(swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples,
|
||||
c->sample_rate, c->sample_rate, AV_ROUND_UP);
|
||||
av_assert0(dst_nb_samples == frame->nb_samples);
|
||||
|
||||
/* when we pass a frame to the encoder, it may keep a reference to it
|
||||
|
||||
@@ -75,7 +75,8 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
|
||||
if (value == NULL)
|
||||
return AVERROR(EINVAL);
|
||||
av_dict_set(opt, key, value, 0);
|
||||
} while(1);
|
||||
} while(key != NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dynamic_set_parameter(AVCodecContext *avctx)
|
||||
@@ -333,15 +334,17 @@ static int dec_enc(AVPacket *pkt, const AVCodec *enc_codec, char *optstr)
|
||||
|
||||
fail:
|
||||
av_frame_free(&frame);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const AVCodec *enc_codec;
|
||||
int ret = 0;
|
||||
AVPacket *dec_pkt = NULL;
|
||||
AVPacket *dec_pkt;
|
||||
|
||||
if (argc < 5 || (argc - 5) % 2) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Usage: %s <input file> <encoder> <output file>"
|
||||
|
||||
@@ -88,10 +88,6 @@ static int encode_write(AVCodecContext *avctx, AVFrame *frame, FILE *fout)
|
||||
enc_pkt->stream_index = 0;
|
||||
ret = fwrite(enc_pkt->data, enc_pkt->size, 1, fout);
|
||||
av_packet_unref(enc_pkt);
|
||||
if (ret != enc_pkt->size) {
|
||||
ret = AVERROR(errno);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
||||
@@ -215,8 +215,10 @@ static int dec_enc(AVPacket *pkt, const AVCodec *enc_codec)
|
||||
|
||||
fail:
|
||||
av_frame_free(&frame);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
slot= # some unique identifier
|
||||
repo=https://git.ffmpeg.org/ffmpeg.git # the source repository
|
||||
repo=git://source.ffmpeg.org/ffmpeg.git # the source repository
|
||||
#branch=release/2.6 # the branch to test
|
||||
samples= # path to samples directory
|
||||
workdir= # directory in which to do all the work
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ git log <filename(s)>
|
||||
@end example
|
||||
|
||||
You may also use the graphical tools like @command{gitview} or @command{gitk}
|
||||
or the web interface available at @url{https://git.ffmpeg.org/ffmpeg.git}.
|
||||
or the web interface available at @url{http://source.ffmpeg.org/}.
|
||||
|
||||
@section Checking source tree status
|
||||
|
||||
|
||||
+1
-5
@@ -23,8 +23,6 @@ Web, mail, and public facing git, also website git
|
||||
fftrac VM:
|
||||
----------
|
||||
trac.ffmpeg.org Issue tracking
|
||||
gpg encrypted backups of the trac repositories are created once a day
|
||||
and can be downloaded by any of the admins.
|
||||
|
||||
|
||||
ffaux VM:
|
||||
@@ -67,9 +65,6 @@ Github mirrors are redundantly synced by multiple people
|
||||
|
||||
You need a new git repository related to FFmpeg ? contact root at ffmpeg.org
|
||||
|
||||
git repositories are managed by gitolite, every change to permissions is
|
||||
logged, including when, what and by whom
|
||||
|
||||
|
||||
Fate:
|
||||
~~~~~
|
||||
@@ -96,3 +91,4 @@ IRC:
|
||||
~~~~
|
||||
irc channels are at https://libera.chat/
|
||||
irc channel archives are at https://libera.irclog.whitequark.org
|
||||
|
||||
|
||||
@@ -157,3 +157,4 @@ 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
|
||||
|
||||
|
||||
+40
-129
@@ -54,24 +54,12 @@ sub get_formatting_function($$) {
|
||||
}
|
||||
|
||||
# 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_num = version->declare(ff_get_conf('PACKAGE_VERSION'))->numify;
|
||||
my $program_version_6_8 = $program_version_num >= 6.008000;
|
||||
|
||||
# no navigation elements
|
||||
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($$$$$)
|
||||
{
|
||||
my $self = shift;
|
||||
@@ -89,9 +77,6 @@ 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 '');
|
||||
@@ -99,40 +84,24 @@ sub ffmpeg_heading_command($$$$$)
|
||||
print STDERR "Process $command "
|
||||
.Texinfo::Structuring::_print_root_command_texi($command)."\n"
|
||||
if ($self->get_conf('DEBUG'));
|
||||
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'};
|
||||
}
|
||||
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'};
|
||||
}
|
||||
|
||||
if ($output_unit) {
|
||||
if ($element) {
|
||||
$result .= &{get_formatting_function($self, 'format_element_header')}($self, $cmdname,
|
||||
$command, $output_unit);
|
||||
$command, $element);
|
||||
}
|
||||
|
||||
my $heading_level;
|
||||
# node is used as heading if there is nothing else.
|
||||
if ($cmdname eq 'node') {
|
||||
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'}))
|
||||
if (!$element or (!$element->{'extra'}->{'section'}
|
||||
and $element->{'extra'}->{'node'}
|
||||
and $element->{'extra'}->{'node'} eq $command
|
||||
# bogus node may not have been normalized
|
||||
and defined($command->{'extra'}->{'normalized'}))) {
|
||||
if ($command->{'extra'}->{'normalized'} eq 'Top') {
|
||||
@@ -142,15 +111,7 @@ sub ffmpeg_heading_command($$$$$)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
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'};
|
||||
}
|
||||
$heading_level = $command->{'level'};
|
||||
}
|
||||
|
||||
my $heading = $self->command_text($command);
|
||||
@@ -158,8 +119,8 @@ sub ffmpeg_heading_command($$$$$)
|
||||
# if there is an error in the node.
|
||||
if (defined($heading) and $heading ne '' and defined($heading_level)) {
|
||||
|
||||
if ($root_commands{$cmdname}
|
||||
and $sectioning_commands{$cmdname}) {
|
||||
if ($Texinfo::Common::root_commands{$cmdname}
|
||||
and $Texinfo::Common::sectioning_commands{$cmdname}) {
|
||||
my $content_href = $self->command_contents_href($command, 'contents',
|
||||
$self->{'current_filename'});
|
||||
if ($content_href) {
|
||||
@@ -179,13 +140,7 @@ sub ffmpeg_heading_command($$$$$)
|
||||
}
|
||||
}
|
||||
|
||||
my $in_preformatted;
|
||||
if ($program_version_num >= 7.001090) {
|
||||
$in_preformatted = $self->in_preformatted_context();
|
||||
} else {
|
||||
$in_preformatted = $self->in_preformatted();
|
||||
}
|
||||
if ($in_preformatted) {
|
||||
if ($self->in_preformatted()) {
|
||||
$result .= $heading."\n";
|
||||
} else {
|
||||
# if the level was changed, set the command name right
|
||||
@@ -194,25 +149,21 @@ sub ffmpeg_heading_command($$$$$)
|
||||
$cmdname
|
||||
= $Texinfo::Common::level_to_structuring_command{$cmdname}->[$heading_level];
|
||||
}
|
||||
# format_heading_text expects an array of headings for texinfo >= 7.0
|
||||
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')}(
|
||||
$heading = [$heading];
|
||||
}
|
||||
$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(%sectioning_commands), 'node') {
|
||||
foreach my $command (keys(%Texinfo::Common::sectioning_commands), 'node') {
|
||||
texinfo_register_command_formatting($command, \&ffmpeg_heading_command);
|
||||
}
|
||||
|
||||
@@ -237,56 +188,28 @@ sub ffmpeg_begin_file($$$)
|
||||
my $filename = shift;
|
||||
my $element = shift;
|
||||
|
||||
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 $command;
|
||||
if ($element and $self->get_conf('SPLIT')) {
|
||||
$command = $self->element_command($element);
|
||||
}
|
||||
|
||||
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,
|
||||
my ($title, $description, $encoding, $date, $css_lines,
|
||||
$doctype, $bodytext, $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,
|
||||
if ($program_version_num >= 7.000000) {
|
||||
($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_information($command_for_title,
|
||||
$filename);
|
||||
$program, $generator) = $self->_file_header_information($command);
|
||||
} 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);
|
||||
$doctype, $bodytext, $copying_comment, $after_body_open,
|
||||
$extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_informations($command);
|
||||
}
|
||||
|
||||
my $links;
|
||||
if ($program_version_num >= 7.000000) {
|
||||
$links = $self->_get_links($filename, $element, $node_command);
|
||||
} else {
|
||||
$links = $self->_get_links ($filename, $element);
|
||||
}
|
||||
my $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">
|
||||
@@ -329,25 +252,13 @@ sub ffmpeg_program_string($)
|
||||
if (defined($self->get_conf('PROGRAM'))
|
||||
and $self->get_conf('PROGRAM') ne ''
|
||||
and defined($self->get_conf('PACKAGE_URL'))) {
|
||||
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(
|
||||
return $self->convert_tree(
|
||||
$self->gdt('This document was generated using @uref{{program_homepage}, @emph{{program}}}.',
|
||||
{ 'program_homepage' => {'text' => $self->get_conf('PACKAGE_URL')},
|
||||
'program' => {'text' => $self->get_conf('PROGRAM') }}));
|
||||
}
|
||||
{ 'program_homepage' => $self->get_conf('PACKAGE_URL'),
|
||||
'program' => $self->get_conf('PROGRAM') }));
|
||||
} else {
|
||||
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.'));
|
||||
}
|
||||
return $self->convert_tree(
|
||||
$self->gdt('This document was generated automatically.'));
|
||||
}
|
||||
}
|
||||
if ($program_version_6_8) {
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -44,3 +44,4 @@ 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.
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
toupper(){
|
||||
echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
}
|
||||
|
||||
+3
-4
@@ -256,10 +256,9 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
|
||||
if (*opt == '/') {
|
||||
opt++;
|
||||
|
||||
if (!opt_has_arg(po)) {
|
||||
if (po->type == OPT_TYPE_BOOL) {
|
||||
av_log(NULL, AV_LOG_FATAL,
|
||||
"Requested to load an argument from file for an option '%s'"
|
||||
" which does not take an argument\n",
|
||||
"Requested to load an argument from file for a bool option '%s'\n",
|
||||
po->name);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
@@ -582,7 +581,7 @@ static const AVOption *opt_find(void *obj, const char *name, const char *unit,
|
||||
return o;
|
||||
}
|
||||
|
||||
#define FLAGS ((o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0)
|
||||
#define FLAGS (o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0
|
||||
int opt_default(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
const AVOption *o;
|
||||
|
||||
+2
-3
@@ -306,9 +306,8 @@ static int read_key(void)
|
||||
}
|
||||
//Read it
|
||||
if(nchars != 0) {
|
||||
if (read(0, &ch, 1) == 1)
|
||||
return ch;
|
||||
return 0;
|
||||
read(0, &ch, 1);
|
||||
return ch;
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
|
||||
+1
-10
@@ -907,18 +907,9 @@ static int ist_use(InputStream *ist, int decoding_needed)
|
||||
|
||||
if (decoding_needed && ds->sch_idx_dec < 0) {
|
||||
int is_audio = ist->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO;
|
||||
int is_unreliable = !!(d->f.ctx->iformat->flags & AVFMT_NOTIMESTAMPS);
|
||||
int64_t use_wallclock_as_timestamps;
|
||||
|
||||
ret = av_opt_get_int(d->f.ctx, "use_wallclock_as_timestamps", 0, &use_wallclock_as_timestamps);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (use_wallclock_as_timestamps)
|
||||
is_unreliable = 0;
|
||||
|
||||
ds->dec_opts.flags = (!!ist->fix_sub_duration * DECODER_FLAG_FIX_SUB_DURATION) |
|
||||
(!!is_unreliable * DECODER_FLAG_TS_UNRELIABLE) |
|
||||
(!!(d->f.ctx->iformat->flags & AVFMT_NOTIMESTAMPS) * DECODER_FLAG_TS_UNRELIABLE) |
|
||||
(!!(d->loop && is_audio) * DECODER_FLAG_SEND_END_TS)
|
||||
#if FFMPEG_OPT_TOP
|
||||
| ((ist->top_field_first >= 0) * DECODER_FLAG_TOP_FIELD_FIRST)
|
||||
|
||||
@@ -171,7 +171,7 @@ int enc_open(void *opaque, const AVFrame *frame)
|
||||
InputStream *ist = ost->ist;
|
||||
Encoder *e = ost->enc;
|
||||
AVCodecContext *enc_ctx = ost->enc_ctx;
|
||||
Decoder *dec = NULL;
|
||||
Decoder *dec;
|
||||
const AVCodec *enc = enc_ctx->codec;
|
||||
OutputFile *of = ost->file;
|
||||
FrameData *fd;
|
||||
@@ -504,9 +504,9 @@ void enc_stats_write(OutputStream *ost, EncStats *es,
|
||||
AVRational tbi = (AVRational){ 0, 1};
|
||||
int64_t ptsi = INT64_MAX;
|
||||
|
||||
const FrameData *fd = NULL;
|
||||
const FrameData *fd;
|
||||
|
||||
if (frame ? frame->opaque_ref : pkt->opaque_ref) {
|
||||
if ((frame && frame->opaque_ref) || (pkt && pkt->opaque_ref)) {
|
||||
fd = (const FrameData*)(frame ? frame->opaque_ref->data : pkt->opaque_ref->data);
|
||||
tbi = fd->dec.tb;
|
||||
ptsi = fd->dec.pts;
|
||||
|
||||
+86
-151
@@ -260,12 +260,6 @@ typedef struct SchFilterGraph {
|
||||
int task_exited;
|
||||
} SchFilterGraph;
|
||||
|
||||
enum SchedulerState {
|
||||
SCH_STATE_UNINIT,
|
||||
SCH_STATE_STARTED,
|
||||
SCH_STATE_STOPPED,
|
||||
};
|
||||
|
||||
struct Scheduler {
|
||||
const AVClass *class;
|
||||
|
||||
@@ -298,7 +292,7 @@ struct Scheduler {
|
||||
char *sdp_filename;
|
||||
int sdp_auto;
|
||||
|
||||
enum SchedulerState state;
|
||||
int transcode_started;
|
||||
atomic_int terminate;
|
||||
atomic_int task_failed;
|
||||
|
||||
@@ -405,6 +399,22 @@ static int queue_alloc(ThreadQueue **ptq, unsigned nb_streams, unsigned queue_si
|
||||
|
||||
static void *task_wrapper(void *arg);
|
||||
|
||||
static int task_stop(SchTask *task)
|
||||
{
|
||||
int ret;
|
||||
void *thread_ret;
|
||||
|
||||
if (!task->thread_running)
|
||||
return 0;
|
||||
|
||||
ret = pthread_join(task->thread, &thread_ret);
|
||||
av_assert0(ret == 0);
|
||||
|
||||
task->thread_running = 0;
|
||||
|
||||
return (intptr_t)thread_ret;
|
||||
}
|
||||
|
||||
static int task_start(SchTask *task)
|
||||
{
|
||||
int ret;
|
||||
@@ -458,6 +468,59 @@ static int64_t trailing_dts(const Scheduler *sch, int count_finished)
|
||||
return min_dts == INT64_MAX ? AV_NOPTS_VALUE : min_dts;
|
||||
}
|
||||
|
||||
int sch_stop(Scheduler *sch, int64_t *finish_ts)
|
||||
{
|
||||
int ret = 0, err;
|
||||
|
||||
atomic_store(&sch->terminate, 1);
|
||||
|
||||
for (unsigned type = 0; type < 2; type++)
|
||||
for (unsigned i = 0; i < (type ? sch->nb_demux : sch->nb_filters); i++) {
|
||||
SchWaiter *w = type ? &sch->demux[i].waiter : &sch->filters[i].waiter;
|
||||
waiter_set(w, 1);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_demux; i++) {
|
||||
SchDemux *d = &sch->demux[i];
|
||||
|
||||
err = task_stop(&d->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_dec; i++) {
|
||||
SchDec *dec = &sch->dec[i];
|
||||
|
||||
err = task_stop(&dec->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_filters; i++) {
|
||||
SchFilterGraph *fg = &sch->filters[i];
|
||||
|
||||
err = task_stop(&fg->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_enc; i++) {
|
||||
SchEnc *enc = &sch->enc[i];
|
||||
|
||||
err = task_stop(&enc->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_mux; i++) {
|
||||
SchMux *mux = &sch->mux[i];
|
||||
|
||||
err = task_stop(&mux->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
if (finish_ts)
|
||||
*finish_ts = trailing_dts(sch, 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void sch_free(Scheduler **psch)
|
||||
{
|
||||
Scheduler *sch = *psch;
|
||||
@@ -1150,8 +1213,7 @@ int sch_mux_stream_ready(Scheduler *sch, unsigned mux_idx, unsigned stream_idx)
|
||||
|
||||
// this may be called during initialization - do not start
|
||||
// threads before sch_start() is called
|
||||
if (++mux->nb_streams_ready == mux->nb_streams &&
|
||||
sch->state >= SCH_STATE_STARTED)
|
||||
if (++mux->nb_streams_ready == mux->nb_streams && sch->transcode_started)
|
||||
ret = mux_init(sch, mux);
|
||||
|
||||
pthread_mutex_unlock(&sch->mux_ready_lock);
|
||||
@@ -1188,45 +1250,6 @@ int sch_mux_sub_heartbeat_add(Scheduler *sch, unsigned mux_idx, unsigned stream_
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void unchoke_for_stream(Scheduler *sch, SchedulerNode src);
|
||||
|
||||
// Unchoke any filter graphs that are downstream of this node, to prevent it
|
||||
// from getting stuck trying to push data to a full queue
|
||||
static void unchoke_downstream(Scheduler *sch, SchedulerNode *dst)
|
||||
{
|
||||
SchFilterGraph *fg;
|
||||
SchDec *dec;
|
||||
SchEnc *enc;
|
||||
switch (dst->type) {
|
||||
case SCH_NODE_TYPE_DEC:
|
||||
dec = &sch->dec[dst->idx];
|
||||
for (int i = 0; i < dec->nb_dst; i++)
|
||||
unchoke_downstream(sch, &dec->dst[i]);
|
||||
break;
|
||||
case SCH_NODE_TYPE_ENC:
|
||||
enc = &sch->enc[dst->idx];
|
||||
for (int i = 0; i < enc->nb_dst; i++)
|
||||
unchoke_downstream(sch, &enc->dst[i]);
|
||||
break;
|
||||
case SCH_NODE_TYPE_MUX:
|
||||
// muxers are never choked
|
||||
break;
|
||||
case SCH_NODE_TYPE_FILTER_IN:
|
||||
fg = &sch->filters[dst->idx];
|
||||
if (fg->best_input == fg->nb_inputs) {
|
||||
fg->waiter.choked_next = 0;
|
||||
} else {
|
||||
// ensure that this filter graph is not stuck waiting for
|
||||
// input from a different upstream demuxer
|
||||
unchoke_for_stream(sch, fg->inputs[fg->best_input].src_sched);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
av_assert0(!"Invalid destination node type?");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void unchoke_for_stream(Scheduler *sch, SchedulerNode src)
|
||||
{
|
||||
while (1) {
|
||||
@@ -1234,13 +1257,7 @@ static void unchoke_for_stream(Scheduler *sch, SchedulerNode src)
|
||||
|
||||
// fed directly by a demuxer (i.e. not through a filtergraph)
|
||||
if (src.type == SCH_NODE_TYPE_DEMUX) {
|
||||
SchDemux *demux = &sch->demux[src.idx];
|
||||
sch->demux[src.idx].waiter.choked_next = 0;
|
||||
if (demux->waiter.choked_next == 0)
|
||||
return; // prevent infinite loop
|
||||
demux->waiter.choked_next = 0;
|
||||
for (int i = 0; i < demux->nb_streams; i++)
|
||||
unchoke_downstream(sch, demux->streams[i].dst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1566,8 +1583,7 @@ int sch_start(Scheduler *sch)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
av_assert0(sch->state == SCH_STATE_UNINIT);
|
||||
sch->state = SCH_STATE_STARTED;
|
||||
sch->transcode_started = 1;
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_mux; i++) {
|
||||
SchMux *mux = &sch->mux[i];
|
||||
@@ -1575,7 +1591,7 @@ int sch_start(Scheduler *sch)
|
||||
if (mux->nb_streams_ready == mux->nb_streams) {
|
||||
ret = mux_init(sch, mux);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1584,7 +1600,7 @@ int sch_start(Scheduler *sch)
|
||||
|
||||
ret = task_start(&enc->task);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_filters; i++) {
|
||||
@@ -1592,7 +1608,7 @@ int sch_start(Scheduler *sch)
|
||||
|
||||
ret = task_start(&fg->task);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_dec; i++) {
|
||||
@@ -1600,7 +1616,7 @@ int sch_start(Scheduler *sch)
|
||||
|
||||
ret = task_start(&dec->task);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_demux; i++) {
|
||||
@@ -1611,7 +1627,7 @@ int sch_start(Scheduler *sch)
|
||||
|
||||
ret = task_start(&d->task);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
return ret;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&sch->schedule_lock);
|
||||
@@ -1619,9 +1635,6 @@ int sch_start(Scheduler *sch)
|
||||
pthread_mutex_unlock(&sch->schedule_lock);
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
sch_stop(sch, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int sch_wait(Scheduler *sch, uint64_t timeout_us, int64_t *transcode_ts)
|
||||
@@ -2470,18 +2483,6 @@ int sch_filter_command(Scheduler *sch, unsigned fg_idx, AVFrame *frame)
|
||||
return send_to_filter(sch, fg, fg->nb_inputs, frame);
|
||||
}
|
||||
|
||||
static int task_cleanup(Scheduler *sch, SchedulerNode node)
|
||||
{
|
||||
switch (node.type) {
|
||||
case SCH_NODE_TYPE_DEMUX: return demux_done (sch, node.idx);
|
||||
case SCH_NODE_TYPE_MUX: return mux_done (sch, node.idx);
|
||||
case SCH_NODE_TYPE_DEC: return dec_done (sch, node.idx);
|
||||
case SCH_NODE_TYPE_ENC: return enc_done (sch, node.idx);
|
||||
case SCH_NODE_TYPE_FILTER_IN: return filter_done(sch, node.idx);
|
||||
default: av_assert0(0);
|
||||
}
|
||||
}
|
||||
|
||||
static void *task_wrapper(void *arg)
|
||||
{
|
||||
SchTask *task = arg;
|
||||
@@ -2494,7 +2495,15 @@ static void *task_wrapper(void *arg)
|
||||
av_log(task->func_arg, AV_LOG_ERROR,
|
||||
"Task finished with error code: %d (%s)\n", ret, av_err2str(ret));
|
||||
|
||||
err = task_cleanup(sch, task->node);
|
||||
switch (task->node.type) {
|
||||
case SCH_NODE_TYPE_DEMUX: err = demux_done (sch, task->node.idx); break;
|
||||
case SCH_NODE_TYPE_MUX: err = mux_done (sch, task->node.idx); break;
|
||||
case SCH_NODE_TYPE_DEC: err = dec_done (sch, task->node.idx); break;
|
||||
case SCH_NODE_TYPE_ENC: err = enc_done (sch, task->node.idx); break;
|
||||
case SCH_NODE_TYPE_FILTER_IN: err = filter_done(sch, task->node.idx); break;
|
||||
default: av_assert0(0);
|
||||
}
|
||||
|
||||
ret = err_merge(ret, err);
|
||||
|
||||
// EOF is considered normal termination
|
||||
@@ -2509,77 +2518,3 @@ static void *task_wrapper(void *arg)
|
||||
|
||||
return (void*)(intptr_t)ret;
|
||||
}
|
||||
|
||||
static int task_stop(Scheduler *sch, SchTask *task)
|
||||
{
|
||||
int ret;
|
||||
void *thread_ret;
|
||||
|
||||
if (!task->thread_running)
|
||||
return task_cleanup(sch, task->node);
|
||||
|
||||
ret = pthread_join(task->thread, &thread_ret);
|
||||
av_assert0(ret == 0);
|
||||
|
||||
task->thread_running = 0;
|
||||
|
||||
return (intptr_t)thread_ret;
|
||||
}
|
||||
|
||||
int sch_stop(Scheduler *sch, int64_t *finish_ts)
|
||||
{
|
||||
int ret = 0, err;
|
||||
|
||||
if (sch->state != SCH_STATE_STARTED)
|
||||
return 0;
|
||||
|
||||
atomic_store(&sch->terminate, 1);
|
||||
|
||||
for (unsigned type = 0; type < 2; type++)
|
||||
for (unsigned i = 0; i < (type ? sch->nb_demux : sch->nb_filters); i++) {
|
||||
SchWaiter *w = type ? &sch->demux[i].waiter : &sch->filters[i].waiter;
|
||||
waiter_set(w, 1);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_demux; i++) {
|
||||
SchDemux *d = &sch->demux[i];
|
||||
|
||||
err = task_stop(sch, &d->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_dec; i++) {
|
||||
SchDec *dec = &sch->dec[i];
|
||||
|
||||
err = task_stop(sch, &dec->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_filters; i++) {
|
||||
SchFilterGraph *fg = &sch->filters[i];
|
||||
|
||||
err = task_stop(sch, &fg->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_enc; i++) {
|
||||
SchEnc *enc = &sch->enc[i];
|
||||
|
||||
err = task_stop(sch, &enc->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sch->nb_mux; i++) {
|
||||
SchMux *mux = &sch->mux[i];
|
||||
|
||||
err = task_stop(sch, &mux->task);
|
||||
ret = err_merge(ret, err);
|
||||
}
|
||||
|
||||
if (finish_ts)
|
||||
*finish_ts = trailing_dts(sch, 1);
|
||||
|
||||
sch->state = SCH_STATE_STOPPED;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
+4
-15
@@ -2394,13 +2394,12 @@ static int audio_decode_frame(VideoState *is)
|
||||
av_channel_layout_compare(&af->frame->ch_layout, &is->audio_src.ch_layout) ||
|
||||
af->frame->sample_rate != is->audio_src.freq ||
|
||||
(wanted_nb_samples != af->frame->nb_samples && !is->swr_ctx)) {
|
||||
int ret;
|
||||
swr_free(&is->swr_ctx);
|
||||
ret = swr_alloc_set_opts2(&is->swr_ctx,
|
||||
swr_alloc_set_opts2(&is->swr_ctx,
|
||||
&is->audio_tgt.ch_layout, is->audio_tgt.fmt, is->audio_tgt.freq,
|
||||
&af->frame->ch_layout, af->frame->format, af->frame->sample_rate,
|
||||
0, NULL);
|
||||
if (ret < 0 || swr_init(is->swr_ctx) < 0) {
|
||||
if (!is->swr_ctx || swr_init(is->swr_ctx) < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"Cannot create sample rate converter for conversion of %d Hz %s %d channels to %d Hz %s %d channels!\n",
|
||||
af->frame->sample_rate, av_get_sample_fmt_name(af->frame->format), af->frame->ch_layout.nb_channels,
|
||||
@@ -2605,11 +2604,6 @@ static int create_hwaccel(AVBufferRef **device_ctx)
|
||||
if (type == AV_HWDEVICE_TYPE_NONE)
|
||||
return AVERROR(ENOTSUP);
|
||||
|
||||
if (!vk_renderer) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Vulkan renderer is not available\n");
|
||||
return AVERROR(ENOTSUP);
|
||||
}
|
||||
|
||||
ret = vk_renderer_get_hw_dev(vk_renderer, &vk_dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
@@ -3848,13 +3842,8 @@ int main(int argc, char **argv)
|
||||
if (vk_renderer) {
|
||||
AVDictionary *dict = NULL;
|
||||
|
||||
if (vulkan_params) {
|
||||
int ret = av_dict_parse_string(&dict, vulkan_params, "=", ":", 0);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_FATAL, "Failed to parse, %s\n", vulkan_params);
|
||||
do_exit(NULL);
|
||||
}
|
||||
}
|
||||
if (vulkan_params)
|
||||
av_dict_parse_string(&dict, vulkan_params, "=", ":", 0);
|
||||
ret = vk_renderer_create(vk_renderer, window, dict);
|
||||
av_dict_free(&dict);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -765,7 +765,7 @@ static void destroy(VkRenderer *renderer)
|
||||
vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR)
|
||||
ctx->get_proc_addr(ctx->inst, "vkDestroySurfaceKHR");
|
||||
vkDestroySurfaceKHR(ctx->inst, ctx->vk_surface, NULL);
|
||||
ctx->vk_surface = VK_NULL_HANDLE;
|
||||
ctx->vk_surface = NULL;
|
||||
}
|
||||
|
||||
av_buffer_unref(&ctx->hw_device_ref);
|
||||
|
||||
@@ -724,13 +724,10 @@ int show_codecs(void *optctx, const char *opt, const char *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int print_codecs(int encoder)
|
||||
static void print_codecs(int encoder)
|
||||
{
|
||||
const AVCodecDescriptor **codecs;
|
||||
int i, nb_codecs = get_codecs_sorted(&codecs);
|
||||
|
||||
if (nb_codecs < 0)
|
||||
return nb_codecs;
|
||||
unsigned i, nb_codecs = get_codecs_sorted(&codecs);
|
||||
|
||||
printf("%s:\n"
|
||||
" V..... = Video\n"
|
||||
@@ -765,17 +762,18 @@ static int print_codecs(int encoder)
|
||||
}
|
||||
}
|
||||
av_free(codecs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int show_decoders(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
return print_codecs(0);
|
||||
print_codecs(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int show_encoders(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
return print_codecs(1);
|
||||
print_codecs(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int show_bsfs(void *optctx, const char *opt, const char *arg)
|
||||
|
||||
@@ -1068,7 +1068,6 @@ STLIBOBJS-$(CONFIG_ISO_MEDIA) += mpegaudiotabs.o
|
||||
STLIBOBJS-$(CONFIG_FLV_MUXER) += mpeg4audio_sample_rates.o
|
||||
STLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o
|
||||
STLIBOBJS-$(CONFIG_IMAGE_JPEGXL_PIPE_DEMUXER) += jpegxl_parse.o
|
||||
STLIBOBJS-$(CONFIG_JNI) += ffjni.o
|
||||
STLIBOBJS-$(CONFIG_JPEGXL_ANIM_DEMUXER) += jpegxl_parse.o
|
||||
STLIBOBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio_sample_rates.o
|
||||
STLIBOBJS-$(CONFIG_MOV_DEMUXER) += ac3_channel_layout_tab.o
|
||||
|
||||
+13
-27
@@ -173,7 +173,6 @@ void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce)
|
||||
sce->ics.window_sequence[0] == LONG_START_SEQUENCE ? 0 : 2;
|
||||
const int sfb_len = sfb_end - sfb_start;
|
||||
const int coef_len = sce->ics.swb_offset[sfb_end] - sce->ics.swb_offset[sfb_start];
|
||||
const int n_filt = is8 ? 1 : order != TNS_MAX_ORDER ? 2 : 3;
|
||||
|
||||
if (coef_len <= 0 || sfb_len <= 0) {
|
||||
sce->tns.present = 0;
|
||||
@@ -181,30 +180,16 @@ void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce)
|
||||
}
|
||||
|
||||
for (w = 0; w < sce->ics.num_windows; w++) {
|
||||
float en[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
int oc_start = 0;
|
||||
float en[2] = {0.0f, 0.0f};
|
||||
int oc_start = 0, os_start = 0;
|
||||
int coef_start = sce->ics.swb_offset[sfb_start];
|
||||
|
||||
if (n_filt == 2) {
|
||||
for (g = sfb_start; g < sce->ics.num_swb && g <= sfb_end; g++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[w*16+g];
|
||||
if (g > sfb_start + (sfb_len/2))
|
||||
en[1] += band->energy; /* End */
|
||||
else
|
||||
en[0] += band->energy; /* Start */
|
||||
}
|
||||
en[2] = en[0];
|
||||
} else {
|
||||
for (g = sfb_start; g < sce->ics.num_swb && g <= sfb_end; g++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[w*16+g];
|
||||
if (g > sfb_start + (sfb_len/2) + (sfb_len/4))
|
||||
en[2] += band->energy; /* End */
|
||||
else if (g > sfb_start + (sfb_len/2) - (sfb_len/4))
|
||||
en[1] += band->energy; /* Middle */
|
||||
else
|
||||
en[0] += band->energy; /* Start */
|
||||
}
|
||||
en[3] = en[0];
|
||||
for (g = sfb_start; g < sce->ics.num_swb && g <= sfb_end; g++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[w*16+g];
|
||||
if (g > sfb_start + (sfb_len/2))
|
||||
en[1] += band->energy;
|
||||
else
|
||||
en[0] += band->energy;
|
||||
}
|
||||
|
||||
/* LPC */
|
||||
@@ -214,14 +199,15 @@ void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce)
|
||||
if (!order || !isfinite(gain) || gain < TNS_GAIN_THRESHOLD_LOW || gain > TNS_GAIN_THRESHOLD_HIGH)
|
||||
continue;
|
||||
|
||||
tns->n_filt[w] = n_filt;
|
||||
tns->n_filt[w] = is8 ? 1 : order != TNS_MAX_ORDER ? 2 : 3;
|
||||
for (g = 0; g < tns->n_filt[w]; g++) {
|
||||
tns->direction[w][g] = slant != 2 ? slant : en[g] < en[g + 1];
|
||||
tns->order[w][g] = order/tns->n_filt[w];
|
||||
tns->length[w][g] = sfb_len/tns->n_filt[w];
|
||||
tns->direction[w][g] = slant != 2 ? slant : en[g] < en[!g];
|
||||
tns->order[w][g] = g < tns->n_filt[w] ? order/tns->n_filt[w] : order - oc_start;
|
||||
tns->length[w][g] = g < tns->n_filt[w] ? sfb_len/tns->n_filt[w] : sfb_len - os_start;
|
||||
quantize_coefs(&coefs[oc_start], tns->coef_idx[w][g], tns->coef[w][g],
|
||||
tns->order[w][g], c_bits);
|
||||
oc_start += tns->order[w][g];
|
||||
os_start += tns->length[w][g];
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#define BUILD_TABLES
|
||||
#include "config.h"
|
||||
#undef CONFIG_HARDCODED_TABLES
|
||||
#define CONFIG_HARDCODED_TABLES 0
|
||||
#include "aac_defines.h"
|
||||
|
||||
|
||||
@@ -582,7 +582,6 @@ static int sbr_make_f_derived(AACDecContext *ac, SpectralBandReplication *sbr)
|
||||
|
||||
if (sbr->n_q > 5) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, "Too many noise floor scale factors: %d\n", sbr->n_q);
|
||||
sbr->n_q = 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
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
|
||||
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
|
||||
rshrn v4.4h, v2.4s, #6
|
||||
trn2 v5.4h, v4.4h, v4.4h
|
||||
add v2.4h, v4.4h, v5.4h
|
||||
@@ -502,26 +502,28 @@ 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
|
||||
sxtl v6.4s, v5.4h // c
|
||||
ssubl v6.4s, v5.4h, v3.4h
|
||||
|
||||
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] // 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
|
||||
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
|
||||
|
||||
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
|
||||
add v16.4s, v16.4s, v2.4s
|
||||
add v17.4s, v17.4s, v2.4s
|
||||
saddw v16.4s, v16.4s, v2.4h
|
||||
saddw v17.4s, v17.4s, v2.4h
|
||||
sqshrun v1.4h, v16.4s, #5
|
||||
sqshrun2 v1.8h, v17.4s, #5
|
||||
add v16.4s, v16.4s, v3.4s
|
||||
@@ -593,11 +595,12 @@ 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]
|
||||
smlal v1.4s, v0.4h, v5.h[0]
|
||||
smlal2 v2.4s, v0.8h, v5.h[0]
|
||||
saddw v1.4s, v1.4s, v0.4h
|
||||
saddw2 v2.4s, v2.4s, v0.8h
|
||||
mov w3, #8
|
||||
mvni v4.8h, #0xFC, lsl #8 // 1023 for clipping
|
||||
1:
|
||||
|
||||
@@ -4487,7 +4487,7 @@ function ff_hevc_put_hevc_epel_uni_w_v24_8_neon, export=1
|
||||
subs w4, w4, #1
|
||||
add x2, x2, x3
|
||||
EPEL_UNI_W_V16_CALC v4, v5, v16, v18, v20, v22, v24, v25, v26, v27
|
||||
EPEL_UNI_W_V8_CALC v6, v17, v19, v21, v23, v24, v25
|
||||
EPEL_UNI_W_V8_CALC v6, v17, v19, v21, v23, v24, v25
|
||||
str q4, [x0]
|
||||
str d6, [x0, #16]
|
||||
add x0, x0, x1
|
||||
@@ -4496,7 +4496,7 @@ function ff_hevc_put_hevc_epel_uni_w_v24_8_neon, export=1
|
||||
subs w4, w4, #1
|
||||
add x2, x2, x3
|
||||
EPEL_UNI_W_V16_CALC v4, v5, v18, v20, v22, v16, v24, v25, v26, v27
|
||||
EPEL_UNI_W_V8_CALC v6, v19, v21, v23, v17, v24, v25
|
||||
EPEL_UNI_W_V8_CALC v6, v19, v21, v23, v17, v24, v25
|
||||
str q4, [x0]
|
||||
str d6, [x0, #16]
|
||||
add x0, x0, x1
|
||||
@@ -4505,7 +4505,7 @@ function ff_hevc_put_hevc_epel_uni_w_v24_8_neon, export=1
|
||||
subs w4, w4, #1
|
||||
add x2, x2, x3
|
||||
EPEL_UNI_W_V16_CALC v4, v5, v20, v22, v16, v18, v24, v25, v26, v27
|
||||
EPEL_UNI_W_V8_CALC v6, v21, v23, v17, v19, v24, v25
|
||||
EPEL_UNI_W_V8_CALC v6, v21, v23, v17, v19, v24, v25
|
||||
str q4, [x0]
|
||||
str d6, [x0, #16]
|
||||
add x0, x0, x1
|
||||
@@ -4514,7 +4514,7 @@ function ff_hevc_put_hevc_epel_uni_w_v24_8_neon, export=1
|
||||
subs w4, w4, #1
|
||||
add x2, x2, x3
|
||||
EPEL_UNI_W_V16_CALC v4, v5, v22, v16, v18, v20, v24, v25, v26, v27
|
||||
EPEL_UNI_W_V8_CALC v6, v23, v17, v19, v21, v24, v25
|
||||
EPEL_UNI_W_V8_CALC v6, v23, v17, v19, v21, v24, v25
|
||||
str q4, [x0]
|
||||
str d6, [x0, #16]
|
||||
add x0, x0, x1
|
||||
|
||||
@@ -155,41 +155,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
|
||||
@@ -1295,7 +1295,7 @@ function ff_hevc_put_hevc_qpel_uni_v4_8_neon, export=1
|
||||
.endm
|
||||
1: calc_all
|
||||
.purgem calc
|
||||
2: ret
|
||||
2: ret
|
||||
endfunc
|
||||
|
||||
function ff_hevc_put_hevc_qpel_uni_v6_8_neon, export=1
|
||||
@@ -1324,7 +1324,7 @@ function ff_hevc_put_hevc_qpel_uni_v6_8_neon, export=1
|
||||
.endm
|
||||
1: calc_all
|
||||
.purgem calc
|
||||
2: ret
|
||||
2: ret
|
||||
endfunc
|
||||
|
||||
function ff_hevc_put_hevc_qpel_uni_v8_8_neon, export=1
|
||||
@@ -1351,7 +1351,7 @@ function ff_hevc_put_hevc_qpel_uni_v8_8_neon, export=1
|
||||
.endm
|
||||
1: calc_all
|
||||
.purgem calc
|
||||
2: ret
|
||||
2: ret
|
||||
endfunc
|
||||
|
||||
function ff_hevc_put_hevc_qpel_uni_v12_8_neon, export=1
|
||||
@@ -3038,7 +3038,7 @@ function ff_hevc_put_hevc_qpel_uni_w_h8_8_neon_i8mm, export=1
|
||||
zip1 v2.2d, v2.2d, v3.2d
|
||||
zip1 v4.2d, v4.2d, v5.2d
|
||||
zip1 v6.2d, v6.2d, v7.2d
|
||||
QPEL_UNI_W_H_CALC v0, v2, v4, v6, v18, v19, v20, v21
|
||||
QPEL_UNI_W_H_CALC v0, v2, v4, v6, v18, v19, v20, v21
|
||||
sqxtn v18.4h, v18.4s
|
||||
sqxtn2 v18.8h, v20.4s
|
||||
sqxtun v18.8b, v18.8h
|
||||
@@ -3067,7 +3067,7 @@ function ff_hevc_put_hevc_qpel_uni_w_h12_8_neon_i8mm, export=1
|
||||
zip1 v21.2d, v6.2d, v7.2d
|
||||
zip2 v22.2d, v16.2d, v1.2d
|
||||
zip2 v23.2d, v2.2d, v3.2d
|
||||
QPEL_UNI_W_H_CALC v18, v19, v20, v21, v0, v2, v4, v6
|
||||
QPEL_UNI_W_H_CALC v18, v19, v20, v21, v0, v2, v4, v6
|
||||
QPEL_UNI_W_H_CALC_HALF v22, v23, v24, v25
|
||||
sqxtn v0.4h, v0.4s
|
||||
sqxtn2 v0.8h, v4.4s
|
||||
@@ -3095,8 +3095,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h16_8_neon_i8mm, export=1
|
||||
ext v5.16b, v16.16b, v17.16b, #5
|
||||
ext v6.16b, v16.16b, v17.16b, #6
|
||||
ext v7.16b, v16.16b, v17.16b, #7
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v18, v19, v20, v21 // v18: 0, 8, 2, 10 v20: 1, 9, 3, 11
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v23, v24, v25 // v22: 4, 12, 6, 14 v24: 5, 13, 7, 15
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v18, v19, v20, v21 // v18: 0, 8, 2, 10 v20: 1, 9, 3, 11
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v23, v24, v25 // v22: 4, 12, 6, 14 v24: 5, 13, 7, 15
|
||||
sqxtn v0.4h, v18.4s
|
||||
sqxtn2 v0.8h, v22.4s
|
||||
sqxtn v1.4h, v20.4s
|
||||
@@ -3123,8 +3123,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h24_8_neon_i8mm, export=1
|
||||
ext v5.16b, v16.16b, v17.16b, #5
|
||||
ext v6.16b, v16.16b, v17.16b, #6
|
||||
ext v7.16b, v16.16b, v17.16b, #7
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v18, v19, v20, v21
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v23, v24, v25
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v18, v19, v20, v21
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v23, v24, v25
|
||||
sqxtn v18.4h, v18.4s
|
||||
sqxtn2 v18.8h, v22.4s
|
||||
sqxtn v19.4h, v20.4s
|
||||
@@ -3144,7 +3144,7 @@ function ff_hevc_put_hevc_qpel_uni_w_h24_8_neon_i8mm, export=1
|
||||
zip1 v2.2d, v2.2d, v3.2d
|
||||
zip1 v4.2d, v4.2d, v5.2d
|
||||
zip1 v6.2d, v6.2d, v7.2d
|
||||
QPEL_UNI_W_H_CALC v0, v2, v4, v6, v18, v19, v20, v21
|
||||
QPEL_UNI_W_H_CALC v0, v2, v4, v6, v18, v19, v20, v21
|
||||
sqxtn v18.4h, v18.4s
|
||||
sqxtn2 v18.8h, v20.4s
|
||||
sqxtun v27.8b, v18.8h
|
||||
@@ -3168,8 +3168,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h32_8_neon_i8mm, export=1
|
||||
ext v5.16b, v16.16b, v17.16b, #5
|
||||
ext v6.16b, v16.16b, v17.16b, #6
|
||||
ext v7.16b, v16.16b, v17.16b, #7
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v0, v19, v20, v21
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v23, v24, v25
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v0, v19, v20, v21
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v23, v24, v25
|
||||
sqxtn v0.4h, v0.4s
|
||||
sqxtn2 v0.8h, v22.4s
|
||||
sqxtn v19.4h, v20.4s
|
||||
@@ -3185,8 +3185,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h32_8_neon_i8mm, export=1
|
||||
ext v5.16b, v17.16b, v18.16b, #5
|
||||
ext v6.16b, v17.16b, v18.16b, #6
|
||||
ext v7.16b, v17.16b, v18.16b, #7
|
||||
QPEL_UNI_W_H_CALC v17, v2, v1, v3, v0, v19, v20, v21
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v23, v24, v25
|
||||
QPEL_UNI_W_H_CALC v17, v2, v1, v3, v0, v19, v20, v21
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v23, v24, v25
|
||||
sqxtn v0.4h, v0.4s
|
||||
sqxtn2 v0.8h, v22.4s
|
||||
sqxtn v19.4h, v20.4s
|
||||
@@ -3212,8 +3212,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h48_8_neon_i8mm, export=1
|
||||
ext v5.16b, v16.16b, v17.16b, #5
|
||||
ext v6.16b, v16.16b, v17.16b, #6
|
||||
ext v7.16b, v16.16b, v17.16b, #7
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
sqxtn v20.4h, v20.4s
|
||||
sqxtn2 v20.8h, v22.4s
|
||||
sqxtn v21.4h, v21.4s
|
||||
@@ -3229,8 +3229,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h48_8_neon_i8mm, export=1
|
||||
ext v5.16b, v17.16b, v18.16b, #5
|
||||
ext v6.16b, v17.16b, v18.16b, #6
|
||||
ext v7.16b, v17.16b, v18.16b, #7
|
||||
QPEL_UNI_W_H_CALC v17, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
QPEL_UNI_W_H_CALC v17, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
sqxtn v20.4h, v20.4s
|
||||
sqxtn2 v20.8h, v22.4s
|
||||
sqxtn v21.4h, v21.4s
|
||||
@@ -3246,8 +3246,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h48_8_neon_i8mm, export=1
|
||||
ext v5.16b, v18.16b, v19.16b, #5
|
||||
ext v6.16b, v18.16b, v19.16b, #6
|
||||
ext v7.16b, v18.16b, v19.16b, #7
|
||||
QPEL_UNI_W_H_CALC v18, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
QPEL_UNI_W_H_CALC v18, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
sqxtn v20.4h, v20.4s
|
||||
sqxtn2 v20.8h, v22.4s
|
||||
sqxtn v21.4h, v21.4s
|
||||
@@ -3276,8 +3276,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h64_8_neon_i8mm, export=1
|
||||
ext v5.16b, v16.16b, v17.16b, #5
|
||||
ext v6.16b, v16.16b, v17.16b, #6
|
||||
ext v7.16b, v16.16b, v17.16b, #7
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
QPEL_UNI_W_H_CALC v16, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
sqxtn v20.4h, v20.4s
|
||||
sqxtn2 v20.8h, v22.4s
|
||||
sqxtn v21.4h, v21.4s
|
||||
@@ -3293,8 +3293,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h64_8_neon_i8mm, export=1
|
||||
ext v5.16b, v17.16b, v18.16b, #5
|
||||
ext v6.16b, v17.16b, v18.16b, #6
|
||||
ext v7.16b, v17.16b, v18.16b, #7
|
||||
QPEL_UNI_W_H_CALC v17, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
QPEL_UNI_W_H_CALC v17, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
sqxtn v20.4h, v20.4s
|
||||
sqxtn2 v20.8h, v22.4s
|
||||
sqxtn v21.4h, v21.4s
|
||||
@@ -3310,8 +3310,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h64_8_neon_i8mm, export=1
|
||||
ext v5.16b, v18.16b, v19.16b, #5
|
||||
ext v6.16b, v18.16b, v19.16b, #6
|
||||
ext v7.16b, v18.16b, v19.16b, #7
|
||||
QPEL_UNI_W_H_CALC v18, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
QPEL_UNI_W_H_CALC v18, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
ld1 {v0.16b}, [x2], x3
|
||||
sqxtn v20.4h, v20.4s
|
||||
sqxtn2 v20.8h, v22.4s
|
||||
@@ -3328,8 +3328,8 @@ function ff_hevc_put_hevc_qpel_uni_w_h64_8_neon_i8mm, export=1
|
||||
ext v5.16b, v19.16b, v0.16b, #5
|
||||
ext v6.16b, v19.16b, v0.16b, #6
|
||||
ext v7.16b, v19.16b, v0.16b, #7
|
||||
QPEL_UNI_W_H_CALC v19, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
QPEL_UNI_W_H_CALC v19, v2, v1, v3, v20, v24, v21, v0
|
||||
QPEL_UNI_W_H_CALC v4, v6, v5, v7, v22, v24, v23, v0
|
||||
sqxtn v20.4h, v20.4s
|
||||
sqxtn2 v20.8h, v22.4s
|
||||
sqxtn v21.4h, v21.4s
|
||||
|
||||
@@ -50,13 +50,12 @@
|
||||
.endm
|
||||
|
||||
.macro pixels16_x2 rnd=1, avg=0
|
||||
1:
|
||||
ldur q1, [x1, #1]
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
1: ld1 {v0.16b, v1.16b}, [x1], x2
|
||||
ld1 {v2.16b, v3.16b}, [x1], x2
|
||||
subs w3, w3, #2
|
||||
ldur q3, [x1, #1]
|
||||
ld1 {v2.16b}, [x1], x2
|
||||
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
|
||||
@@ -109,20 +108,20 @@
|
||||
|
||||
.macro pixels16_xy2 rnd=1, avg=0
|
||||
sub w3, w3, #2
|
||||
ldur q1, [x1, #1]
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
ld1 {v0.16b, v1.16b}, [x1], x2
|
||||
ld1 {v4.16b, v5.16b}, [x1], x2
|
||||
NRND movi v26.8H, #1
|
||||
ldur q5, [x1, #1]
|
||||
ld1 {v4.16b}, [x1], x2
|
||||
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
|
||||
ldur q30, [x1, #1]
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
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
|
||||
NRND add v1.8H, v1.8H, v26.8H
|
||||
@@ -132,12 +131,12 @@ NRND add v1.8H, v1.8H, v26.8H
|
||||
urhadd v28.16b, v28.16b, v16.16b
|
||||
.endif
|
||||
uaddl v16.8h, v0.8b, v30.8b
|
||||
ldur q3, [x1, #1]
|
||||
ld1 {v2.16b}, [x1], x2
|
||||
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
|
||||
NRND add v0.8H, v0.8H, v26.8H
|
||||
@@ -151,10 +150,10 @@ NRND add v0.8H, v0.8H, v26.8H
|
||||
st1 {v30.16b}, [x0], x2
|
||||
b.gt 1b
|
||||
|
||||
ldur q30, [x1, #1]
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
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
|
||||
NRND add v1.8H, v1.8H, v26.8H
|
||||
@@ -207,11 +206,10 @@ NRND add v0.8H, v0.8H, v26.8H
|
||||
.endm
|
||||
|
||||
.macro pixels8_x2 rnd=1, avg=0
|
||||
1:
|
||||
ldur d1, [x1, #1]
|
||||
ld1 {v0.8b}, [x1], x2
|
||||
ldur d3, [x1, #1]
|
||||
ld1 {v2.8b}, [x1], x2
|
||||
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
|
||||
@@ -265,23 +263,22 @@ NRND add v0.8H, v0.8H, v26.8H
|
||||
.endm
|
||||
|
||||
.macro pixels8_xy2 rnd=1, avg=0
|
||||
ldur d4, [x1, #1]
|
||||
sub w3, w3, #2
|
||||
ld1 {v0.8b}, [x1], x2
|
||||
ld1 {v0.16b}, [x1], x2
|
||||
ld1 {v1.16b}, [x1], x2
|
||||
NRND movi v19.8H, #1
|
||||
ldur d6, [x1, #1]
|
||||
ld1 {v1.8b}, [x1], x2
|
||||
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
|
||||
ldur d4, [x1, #1]
|
||||
ld1 {v0.8b}, [x1], x2
|
||||
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
|
||||
ldur d6, [x1, #1]
|
||||
ld1 {v1.8b}, [x1], x2
|
||||
ld1 {v1.16b}, [x1], x2
|
||||
add v18.8h, v16.8h, v17.8h
|
||||
.if \avg
|
||||
ld1 {v7.8b}, [x0]
|
||||
@@ -294,13 +291,14 @@ NRND add v18.8H, v18.8H, v19.8H
|
||||
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
|
||||
b.gt 1b
|
||||
|
||||
ldur d4, [x1, #1]
|
||||
ld1 {v0.8b}, [x1], x2
|
||||
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
|
||||
|
||||
@@ -230,9 +230,6 @@ function \type\()_8tap_\size\()h_\idx1\idx2
|
||||
// reduced dst stride
|
||||
.if \size >= 16
|
||||
sub x1, x1, x5
|
||||
.elseif \size == 4
|
||||
add x12, x2, #8
|
||||
add x13, x7, #8
|
||||
.endif
|
||||
// size >= 16 loads two qwords and increments x2,
|
||||
// for size 4/8 it's enough with one qword and no
|
||||
@@ -251,14 +248,9 @@ function \type\()_8tap_\size\()h_\idx1\idx2
|
||||
.if \size >= 16
|
||||
ld1 {v4.8b, v5.8b, v6.8b}, [x2], #24
|
||||
ld1 {v16.8b, v17.8b, v18.8b}, [x7], #24
|
||||
.elseif \size == 8
|
||||
.else
|
||||
ld1 {v4.8b, v5.8b}, [x2]
|
||||
ld1 {v16.8b, v17.8b}, [x7]
|
||||
.else // \size == 4
|
||||
ld1 {v4.8b}, [x2]
|
||||
ld1 {v16.8b}, [x7]
|
||||
ld1 {v5.s}[0], [x12], x3
|
||||
ld1 {v17.s}[0], [x13], x3
|
||||
.endif
|
||||
uxtl v4.8h, v4.8b
|
||||
uxtl v5.8h, v5.8b
|
||||
|
||||
@@ -204,9 +204,7 @@ int av_ac3_parse_header(const uint8_t *buf, size_t size,
|
||||
AC3HeaderInfo hdr;
|
||||
int err;
|
||||
|
||||
err = init_get_bits8(&gb, buf, size);
|
||||
if (err < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
init_get_bits8(&gb, buf, size);
|
||||
err = ff_ac3_parse_header(&gb, &hdr);
|
||||
if (err < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
@@ -27,14 +27,9 @@
|
||||
int av_adts_header_parse(const uint8_t *buf, uint32_t *samples, uint8_t *frames)
|
||||
{
|
||||
#if CONFIG_ADTS_HEADER
|
||||
uint8_t tmpbuf[AV_AAC_ADTS_HEADER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
|
||||
GetBitContext gb;
|
||||
AACADTSHeaderInfo hdr;
|
||||
int err;
|
||||
if (!buf)
|
||||
return AVERROR(EINVAL);
|
||||
memcpy(tmpbuf, buf, AV_AAC_ADTS_HEADER_SIZE);
|
||||
err = init_get_bits8(&gb, tmpbuf, AV_AAC_ADTS_HEADER_SIZE);
|
||||
int err = init_get_bits8(&gb, buf, AV_AAC_ADTS_HEADER_SIZE);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = ff_adts_header_parse(&gb, &hdr);
|
||||
|
||||
+2
-1
@@ -466,7 +466,8 @@ static av_cold int aic_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
}
|
||||
|
||||
ctx->slice_data = av_calloc(ctx->slice_width, AIC_BAND_COEFFS * sizeof(*ctx->slice_data));
|
||||
ctx->slice_data = av_malloc_array(ctx->slice_width, AIC_BAND_COEFFS
|
||||
* sizeof(*ctx->slice_data));
|
||||
if (!ctx->slice_data) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error allocating slice buffer\n");
|
||||
|
||||
|
||||
+5
-9
@@ -2110,17 +2110,17 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
|
||||
if (sconf->floating) {
|
||||
ctx->acf = av_malloc_array(channels, sizeof(*ctx->acf));
|
||||
ctx->shift_value = av_calloc(channels, sizeof(*ctx->shift_value));
|
||||
ctx->last_shift_value = av_calloc(channels, sizeof(*ctx->last_shift_value));
|
||||
ctx->last_acf_mantissa = av_calloc(channels, sizeof(*ctx->last_acf_mantissa));
|
||||
ctx->shift_value = av_malloc_array(channels, sizeof(*ctx->shift_value));
|
||||
ctx->last_shift_value = av_malloc_array(channels, sizeof(*ctx->last_shift_value));
|
||||
ctx->last_acf_mantissa = av_malloc_array(channels, sizeof(*ctx->last_acf_mantissa));
|
||||
ctx->raw_mantissa = av_calloc(channels, sizeof(*ctx->raw_mantissa));
|
||||
|
||||
ctx->larray = av_malloc_array(ctx->cur_frame_length * 4, sizeof(*ctx->larray));
|
||||
ctx->nbits = av_malloc_array(ctx->cur_frame_length, sizeof(*ctx->nbits));
|
||||
ctx->mlz = av_mallocz(sizeof(*ctx->mlz));
|
||||
|
||||
if (!ctx->larray || !ctx->nbits || !ctx->mlz || !ctx->acf || !ctx->shift_value
|
||||
|| !ctx->last_shift_value || !ctx->last_acf_mantissa || !ctx->raw_mantissa) {
|
||||
if (!ctx->mlz || !ctx->acf || !ctx->shift_value || !ctx->last_shift_value
|
||||
|| !ctx->last_acf_mantissa || !ctx->raw_mantissa) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
@@ -2132,10 +2132,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
|
||||
for (c = 0; c < channels; ++c) {
|
||||
ctx->raw_mantissa[c] = av_calloc(ctx->cur_frame_length, sizeof(**ctx->raw_mantissa));
|
||||
if (!ctx->raw_mantissa[c]) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/channel_layout.h"
|
||||
#include "libavutil/common.h"
|
||||
#include "libavutil/lfg.h"
|
||||
@@ -555,8 +554,6 @@ static void decode_fixed_vector(float *fixed_vector, const uint16_t *pulse_hi,
|
||||
decode_6p_track(sig_pos[i], (int) pulse_lo[i] +
|
||||
((int) pulse_hi[i] << 11), 4, 1);
|
||||
break;
|
||||
default:
|
||||
av_assert2(0);
|
||||
}
|
||||
|
||||
memset(fixed_vector, 0, sizeof(float) * AMRWB_SFR_SIZE);
|
||||
|
||||
+1
-2
@@ -130,7 +130,7 @@ static int apac_decode(AVCodecContext *avctx, AVFrame *frame,
|
||||
APACContext *s = avctx->priv_data;
|
||||
GetBitContext *gb = &s->gb;
|
||||
int ret, n, buf_size, input_buf_size;
|
||||
uint8_t *buf;
|
||||
const uint8_t *buf;
|
||||
int nb_samples;
|
||||
|
||||
if (!pkt->size && s->bitstream_size <= 0) {
|
||||
@@ -160,7 +160,6 @@ static int apac_decode(AVCodecContext *avctx, AVFrame *frame,
|
||||
buf = &s->bitstream[s->bitstream_index];
|
||||
buf_size += s->bitstream_size;
|
||||
s->bitstream_size = buf_size;
|
||||
memset(buf + buf_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
||||
frame->nb_samples = s->bitstream_size * 16 * 8;
|
||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||
|
||||
+1
-1
@@ -1286,7 +1286,7 @@ static void predictor_decode_stereo_3950(APEContext *ctx, int count)
|
||||
int32_t left = a1 - (unsigned)(a0 / 2);
|
||||
int32_t right = left + (unsigned)a0;
|
||||
|
||||
if (FFMIN(FFNABS(left), FFNABS(right)) < -(1<<23)) {
|
||||
if (FFMAX(FFABS(left), FFABS(right)) > (1<<23)) {
|
||||
ctx->interim_mode = !interim_mode;
|
||||
av_log(ctx->avctx, AV_LOG_VERBOSE, "Interim mode: %d\n", ctx->interim_mode);
|
||||
break;
|
||||
|
||||
@@ -48,3 +48,4 @@ function ff_scalarproduct_int16_neon, export=1
|
||||
vmov.32 r0, d3[0]
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ A .endif
|
||||
.endif
|
||||
|
||||
// Begin loop
|
||||
1:
|
||||
01:
|
||||
.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 1b
|
||||
bne 01b
|
||||
.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 1b
|
||||
bne 01b
|
||||
.endif
|
||||
b 99f
|
||||
|
||||
|
||||
@@ -279,13 +279,11 @@ function \type\()_8tap_\size\()h_\idx1\idx2
|
||||
sub r1, r1, r5
|
||||
.endif
|
||||
@ size >= 16 loads two qwords and increments r2,
|
||||
@ size 4 loads 1 d word, increments r2 and loads 1 32-bit lane
|
||||
@ for size 8 it's enough with one qword and no postincrement
|
||||
@ for size 4/8 it's enough with one qword and no
|
||||
@ postincrement
|
||||
.if \size >= 16
|
||||
sub r3, r3, r5
|
||||
sub r3, r3, #8
|
||||
.elseif \size == 4
|
||||
sub r3, r3, #8
|
||||
.endif
|
||||
@ Load the filter vector
|
||||
vld1.16 {q0}, [r12,:128]
|
||||
@@ -297,14 +295,9 @@ function \type\()_8tap_\size\()h_\idx1\idx2
|
||||
.if \size >= 16
|
||||
vld1.8 {d18, d19, d20}, [r2]!
|
||||
vld1.8 {d24, d25, d26}, [r7]!
|
||||
.elseif \size == 8
|
||||
.else
|
||||
vld1.8 {q9}, [r2]
|
||||
vld1.8 {q12}, [r7]
|
||||
.else @ size == 4
|
||||
vld1.8 {d18}, [r2]!
|
||||
vld1.8 {d24}, [r7]!
|
||||
vld1.32 {d19[0]}, [r2]
|
||||
vld1.32 {d25[0]}, [r7]
|
||||
.endif
|
||||
vmovl.u8 q8, d18
|
||||
vmovl.u8 q9, d19
|
||||
|
||||
@@ -801,9 +801,7 @@ static int atrac9_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = init_get_bits8(&gb, avpkt->data, avpkt->size);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
init_get_bits8(&gb, avpkt->data, avpkt->size);
|
||||
|
||||
for (int i = 0; i < frames; i++) {
|
||||
for (int j = 0; j < s->block_config->count; j++) {
|
||||
@@ -923,9 +921,7 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
err = init_get_bits8(&gb, avctx->extradata + 4, avctx->extradata_size);
|
||||
if (err < 0)
|
||||
return err;
|
||||
init_get_bits8(&gb, avctx->extradata + 4, avctx->extradata_size);
|
||||
|
||||
if (get_bits(&gb, 8) != 0xFE) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Incorrect magic byte!\n");
|
||||
|
||||
+5
-43
@@ -358,30 +358,6 @@ static void coded_lossless_param(AV1DecContext *s)
|
||||
}
|
||||
}
|
||||
|
||||
static void order_hint_info(AV1DecContext *s)
|
||||
{
|
||||
const AV1RawFrameHeader *header = s->raw_frame_header;
|
||||
const AV1RawSequenceHeader *seq = s->raw_seq;
|
||||
AV1Frame *frame = &s->cur_frame;
|
||||
|
||||
frame->order_hint = header->order_hint;
|
||||
|
||||
for (int i = 0; i < AV1_REFS_PER_FRAME; i++) {
|
||||
int ref_name = i + AV1_REF_FRAME_LAST;
|
||||
int ref_slot = header->ref_frame_idx[i];
|
||||
int ref_order_hint = s->ref[ref_slot].order_hint;
|
||||
|
||||
frame->order_hints[ref_name] = ref_order_hint;
|
||||
if (!seq->enable_order_hint) {
|
||||
frame->ref_frame_sign_bias[ref_name] = 0;
|
||||
} else {
|
||||
frame->ref_frame_sign_bias[ref_name] =
|
||||
get_relative_dist(seq, ref_order_hint,
|
||||
frame->order_hint) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void load_grain_params(AV1DecContext *s)
|
||||
{
|
||||
const AV1RawFrameHeader *header = s->raw_frame_header;
|
||||
@@ -468,7 +444,7 @@ static int get_tiles_info(AVCodecContext *avctx, const AV1RawTileGroup *tile_gro
|
||||
static enum AVPixelFormat get_sw_pixel_format(void *logctx,
|
||||
const AV1RawSequenceHeader *seq)
|
||||
{
|
||||
int bit_depth;
|
||||
uint8_t bit_depth;
|
||||
enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE;
|
||||
|
||||
if (seq->seq_profile == 2 && seq->color_config.high_bitdepth)
|
||||
@@ -492,7 +468,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
|
||||
else if (bit_depth == 12)
|
||||
pix_fmt = AV_PIX_FMT_YUV444P12;
|
||||
else
|
||||
av_assert0(0);
|
||||
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
|
||||
} else if (seq->color_config.subsampling_x == 1 &&
|
||||
seq->color_config.subsampling_y == 0) {
|
||||
if (bit_depth == 8)
|
||||
@@ -502,7 +478,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
|
||||
else if (bit_depth == 12)
|
||||
pix_fmt = AV_PIX_FMT_YUV422P12;
|
||||
else
|
||||
av_assert0(0);
|
||||
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
|
||||
} else if (seq->color_config.subsampling_x == 1 &&
|
||||
seq->color_config.subsampling_y == 1) {
|
||||
if (bit_depth == 8)
|
||||
@@ -512,7 +488,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
|
||||
else if (bit_depth == 12)
|
||||
pix_fmt = AV_PIX_FMT_YUV420P12;
|
||||
else
|
||||
av_assert0(0);
|
||||
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
|
||||
}
|
||||
} else {
|
||||
if (bit_depth == 8)
|
||||
@@ -522,7 +498,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
|
||||
else if (bit_depth == 12)
|
||||
pix_fmt = AV_PIX_FMT_GRAY12;
|
||||
else
|
||||
av_assert0(0);
|
||||
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
|
||||
}
|
||||
|
||||
return pix_fmt;
|
||||
@@ -724,14 +700,6 @@ static int av1_frame_ref(AVCodecContext *avctx, AV1Frame *dst, const AV1Frame *s
|
||||
sizeof(dst->film_grain));
|
||||
dst->coded_lossless = src->coded_lossless;
|
||||
|
||||
dst->order_hint = src->order_hint;
|
||||
memcpy(dst->ref_frame_sign_bias, src->ref_frame_sign_bias,
|
||||
sizeof(dst->ref_frame_sign_bias));
|
||||
memcpy(dst->order_hints, src->order_hints,
|
||||
sizeof(dst->order_hints));
|
||||
|
||||
dst->force_integer_mv = src->force_integer_mv;
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
@@ -1287,14 +1255,8 @@ static int get_current_frame(AVCodecContext *avctx)
|
||||
global_motion_params(s);
|
||||
skip_mode_params(s);
|
||||
coded_lossless_param(s);
|
||||
order_hint_info(s);
|
||||
load_grain_params(s);
|
||||
|
||||
s->cur_frame.force_integer_mv =
|
||||
s->raw_frame_header->force_integer_mv ||
|
||||
s->raw_frame_header->frame_type == AV1_FRAME_KEY ||
|
||||
s->raw_frame_header->frame_type == AV1_FRAME_INTRA_ONLY;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,20 +53,6 @@ typedef struct AV1Frame {
|
||||
AV1RawFilmGrainParams film_grain;
|
||||
|
||||
uint8_t coded_lossless;
|
||||
|
||||
// OrderHint for this frame.
|
||||
uint8_t order_hint;
|
||||
// RefFrameSignBias[] used when decoding this frame.
|
||||
uint8_t ref_frame_sign_bias[AV1_TOTAL_REFS_PER_FRAME];
|
||||
// OrderHints[] when this is the current frame, otherwise
|
||||
// SavedOrderHints[s][] when is the reference frame in slot s.
|
||||
uint8_t order_hints[AV1_TOTAL_REFS_PER_FRAME];
|
||||
|
||||
// force_integer_mv value at the end of the frame header parsing.
|
||||
// This is not the same as the syntax element value in
|
||||
// raw_frame_header because the specification parsing tables
|
||||
// override the value on intra frames.
|
||||
uint8_t force_integer_mv;
|
||||
} AV1Frame;
|
||||
|
||||
typedef struct TileGroupInfo {
|
||||
|
||||
@@ -1175,10 +1175,6 @@ typedef struct AVCodecContext {
|
||||
* this callback and filled with the extra buffers if there are more
|
||||
* buffers than buf[] can hold. extended_buf will be freed in
|
||||
* av_frame_unref().
|
||||
* Decoders will generally initialize the whole buffer before it is output
|
||||
* but it can in rare error conditions happen that uninitialized data is passed
|
||||
* through. \important The buffers returned by get_buffer* should thus not contain sensitive
|
||||
* data.
|
||||
*
|
||||
* If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call
|
||||
* avcodec_default_get_buffer2() instead of providing buffers allocated by
|
||||
|
||||
@@ -72,15 +72,13 @@ static void parse_avs2_seq_header(AVCodecParserContext *s, const uint8_t *buf,
|
||||
unsigned aspect_ratio;
|
||||
unsigned frame_rate_code;
|
||||
int low_delay;
|
||||
av_unused int ret;
|
||||
// update buf_size_min if parse more deeper
|
||||
const int buf_size_min = 15;
|
||||
|
||||
if (buf_size < buf_size_min)
|
||||
return;
|
||||
|
||||
ret = init_get_bits8(&gb, buf, buf_size_min);
|
||||
av_assert1(ret >= 0);
|
||||
init_get_bits8(&gb, buf, buf_size_min);
|
||||
|
||||
s->key_frame = 1;
|
||||
s->pict_type = AV_PICTURE_TYPE_I;
|
||||
|
||||
@@ -73,8 +73,7 @@ static void parse_avs3_nal_units(AVCodecParserContext *s, const uint8_t *buf,
|
||||
GetBitContext gb;
|
||||
int profile, ratecode, low_delay;
|
||||
|
||||
av_unused int ret = init_get_bits(&gb, buf + 4, 100);
|
||||
av_assert1(ret >= 0);
|
||||
init_get_bits8(&gb, buf + 4, buf_size - 4);
|
||||
|
||||
s->key_frame = 1;
|
||||
s->pict_type = AV_PICTURE_TYPE_I;
|
||||
|
||||
@@ -536,8 +536,7 @@ static inline int BS_FUNC(read_vlc)(BSCTX *bc, const VLCElem *table,
|
||||
static inline int BS_FUNC(read_vlc_multi)(BSCTX *bc, uint8_t dst[8],
|
||||
const VLC_MULTI_ELEM *const Jtable,
|
||||
const VLCElem *const table,
|
||||
const int bits, const int max_depth,
|
||||
const int symbols_size)
|
||||
const int bits, const int max_depth)
|
||||
{
|
||||
unsigned idx = BS_FUNC(peek)(bc, bits);
|
||||
int ret, nb_bits, code, n = Jtable[idx].len;
|
||||
@@ -555,10 +554,7 @@ static inline int BS_FUNC(read_vlc_multi)(BSCTX *bc, uint8_t dst[8],
|
||||
code = BS_FUNC(priv_set_idx)(bc, code, &n, &nb_bits, table);
|
||||
}
|
||||
}
|
||||
if (symbols_size == 1)
|
||||
*dst = code;
|
||||
else
|
||||
AV_WN16(dst, code);
|
||||
AV_WN16(dst, code);
|
||||
ret = n > 0;
|
||||
}
|
||||
BS_FUNC(priv_skip_remaining)(bc, n);
|
||||
|
||||
@@ -208,49 +208,6 @@ static int h264_mp4toannexb_save_ps(uint8_t **dst, int *dst_size,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int h264_mp4toannexb_filter_ps(H264BSFContext *s,
|
||||
const uint8_t *buf,
|
||||
const uint8_t *buf_end)
|
||||
{
|
||||
int sps_count = 0;
|
||||
int pps_count = 0;
|
||||
uint8_t unit_type;
|
||||
|
||||
do {
|
||||
uint32_t nal_size = 0;
|
||||
|
||||
/* possible overread ok due to padding */
|
||||
for (int i = 0; i < s->length_size; i++)
|
||||
nal_size = (nal_size << 8) | buf[i];
|
||||
|
||||
buf += s->length_size;
|
||||
|
||||
/* This check requires the cast as the right side might
|
||||
* otherwise be promoted to an unsigned value. */
|
||||
if ((int64_t)nal_size > buf_end - buf)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (!nal_size)
|
||||
continue;
|
||||
|
||||
unit_type = *buf & 0x1f;
|
||||
|
||||
if (unit_type == H264_NAL_SPS) {
|
||||
h264_mp4toannexb_save_ps(&s->sps, &s->sps_size, &s->sps_buf_size, buf,
|
||||
nal_size, !sps_count);
|
||||
sps_count++;
|
||||
} else if (unit_type == H264_NAL_PPS) {
|
||||
h264_mp4toannexb_save_ps(&s->pps, &s->pps_size, &s->pps_buf_size, buf,
|
||||
nal_size, !pps_count);
|
||||
pps_count++;
|
||||
}
|
||||
|
||||
buf += nal_size;
|
||||
} while (buf < buf_end);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int h264_mp4toannexb_init(AVBSFContext *ctx)
|
||||
{
|
||||
int extra_size = ctx->par_in->extradata_size;
|
||||
@@ -306,14 +263,14 @@ static int h264_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *opkt)
|
||||
}
|
||||
|
||||
buf_end = in->data + in->size;
|
||||
ret = h264_mp4toannexb_filter_ps(s, in->data, buf_end);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
#define LOG_ONCE(...) \
|
||||
if (j) \
|
||||
av_log(__VA_ARGS__)
|
||||
for (int j = 0; j < 2; j++) {
|
||||
int sps_count = 0;
|
||||
int pps_count = 0;
|
||||
|
||||
buf = in->data;
|
||||
new_idr = s->new_idr;
|
||||
sps_seen = s->idr_sps_seen;
|
||||
@@ -344,8 +301,18 @@ static int h264_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *opkt)
|
||||
|
||||
if (unit_type == H264_NAL_SPS) {
|
||||
sps_seen = new_idr = 1;
|
||||
if (!j) {
|
||||
h264_mp4toannexb_save_ps(&s->sps, &s->sps_size, &s->sps_buf_size,
|
||||
buf, nal_size, !sps_count);
|
||||
sps_count++;
|
||||
}
|
||||
} else if (unit_type == H264_NAL_PPS) {
|
||||
pps_seen = new_idr = 1;
|
||||
if (!j) {
|
||||
h264_mp4toannexb_save_ps(&s->pps, &s->pps_size, &s->pps_buf_size,
|
||||
buf, nal_size, !pps_count);
|
||||
pps_count++;
|
||||
}
|
||||
/* if SPS has not been seen yet, prepend the AVCC one to PPS */
|
||||
if (!sps_seen) {
|
||||
if (!s->sps_size) {
|
||||
|
||||
@@ -148,7 +148,6 @@ second_field:
|
||||
AV_WB32(out->data + second_field_offset + 36, sod_offset[1] - second_field_offset);
|
||||
|
||||
out->size = bytestream2_tell_p(&pb);
|
||||
memset(out->data + out->size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
||||
ret = av_packet_copy_props(out, in);
|
||||
if (ret < 0)
|
||||
|
||||
+6
-14
@@ -36,7 +36,7 @@ static int cbs_av1_read_uvlc(CodedBitstreamContext *ctx, GetBitContext *gbc,
|
||||
CBS_TRACE_READ_START();
|
||||
|
||||
zeroes = 0;
|
||||
while (zeroes < 32) {
|
||||
while (1) {
|
||||
if (get_bits_left(gbc) < 1) {
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid uvlc code at "
|
||||
"%s: bitstream ended.\n", name);
|
||||
@@ -49,18 +49,10 @@ static int cbs_av1_read_uvlc(CodedBitstreamContext *ctx, GetBitContext *gbc,
|
||||
}
|
||||
|
||||
if (zeroes >= 32) {
|
||||
// The spec allows at least thirty-two zero bits followed by a
|
||||
// one to mean 2^32-1, with no constraint on the number of
|
||||
// zeroes. The libaom reference decoder does not match this,
|
||||
// instead reading thirty-two zeroes but not the following one
|
||||
// to mean 2^32-1. These two interpretations are incompatible
|
||||
// and other implementations may follow one or the other.
|
||||
// Therefore we reject thirty-two zeroes because the intended
|
||||
// behaviour is not clear.
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR, "Thirty-two zero bits in "
|
||||
"%s uvlc code: considered invalid due to conflicting "
|
||||
"standard and reference decoder behaviour.\n", name);
|
||||
return AVERROR_INVALIDDATA;
|
||||
// Note that the spec allows an arbitrarily large number of
|
||||
// zero bits followed by a one bit in this case, but the
|
||||
// libaom implementation does not support it.
|
||||
value = MAX_UINT_BITS(32);
|
||||
} else {
|
||||
if (get_bits_left(gbc) < zeroes) {
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid uvlc code at "
|
||||
@@ -309,7 +301,7 @@ static int cbs_av1_write_increment(CodedBitstreamContext *ctx, PutBitContext *pb
|
||||
return AVERROR(ENOSPC);
|
||||
|
||||
if (len > 0)
|
||||
put_bits(pbc, len, (1U << len) - 1 - (value != range_max));
|
||||
put_bits(pbc, len, (1 << len) - 1 - (value != range_max));
|
||||
|
||||
CBS_TRACE_WRITE_END_NO_SUBSCRIPTS();
|
||||
|
||||
|
||||
@@ -708,11 +708,7 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
|
||||
|
||||
start = bytestream2_tell(&gbc);
|
||||
for(i = 0; i < num_nalus; i++) {
|
||||
if (bytestream2_get_bytes_left(&gbc) < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
size = bytestream2_get_be16(&gbc);
|
||||
if (bytestream2_get_bytes_left(&gbc) < size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
bytestream2_skip(&gbc, size);
|
||||
}
|
||||
end = bytestream2_tell(&gbc);
|
||||
|
||||
@@ -790,21 +790,6 @@ static int FUNC(vps) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
infer(vps_each_layer_is_an_ols_flag, 1);
|
||||
infer(vps_num_ptls_minus1, 0);
|
||||
}
|
||||
|
||||
for (i = 0; i <= current->vps_num_ptls_minus1; i++) {
|
||||
if (i > 0)
|
||||
flags(vps_pt_present_flag[i], 1, i);
|
||||
else
|
||||
infer(vps_pt_present_flag[i], 1);
|
||||
|
||||
if (!current->vps_default_ptl_dpb_hrd_max_tid_flag)
|
||||
us(3, vps_ptl_max_tid[i], 0, current->vps_max_sublayers_minus1, 1, i);
|
||||
else
|
||||
infer(vps_ptl_max_tid[i], current->vps_max_sublayers_minus1);
|
||||
}
|
||||
while (byte_alignment(rw) != 0)
|
||||
fixed(1, vps_ptl_alignment_zero_bit, 0);
|
||||
|
||||
{
|
||||
//calc NumMultiLayerOlss
|
||||
int m;
|
||||
@@ -930,6 +915,19 @@ static int FUNC(vps) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
for (i = 0; i <= current->vps_num_ptls_minus1; i++) {
|
||||
if (i > 0)
|
||||
flags(vps_pt_present_flag[i], 1, i);
|
||||
else
|
||||
infer(vps_pt_present_flag[i], 1);
|
||||
|
||||
if (!current->vps_default_ptl_dpb_hrd_max_tid_flag)
|
||||
us(3, vps_ptl_max_tid[i], 0, current->vps_max_sublayers_minus1, 1, i);
|
||||
else
|
||||
infer(vps_ptl_max_tid[i], current->vps_max_sublayers_minus1);
|
||||
}
|
||||
while (byte_alignment(rw) != 0)
|
||||
fixed(1, vps_ptl_alignment_zero_bit, 0);
|
||||
for (i = 0; i <= current->vps_num_ptls_minus1; i++) {
|
||||
CHECK(FUNC(profile_tier_level) (ctx, rw,
|
||||
current->vps_profile_tier_level + i,
|
||||
@@ -1618,8 +1616,6 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||
ub(7, sps_extension_7bits);
|
||||
|
||||
if (current->sps_range_extension_flag) {
|
||||
if (current->sps_bitdepth_minus8 <= 10 - 8)
|
||||
return AVERROR_INVALIDDATA;
|
||||
CHECK(FUNC(sps_range_extension)(ctx, rw, current));
|
||||
} else {
|
||||
infer(sps_extended_precision_flag, 0);
|
||||
@@ -3225,27 +3221,19 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
flag(sh_cabac_init_flag);
|
||||
else
|
||||
infer(sh_cabac_init_flag, 0);
|
||||
if (ph->ph_temporal_mvp_enabled_flag) {
|
||||
if (!pps->pps_rpl_info_in_ph_flag) {
|
||||
if (current->sh_slice_type == VVC_SLICE_TYPE_B)
|
||||
flag(sh_collocated_from_l0_flag);
|
||||
else
|
||||
infer(sh_collocated_from_l0_flag, 1);
|
||||
if ((current->sh_collocated_from_l0_flag &&
|
||||
current->num_ref_idx_active[0] > 1) ||
|
||||
(!current->sh_collocated_from_l0_flag &&
|
||||
current->num_ref_idx_active[1] > 1)) {
|
||||
unsigned int idx = current->sh_collocated_from_l0_flag ? 0 : 1;
|
||||
ue(sh_collocated_ref_idx, 0, current->num_ref_idx_active[idx] - 1);
|
||||
} else {
|
||||
infer(sh_collocated_ref_idx, 0);
|
||||
}
|
||||
if (ph->ph_temporal_mvp_enabled_flag && !pps->pps_rpl_info_in_ph_flag) {
|
||||
if (current->sh_slice_type == VVC_SLICE_TYPE_B)
|
||||
flag(sh_collocated_from_l0_flag);
|
||||
else
|
||||
infer(sh_collocated_from_l0_flag, 1);
|
||||
if ((current->sh_collocated_from_l0_flag &&
|
||||
current->num_ref_idx_active[0] > 1) ||
|
||||
(!current->sh_collocated_from_l0_flag &&
|
||||
current->num_ref_idx_active[1] > 1)) {
|
||||
unsigned int idx = current->sh_collocated_from_l0_flag ? 0 : 1;
|
||||
ue(sh_collocated_ref_idx, 0, current->num_ref_idx_active[idx] - 1);
|
||||
} else {
|
||||
if (current->sh_slice_type == VVC_SLICE_TYPE_B)
|
||||
infer(sh_collocated_from_l0_flag, ph->ph_collocated_from_l0_flag);
|
||||
else
|
||||
infer(sh_collocated_from_l0_flag, 1);
|
||||
infer(sh_collocated_ref_idx, ph->ph_collocated_ref_idx);
|
||||
infer(sh_collocated_ref_idx, 0);
|
||||
}
|
||||
}
|
||||
if (!pps->pps_wp_info_in_ph_flag &&
|
||||
|
||||
@@ -145,13 +145,13 @@ static int cbs_jpeg_split_fragment(CodedBitstreamContext *ctx,
|
||||
}
|
||||
} else {
|
||||
i = start;
|
||||
if (i > frag->data_size - 2) {
|
||||
if (i + 2 > frag->data_size) {
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid JPEG image: "
|
||||
"truncated at %02x marker.\n", marker);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
length = AV_RB16(frag->data + i);
|
||||
if (length > frag->data_size - i) {
|
||||
if (i + length > frag->data_size) {
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid JPEG image: "
|
||||
"truncated at %02x marker segment.\n", marker);
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
@@ -375,7 +375,7 @@ static int cbs_vp9_split_fragment(CodedBitstreamContext *ctx,
|
||||
superframe_header = frag->data[frag->data_size - 1];
|
||||
|
||||
if ((superframe_header & 0xe0) == 0xc0) {
|
||||
VP9RawSuperframeIndex sfi = {0};
|
||||
VP9RawSuperframeIndex sfi;
|
||||
GetBitContext gbc;
|
||||
size_t index_size, pos;
|
||||
int i;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/buffer.h"
|
||||
#include "libavutil/common.h"
|
||||
#include "libavutil/imgutils.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "libavutil/pixdesc.h"
|
||||
|
||||
@@ -276,9 +275,6 @@ static int alloc_buffers(AVCodecContext *avctx)
|
||||
int height = (i || bayer) ? s->coded_height >> chroma_y_shift : s->coded_height;
|
||||
ptrdiff_t stride = (FFALIGN(width / 8, 8) + 64) * 8;
|
||||
|
||||
if ((ret = av_image_check_size2(stride, height, avctx->max_pixels, s->coded_format, 0, avctx)) < 0)
|
||||
return ret;
|
||||
|
||||
if (chroma_y_shift && !bayer)
|
||||
height = FFALIGN(height / 8, 2) * 8;
|
||||
s->plane[i].width = width;
|
||||
|
||||
@@ -258,8 +258,8 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (avctx->height < 32) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Height must be >= 32.\n");
|
||||
if (avctx->height < 4) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Height must be >= 4.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx)
|
||||
s->plane[i].dwt_buf =
|
||||
av_calloc(h8 * 8 * w8 * 8, sizeof(*s->plane[i].dwt_buf));
|
||||
s->plane[i].dwt_tmp =
|
||||
av_calloc(h8 * 8 * w8 * 8, sizeof(*s->plane[i].dwt_tmp));
|
||||
av_malloc_array(h8 * 8 * w8 * 8, sizeof(*s->plane[i].dwt_tmp));
|
||||
if (!s->plane[i].dwt_buf || !s->plane[i].dwt_tmp)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
@@ -553,7 +553,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
width, height * 2);
|
||||
}
|
||||
|
||||
ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (4LL * avctx->width * (avctx->height + 15) + 2048LL));
|
||||
ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (2LL * avctx->width * (avctx->height + 15) + 2048LL));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -761,6 +761,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
} else if (count > 0) {
|
||||
count = put_runcode(pb, count, rb);
|
||||
}
|
||||
|
||||
put_bits(pb, cb[index].size, cb[index].bits);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,3 +90,4 @@ const FFCodec ff_cljr_decoder = {
|
||||
FF_CODEC_DECODE_CB(decode_frame),
|
||||
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||
};
|
||||
|
||||
|
||||
@@ -250,7 +250,6 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
|
||||
}
|
||||
|
||||
av_freep(&codec->extradata);
|
||||
codec->extradata_size = 0;
|
||||
if (par->extradata) {
|
||||
codec->extradata = av_mallocz(par->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!codec->extradata)
|
||||
|
||||
+4
-10
@@ -220,12 +220,10 @@ static int cri_decode_frame(AVCodecContext *avctx, AVFrame *p,
|
||||
if (bytestream2_get_le32(gb) != 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
break;
|
||||
case 102:;
|
||||
int read_len = FFMIN(length, sizeof(codec_name) - 1);
|
||||
if (read_len != bytestream2_get_buffer(gb, codec_name, read_len))
|
||||
return AVERROR_INVALIDDATA;
|
||||
length -= read_len;
|
||||
if (strncmp(codec_name, "cintel_craw", read_len))
|
||||
case 102:
|
||||
bytestream2_get_buffer(gb, codec_name, FFMIN(length, sizeof(codec_name) - 1));
|
||||
length -= FFMIN(length, sizeof(codec_name) - 1);
|
||||
if (strncmp(codec_name, "cintel_craw", FFMIN(length, sizeof(codec_name) - 1)))
|
||||
return AVERROR_INVALIDDATA;
|
||||
compressed = 1;
|
||||
goto skip;
|
||||
@@ -236,14 +234,10 @@ static int cri_decode_frame(AVCodecContext *avctx, AVFrame *p,
|
||||
s->data_size = length;
|
||||
goto skip;
|
||||
case 105:
|
||||
if (length <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
hflip = bytestream2_get_byte(gb) != 0;
|
||||
length--;
|
||||
goto skip;
|
||||
case 106:
|
||||
if (length <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
vflip = bytestream2_get_byte(gb) != 0;
|
||||
length--;
|
||||
goto skip;
|
||||
|
||||
+1
-2
@@ -428,8 +428,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
} else if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
|
||||
ret = !got_frame ? AVERROR(EAGAIN)
|
||||
: discard_samples(avctx, frame, discarded_samples);
|
||||
} else
|
||||
av_assert0(0);
|
||||
}
|
||||
|
||||
if (ret == AVERROR(EAGAIN))
|
||||
av_frame_unref(frame);
|
||||
|
||||
@@ -337,3 +337,4 @@ const AVDVProfile *av_dv_codec_profile2(int width, int height,
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -240,7 +240,7 @@ static int get_opcodes(GetByteContext *gb, uint32_t *table, uint8_t *dst, int op
|
||||
|
||||
size_in_bits = bytestream2_get_le32(gb);
|
||||
endoffset = ((size_in_bits + 7) >> 3) - 4;
|
||||
if ((int)endoffset <= 0 || bytestream2_get_bytes_left(gb) < endoffset)
|
||||
if (endoffset <= 0 || bytestream2_get_bytes_left(gb) < endoffset)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
offset = endoffset;
|
||||
|
||||
+5
-5
@@ -117,7 +117,7 @@ static int dxva_get_decoder_configuration(AVCodecContext *avctx,
|
||||
|
||||
for (i = 0; i < cfg_count; i++) {
|
||||
unsigned score;
|
||||
UINT ConfigBitstreamRaw = 0;
|
||||
UINT ConfigBitstreamRaw;
|
||||
GUID guidConfigBitstreamEncryption;
|
||||
|
||||
#if CONFIG_D3D11VA
|
||||
@@ -268,7 +268,7 @@ static int dxva_get_decoder_guid(AVCodecContext *avctx, void *service, void *sur
|
||||
*decoder_guid = ff_GUID_NULL;
|
||||
for (i = 0; dxva_modes[i].guid; i++) {
|
||||
const dxva_mode *mode = &dxva_modes[i];
|
||||
int validate = 0;
|
||||
int validate;
|
||||
if (!dxva_check_codec_compatibility(avctx, mode))
|
||||
continue;
|
||||
|
||||
@@ -805,7 +805,7 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
|
||||
unsigned type, const void *data, unsigned size,
|
||||
unsigned mb_count)
|
||||
{
|
||||
void *dxva_data = NULL;
|
||||
void *dxva_data;
|
||||
unsigned dxva_size;
|
||||
int result;
|
||||
HRESULT hr = 0;
|
||||
@@ -827,7 +827,7 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
|
||||
type, (unsigned)hr);
|
||||
return -1;
|
||||
}
|
||||
if (dxva_data && size <= dxva_size) {
|
||||
if (size <= dxva_size) {
|
||||
memcpy(dxva_data, data, size);
|
||||
|
||||
#if CONFIG_D3D11VA
|
||||
@@ -905,7 +905,7 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
#endif
|
||||
DECODER_BUFFER_DESC *buffer = NULL, *buffer_slice = NULL;
|
||||
int result, runs = 0;
|
||||
HRESULT hr = -1;
|
||||
HRESULT hr;
|
||||
unsigned type;
|
||||
FFDXVASharedContext *sctx = DXVA_SHARED_CONTEXT(avctx);
|
||||
|
||||
|
||||
+1
-4
@@ -194,15 +194,12 @@ static int cmv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
if ((ret = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0)
|
||||
return ret;
|
||||
|
||||
buf += EA_PREAMBLE_SIZE;
|
||||
if (!(buf[0]&1) && buf_end - buf < s->width * s->height * (int64_t)(100 - s->avctx->discard_damaged_percentage) / 100)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
|
||||
return ret;
|
||||
|
||||
memcpy(frame->data[1], s->palette, AVPALETTE_SIZE);
|
||||
|
||||
buf += EA_PREAMBLE_SIZE;
|
||||
if ((buf[0]&1)) { // subtype
|
||||
cmv_decode_inter(s, frame, buf+2, buf_end);
|
||||
frame->flags &= ~AV_FRAME_FLAG_KEY;
|
||||
|
||||
+1
-2
@@ -178,8 +178,7 @@ static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte,
|
||||
dc[4] = bytestream2_get_byte(gbyte);
|
||||
dc[5] = bytestream2_get_byte(gbyte);
|
||||
} else if (mode == 6) {
|
||||
if (bytestream2_get_buffer(gbyte, dc, 6) != 6)
|
||||
return AVERROR_INVALIDDATA;
|
||||
bytestream2_get_buffer(gbyte, dc, 6);
|
||||
} else if (mode == 12) {
|
||||
for (i = 0; i < 6; i++) {
|
||||
dc[i] = bytestream2_get_byte(gbyte);
|
||||
|
||||
@@ -739,11 +739,6 @@ int ff_encode_preinit(AVCodecContext *avctx)
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if (avctx->bit_rate < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "The encoder bitrate is negative.\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE &&
|
||||
!(avctx->codec->capabilities & AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "The copy_opaque flag is set, but the "
|
||||
|
||||
+2
-5
@@ -334,10 +334,7 @@ static int huf_unpack_enc_table(GetByteContext *gb,
|
||||
return ret;
|
||||
|
||||
for (; im <= iM; im++) {
|
||||
int l;
|
||||
if (get_bits_left(&gbit) < 6)
|
||||
return AVERROR_INVALIDDATA;
|
||||
l = freq[im] = get_bits(&gbit, 6);
|
||||
uint64_t l = freq[im] = get_bits(&gbit, 6);
|
||||
|
||||
if (l == LONG_ZEROCODE_RUN) {
|
||||
int zerun = get_bits(&gbit, 8) + SHORTEST_LONG_RUN;
|
||||
@@ -1942,7 +1939,7 @@ static int decode_header(EXRContext *s, AVFrame *frame)
|
||||
"preview", 16)) >= 0) {
|
||||
uint32_t pw = bytestream2_get_le32(gb);
|
||||
uint32_t ph = bytestream2_get_le32(gb);
|
||||
uint64_t psize = pw * (uint64_t)ph;
|
||||
uint64_t psize = pw * ph;
|
||||
if (psize > INT64_MAX / 4) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto fail;
|
||||
|
||||
@@ -103,13 +103,6 @@ av_cold int ff_ffv1_init_slices_state(FFV1Context *f)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ff_need_new_slices(int width, int num_h_slices, int chroma_shift) {
|
||||
int mpw = 1<<chroma_shift;
|
||||
int i = width * (int64_t)(num_h_slices - 1) / num_h_slices;
|
||||
|
||||
return width % mpw && (width - i) % mpw == 0;
|
||||
}
|
||||
|
||||
av_cold int ff_ffv1_init_slice_contexts(FFV1Context *f)
|
||||
{
|
||||
int i, max_slice_count = f->num_h_slices * f->num_v_slices;
|
||||
|
||||
@@ -142,7 +142,6 @@ int ff_ffv1_init_slice_contexts(FFV1Context *f);
|
||||
int ff_ffv1_allocate_initial_states(FFV1Context *f);
|
||||
void ff_ffv1_clear_slice_state(const FFV1Context *f, FFV1Context *fs);
|
||||
int ff_ffv1_close(AVCodecContext *avctx);
|
||||
int ff_need_new_slices(int width, int num_h_slices, int chroma_shift);
|
||||
|
||||
static av_always_inline int fold(int diff, int bits)
|
||||
{
|
||||
|
||||
@@ -50,3 +50,4 @@ static inline int RENAME(get_context)(PlaneContext *p, TYPE *src,
|
||||
p->quant_table[1][(LT - T) & 0xFF] +
|
||||
p->quant_table[2][(T - RT) & 0xFF];
|
||||
}
|
||||
|
||||
|
||||
@@ -80,11 +80,6 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState *const state,
|
||||
k++;
|
||||
i += i;
|
||||
}
|
||||
if (k > bits) {
|
||||
ff_dlog(NULL, "k-overflow bias:%d error:%d drift:%d count:%d k:%d",
|
||||
state->bias, state->error_sum, state->drift, state->count, k);
|
||||
k = bits;
|
||||
}
|
||||
|
||||
v = get_sr_golomb(gb, k, 12, bits);
|
||||
ff_dlog(NULL, "v:%d bias:%d error:%d drift:%d count:%d k:%d",
|
||||
@@ -368,7 +363,7 @@ static int decode_slice(AVCodecContext *c, void *arg)
|
||||
if (fs->ac != AC_GOLOMB_RICE && f->version > 2) {
|
||||
int v;
|
||||
get_rac(&fs->c, (uint8_t[]) { 129 });
|
||||
v = fs->c.bytestream_end - fs->c.bytestream - 2 - 5*!!f->ec;
|
||||
v = fs->c.bytestream_end - fs->c.bytestream - 2 - 5*f->ec;
|
||||
if (v) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "bytestream end mismatching by %d\n", v);
|
||||
fs->slice_damaged = 1;
|
||||
@@ -1133,6 +1128,7 @@ const FFCodec ff_ffv1_decoder = {
|
||||
FF_CODEC_DECODE_CB(decode_frame),
|
||||
UPDATE_THREAD_CONTEXT(update_thread_context),
|
||||
.p.capabilities = AV_CODEC_CAP_DR1 |
|
||||
AV_CODEC_CAP_SLICE_THREADS,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||
AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP |
|
||||
FF_CODEC_CAP_ALLOCATE_PROGRESS,
|
||||
};
|
||||
|
||||
+12
-23
@@ -199,7 +199,7 @@ static av_always_inline av_flatten void put_symbol_inline(RangeCoder *c,
|
||||
} while (0)
|
||||
|
||||
if (v) {
|
||||
const unsigned a = is_signed ? FFABS(v) : v;
|
||||
const int a = FFABS(v);
|
||||
const int e = av_log2(a);
|
||||
put_rac(c, state + 0, 0);
|
||||
if (e <= 9) {
|
||||
@@ -526,11 +526,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
avctx->slices > 1)
|
||||
s->version = FFMAX(s->version, 2);
|
||||
|
||||
if ((avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) && s->ac == AC_GOLOMB_RICE) {
|
||||
av_log(avctx, AV_LOG_ERROR, "2 Pass mode is not possible with golomb coding\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
// Unspecified level & slices, we choose version 1.2+ to ensure multithreaded decodability
|
||||
if (avctx->slices == 0 && avctx->level < 0 && avctx->width * avctx->height > 720*576)
|
||||
s->version = FFMAX(s->version, 2);
|
||||
@@ -555,7 +550,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
s->version = FFMAX(s->version, 3);
|
||||
|
||||
if ((s->version == 2 || s->version>3) && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Version 2 or 4 needed for requested features but version 2 or 4 is experimental and not enabled\n");
|
||||
av_log(avctx, AV_LOG_ERROR, "Version 2 needed for requested features but version 2 is experimental and not enabled\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
@@ -727,21 +722,19 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
s->quant_tables[1][2][i]= 11*11*quant5 [i];
|
||||
s->quant_tables[1][3][i]= 5*11*11*quant5 [i];
|
||||
s->quant_tables[1][4][i]= 5*5*11*11*quant5 [i];
|
||||
s->context_count[0] = (11 * 11 * 11 + 1) / 2;
|
||||
s->context_count[1] = (11 * 11 * 5 * 5 * 5 + 1) / 2;
|
||||
} else {
|
||||
s->quant_tables[0][0][i]= quant9_10bit[i];
|
||||
s->quant_tables[0][1][i]= 9*quant9_10bit[i];
|
||||
s->quant_tables[0][2][i]= 9*9*quant9_10bit[i];
|
||||
s->quant_tables[0][1][i]= 11*quant9_10bit[i];
|
||||
s->quant_tables[0][2][i]= 11*11*quant9_10bit[i];
|
||||
s->quant_tables[1][0][i]= quant9_10bit[i];
|
||||
s->quant_tables[1][1][i]= 9*quant9_10bit[i];
|
||||
s->quant_tables[1][2][i]= 9*9*quant5_10bit[i];
|
||||
s->quant_tables[1][3][i]= 5*9*9*quant5_10bit[i];
|
||||
s->quant_tables[1][4][i]= 5*5*9*9*quant5_10bit[i];
|
||||
s->context_count[0] = (9 * 9 * 9 + 1) / 2;
|
||||
s->context_count[1] = (9 * 9 * 5 * 5 * 5 + 1) / 2;
|
||||
s->quant_tables[1][1][i]= 11*quant9_10bit[i];
|
||||
s->quant_tables[1][2][i]= 11*11*quant5_10bit[i];
|
||||
s->quant_tables[1][3][i]= 5*11*11*quant5_10bit[i];
|
||||
s->quant_tables[1][4][i]= 5*5*11*11*quant5_10bit[i];
|
||||
}
|
||||
}
|
||||
s->context_count[0] = (11 * 11 * 11 + 1) / 2;
|
||||
s->context_count[1] = (11 * 11 * 5 * 5 * 5 + 1) / 2;
|
||||
memcpy(s->quant_table, s->quant_tables[s->context_model],
|
||||
sizeof(s->quant_table));
|
||||
|
||||
@@ -873,10 +866,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
continue;
|
||||
if (maxw * maxh * (int64_t)(s->bits_per_raw_sample+1) * plane_count > 8<<24)
|
||||
continue;
|
||||
if (s->version < 4)
|
||||
if ( ff_need_new_slices(avctx->width , s->num_h_slices, s->chroma_h_shift)
|
||||
||ff_need_new_slices(avctx->height, s->num_v_slices, s->chroma_v_shift))
|
||||
continue;
|
||||
if (avctx->slices == s->num_h_slices * s->num_v_slices && avctx->slices <= MAX_SLICES || !avctx->slices)
|
||||
goto slices_ok;
|
||||
}
|
||||
@@ -925,8 +914,8 @@ static void encode_slice_header(FFV1Context *f, FFV1Context *fs)
|
||||
|
||||
put_symbol(c, state, (fs->slice_x +1)*f->num_h_slices / f->width , 0);
|
||||
put_symbol(c, state, (fs->slice_y +1)*f->num_v_slices / f->height , 0);
|
||||
put_symbol(c, state, 0, 0);
|
||||
put_symbol(c, state, 0, 0);
|
||||
put_symbol(c, state, (fs->slice_width +1)*f->num_h_slices / f->width -1, 0);
|
||||
put_symbol(c, state, (fs->slice_height+1)*f->num_v_slices / f->height-1, 0);
|
||||
for (j=0; j<f->plane_count; j++) {
|
||||
put_symbol(c, state, f->plane[j].quant_table_index, 0);
|
||||
av_assert0(f->plane[j].quant_table_index == f->context_model);
|
||||
|
||||
@@ -201,3 +201,4 @@ static int RENAME(encode_rgb_frame)(FFV1Context *s, const uint8_t *src[4],
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,6 @@ int avpriv_fits_header_init(FITSHeader *header, FITSHeaderState state)
|
||||
{
|
||||
header->state = state;
|
||||
header->naxis_index = 0;
|
||||
header->naxis = 0;
|
||||
memset(header->naxisn, 0, sizeof(header->naxisn));
|
||||
header->blank_found = 0;
|
||||
header->pcount = 0;
|
||||
header->gcount = 1;
|
||||
|
||||
@@ -519,8 +519,6 @@ static int check_header_mismatch(FLACParseContext *fpc,
|
||||
for (i = 0; i < FLAC_MAX_SEQUENTIAL_HEADERS && curr != child; i++)
|
||||
curr = curr->next;
|
||||
|
||||
av_assert0(i < FLAC_MAX_SEQUENTIAL_HEADERS);
|
||||
|
||||
if (header->link_penalty[i] < FLAC_HEADER_CRC_FAIL_PENALTY ||
|
||||
header->link_penalty[i] == FLAC_HEADER_NOT_PENALIZED_YET) {
|
||||
FLACHeaderMarker *start, *end;
|
||||
|
||||
@@ -100,6 +100,7 @@ static int decode_type2(GetByteContext *gb, PutByteContext *pb)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
repeat = 0;
|
||||
}
|
||||
repeat = 1;
|
||||
}
|
||||
|
||||
@@ -667,8 +667,7 @@ static av_always_inline int get_vlc2(GetBitContext *s, const VLCElem *table,
|
||||
static inline int get_vlc_multi(GetBitContext *s, uint8_t *dst,
|
||||
const VLC_MULTI_ELEM *const Jtable,
|
||||
const VLCElem *const table,
|
||||
const int bits, const int max_depth,
|
||||
const int symbols_size)
|
||||
const int bits, const int max_depth)
|
||||
{
|
||||
dst[0] = get_vlc2(s, table, bits, max_depth);
|
||||
return 1;
|
||||
|
||||
@@ -146,10 +146,7 @@ static int update_frame_pool(AVCodecContext *avctx, AVFrame *frame)
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
pool->pools[0] = av_buffer_pool_init(pool->linesize[0],
|
||||
CONFIG_MEMORY_POISONING ?
|
||||
NULL :
|
||||
av_buffer_allocz);
|
||||
pool->pools[0] = av_buffer_pool_init(pool->linesize[0], NULL);
|
||||
if (!pool->pools[0]) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto fail;
|
||||
|
||||
@@ -402,7 +402,6 @@ static inline int get_ur_golomb(GetBitContext *gb, int k, int limit,
|
||||
log = av_log2(buf);
|
||||
|
||||
if (log > 31 - limit) {
|
||||
av_assert2(log >= k);
|
||||
buf >>= log - k;
|
||||
buf += (30U - log) << k;
|
||||
LAST_SKIP_BITS(re, gb, 32 + k - log);
|
||||
@@ -425,8 +424,6 @@ static inline int get_ur_golomb(GetBitContext *gb, int k, int limit,
|
||||
|
||||
/**
|
||||
* read unsigned golomb rice code (jpegls).
|
||||
*
|
||||
* @returns -1 on error
|
||||
*/
|
||||
static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit,
|
||||
int esc_len)
|
||||
@@ -538,8 +535,6 @@ static inline int get_sr_golomb(GetBitContext *gb, int k, int limit,
|
||||
|
||||
/**
|
||||
* read signed golomb rice code (flac).
|
||||
*
|
||||
* @returns INT_MIN on error
|
||||
*/
|
||||
static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit,
|
||||
int esc_len)
|
||||
|
||||
@@ -429,7 +429,6 @@ int ff_h263_decode_frame(AVCodecContext *avctx, AVFrame *pict,
|
||||
MpegEncContext *s = avctx->priv_data;
|
||||
int ret;
|
||||
int slice_ret = 0;
|
||||
int bak_width, bak_height;
|
||||
|
||||
/* no supplementary picture */
|
||||
if (buf_size == 0) {
|
||||
@@ -481,9 +480,6 @@ retry:
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
bak_width = s->width;
|
||||
bak_height = s->height;
|
||||
|
||||
/* let's go :-) */
|
||||
if (CONFIG_WMV2_DECODER && s->msmpeg4_version == 5) {
|
||||
ret = ff_wmv2_decode_picture_header(s);
|
||||
@@ -501,12 +497,11 @@ retry:
|
||||
}
|
||||
|
||||
if (ret < 0 || ret == FRAME_SKIPPED) {
|
||||
if ( s->width != bak_width
|
||||
|| s->height != bak_height) {
|
||||
if ( s->width != avctx->coded_width
|
||||
|| s->height != avctx->coded_height) {
|
||||
av_log(s->avctx, AV_LOG_WARNING, "Reverting picture dimensions change due to header decoding failure\n");
|
||||
s->width = bak_width;
|
||||
s->height= bak_height;
|
||||
|
||||
s->width = avctx->coded_width;
|
||||
s->height= avctx->coded_height;
|
||||
}
|
||||
}
|
||||
if (ret == FRAME_SKIPPED)
|
||||
|
||||
@@ -579,11 +579,9 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
|
||||
|
||||
if (codec_id == AV_CODEC_ID_VVC)
|
||||
ret = vvc_parse_nal_header(nal, logctx);
|
||||
else if (codec_id == AV_CODEC_ID_HEVC) {
|
||||
else if (codec_id == AV_CODEC_ID_HEVC)
|
||||
ret = hevc_parse_nal_header(nal, logctx);
|
||||
if (nal->nuh_layer_id == 63)
|
||||
continue;
|
||||
} else
|
||||
else
|
||||
ret = h264_parse_nal_header(nal, logctx);
|
||||
if (ret < 0) {
|
||||
av_log(logctx, AV_LOG_WARNING, "Invalid NAL unit %d, skipping.\n",
|
||||
|
||||
@@ -621,7 +621,8 @@ int ff_h2645_sei_to_frame(AVFrame *frame, H2645SEI *sei,
|
||||
if (!sd)
|
||||
av_buffer_unref(&a53->buf_ref);
|
||||
a53->buf_ref = NULL;
|
||||
avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
|
||||
if (avctx)
|
||||
avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < sei->unregistered.nb_buf_ref; i++) {
|
||||
@@ -717,7 +718,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
else
|
||||
fgc->present = fgc->persistence_flag;
|
||||
|
||||
avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN;
|
||||
if (avctx)
|
||||
avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN;
|
||||
}
|
||||
|
||||
#if CONFIG_HEVC_SEI
|
||||
|
||||
@@ -407,7 +407,7 @@ static av_always_inline void mc_part_weighted(const H264Context *h, H264SliceCon
|
||||
/* don't optimize for luma-only case, since B-frames usually
|
||||
* use implicit weights => chroma too. */
|
||||
uint8_t *tmp_cb = sl->bipred_scratchpad;
|
||||
uint8_t *tmp_cr = sl->bipred_scratchpad + (8 << pixel_shift + (chroma_idc == 3));
|
||||
uint8_t *tmp_cr = sl->bipred_scratchpad + (16 << pixel_shift);
|
||||
uint8_t *tmp_y = sl->bipred_scratchpad + 16 * sl->mb_uvlinesize;
|
||||
int refn0 = sl->ref_cache[0][scan8[n]];
|
||||
int refn1 = sl->ref_cache[1][scan8[n]];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user