Frank Plowman
1e5f24d1a6
lavc/vvc: Remove floating point logic
...
This was the only floating point logic in the native VVC decoder.
Signed-off-by: Frank Plowman <post@frankplowman.com>
2024-11-11 19:31:00 +08:00
Zhao Zhili
994368be8f
x86/vvc: Fix build error for arch x86_32
...
There were static functions which built for x86_32, but the simd
functions they reference only available for x86_64.
2024-11-11 19:30:09 +08:00
Nuo Mi
c49001e338
avcodec/cbs_h266: Fix regression in DVB clip introduced by 93281630a7
...
This commit introduced a regression to VVC_HDR_UHDTV1_OpenGOP_3840x2160_50fps_HLG10_mosaic.ts.
Root Cause:
The AV_CEIL_RSHIFT(a, b) macro uses bit tricks that work only when -a is a negative value.
However, due to integer promotion rules, this behavior does not extend to the unsigned int type.
See "6.3.1.1 Boolean, characters, and integers" in the "ISO/IEC 9899" for details.
Reported-by: Frank Plowman <post@frankplowman.com>
2024-11-11 19:30:09 +08:00
Peter Ross
2f34b159b4
avcodec/eatgq: decode motion vector macroblocks
...
Signed-off-by: Peter Ross <pross@xvid.org>
2024-11-10 12:31:19 +11:00
Anton Khirnov
13129f1af4
lavc: deprecate the omx encoders
...
They have not been relevant for a long time, and support for this API is
also being dropped from other projects.
2024-11-09 02:46:17 +01:00
Peter Ross
2bbbf36fe2
avcodec/rv60: set populate_ipred src parameter to const
2024-11-09 08:50:59 +11:00
Peter Ross
006718c475
avcodec/rv60: align calc_sel_qp with reference decoder
...
Fixes ticket #11290 .
2024-11-09 08:50:59 +11:00
Peter Ross
c8c6319ce1
avcodec/rv60: prevent decode_cu_r deadlock
...
Fixes ticket #11289 (deadlock).
2024-11-09 08:50:59 +11:00
Peter Ross
4d4d171afb
avcodec/rv60: prevent decode_cu_r segfault
...
Fixes ticket #11289 (crash).
2024-11-09 08:50:59 +11:00
Peter Ross
923f45430c
avcodec/rv60: check init_get_bits8 return value
...
Fixes CID 1634471
2024-11-09 08:50:58 +11:00
Peter Ross
d51a920556
avcodec/rv60: negative qp guard
...
Fixes CID 1634472
2024-11-09 08:50:58 +11:00
Osamu Watanabe
82467b635e
avcodec/jpeg2000: Improve FF_DWT97_INT to pass ISO/IEC 15444-4 conformance tests
...
Fixes https://trac.ffmpeg.org/ticket/10123
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
2024-11-08 08:30:07 -08:00
Marth64
11c703be31
avcodec/mpeg12dec: set FF_CODEC_PROPERTY_CLOSED_CAPTIONS in mpeg_set_cc_format()
...
When Closed Captions are discovered, this method is always invoked.
Therefore, use it to set the property instead of repeating the statement.
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-11-07 21:27:04 -06:00
Araz Iusubov
f63f164125
avcodec/amfenc: GOP size check
...
Fix for the error with an invalid GOP size parameter.
2024-11-07 15:11:10 +01:00
Cameron Gutman
8503c64aa8
avcodec/amfenc: add support for QueryOutput wait
...
Enable waiting in QueryOutput() based on driver support to reduce
unnecessary delays.
Fix for issue #10622
Co-authored-by: Araz Iusubov <Primeadvice@gmail.com>
2024-11-06 19:38:36 +01:00
Araz Iusubov
eedcf939d8
avcodec/amfenc: Color information update
...
Processing of transfer characteristic SMPTE2084 and 8-bit depth added
on AMF side and will appear in one of upcoming releases.
2024-11-06 19:38:11 +01:00
Kacper Michajłow
7b20985d8d
avcodec/jpegxl_parser: check entropy_decoder_read_symbol return value
...
Found by OSS-Fuzz.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2024-11-05 08:44:43 -05:00
Michael Niedermayer
ebffb8b68e
avcodec/ffv1enc: Tighter maxsize
...
This allows using smaller buffers
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-11-03 19:20:40 +01:00
Peter Ross
33802e7c32
avcodec/rv60: RealVideo 6.0 decoder
...
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2024-11-03 10:53:15 +11:00
Timo Rothenpieler
d724584d68
avcodec/nvenc: set bitstreamRestrictionFlag when neccesary
...
This mimics the behaviour of libx264 for setting this flag.
Fixes #11131
2024-11-01 17:59:27 +01:00
Fei Wang
e726fdeb05
lavc/vaapi_dec: Add VVC decoder
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
4dc18c78cd
lavc/vvc_dec: Add hardware decode API
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
a94aa2d61e
lavc/vvc_ps: Add alf raw syntax into VVCALF
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
15a75e8e04
lavc/vvc_refs: Define VVC_FRAME_FLAG* to h header
...
So that hardware decoder can use the flags too.
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
6bb5dc2ae7
lavc/cbs_h266: Add NumSlicesInTile to H266RawPPS
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
e543a22c38
lavc/cbs_h266: Add SliceTopLeftTileIdx to H266RawPPS
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
f42978fe29
lavc/vaapi_decode: Use a more meaningful variable name
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
1d8c31d5e2
lavc/vaapi_dec: Create VA parameters dynamically
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Peter Ross
492a3b4b89
avcodec/vp56: decode interlace content
...
Modification of patch submitted by Aurelien Jacobs (November 2007).
Fixes ticket #5581 and #5582 .
2024-10-31 17:49:48 +11:00
Thomas Guillem
44a0a0c050
avcodec/decode: clean-up if get_hw_frames_parameters fails
...
Fixes the following assert:
[00007f1df83d17e0] vaapi generic error: avcodec_get_hw_frames_parameters failed: -22
Assertion p_dst->hwaccel_threadsafe || (!dst->hwaccel && !dst->internal->hwaccel_priv_data) failed at libavcodec/pthread_frame.c:349
Reproduced from VLC with VAAPI, when fallbacking from hw to sw.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-10-30 21:31:17 +08:00
Pierre-Anthony Lemieux
839f6d38a0
jpeg2000dec: fix tile-part header state reset
...
Fixes https://trac.ffmpeg.org/ticket/11266
2024-10-27 10:26:00 -07:00
Zhao Zhili
7fe9d12f25
avcodec/mediacodecdec_common: Workaround MTK broken crop implementation
...
MediaTek SOC return broken crop info, e.g.,
width: int32(3840) height: int32(2160) crop: Rect(0, 0, 318, 238)
It will notify the right crop info with infoOutputFormatChanged, but
too late.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-10-27 11:35:13 +08:00
Zhao Zhili
0ee18ff23d
avcodec/mediacodecenc: Extract configOBUs from AV1CodecConfigurationRecord
...
MediaCodec can generate AV1CodecConfigurationRecord, which shouldn't
be put into packet->data. Skip four bytes and extract configOBUs
if it exist.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-10-27 11:35:05 +08:00
James Almer
707e2184ca
avformat/riff: map Y416 fourcc to RAWVIDEO decoder
...
As defined in https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#422-formats
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-26 00:04:55 -03:00
James Almer
faec8763e8
avformat/riff: map Y210 and Y216 fourcc to RAWVIDEO decoder
...
As defined in https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#422-formats
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-25 19:41:07 -03:00
Dale Curtis
08b1bffa49
avcodec/h2645: allocate film grain metadata dynamically
...
Film grain support adds a huge amount of overhead to the H264Context
structure for a feature that is rarely used. On low end devices or
pages that have lots of media this bloats memory usage rapidly.
This changes the static film grain metadata allocations to be dynamic
which reduces the H264Context size from 851808 bytes to 53444 bytes.
Bug: https://crbug.com/359358875
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-25 01:02:35 +02:00
Michael Niedermayer
2c71366d3b
avcodec/ffv1: Implement new slice tiling
...
This fixes corner cases (requires version 4 or a spec update)
Fixes: Ticket5548
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-24 23:01:14 +02:00
Michael Niedermayer
d147b3d7ec
avcodec/rangecoder: only perform renorm check/loop for callers that need it
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-24 23:01:14 +02:00
James Almer
ae0ab5b7ce
avcodec/vulkan_video: add mapping for AV_PIX_FMT_Y216
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-23 20:06:03 -03:00
James Almer
e46a506ae0
avcodec/vulkan_video: add proper maps for XV3{0,6}
...
Forgotten after fd8b0dcfed .
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-23 20:06:03 -03:00
Nuo Mi
b611410569
avcodec/vvc/thread: Check frame to be non NULL
...
Fixes: NULL pointer dereference
Fixes: 71303/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4875859050168320
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reported-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-20 20:36:15 +08:00
Marvin Scholz
c98810ab47
avcodec/hw_base_encode: fix use after free on close
...
The way the linked list of images was freed caused a
use after free, by accessing pic->next after pic was
already freed.
Regression from 48a1a12968
Fix CID1633236
2024-10-18 11:18:41 +02:00
Michael Niedermayer
d0927ed0a8
libavcodec/ffv1enc: Add option to select the quantization table
...
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-16 21:41:19 +02:00
Michael Niedermayer
81a360a5ed
avcodec/ffv1: add a named constant for the quant table size
...
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-16 21:41:19 +02:00
Michael Niedermayer
2542e9296c
avcodec/ffv1: RCT is only possible with RGB
...
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-16 21:41:18 +02:00
James Almer
1f7268a44d
avcodec/vulkan_encode_h265: use the proper printf specifier for size_t
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-16 10:15:43 -03:00
James Almer
a61517598f
avcodec/vulkan_encode_h264: use the proper printf specifier for size_t
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-16 10:14:48 -03:00
Nuo Mi
a144e7b92e
avcodec/vvcdec: remove unused tb_pos_x0 and tb_pos_y0
...
This change will save approximately 531 MB for an 8K clip when processed with 16 threads.
The calculation is as follows:
7680 * 4320 * sizeof(int) * 2 * 2 * 16 / (4 * 4).
2024-10-16 20:28:09 +08:00
Nuo Mi
2e936f2c11
avcodec/vvdec: refact, ff_vvc_deblock_bs use CodingUnit/TransformUnit instead of fc->tabs
...
perf result for:
"perf record -F 99 ./ffmpeg_g -i Tango2_3840x2160_60_10_420_27_LD.266 -f null -"
before: 5.24%
1.87% ffmpeg_g [.] vvc_deblock_bs_chroma
1.72% ffmpeg_g [.] ff_vvc_deblock_bs
1.65% ffmpeg_g [.] vvc_deblock_bs_luma
after: 3.48%
1.84% ffmpeg_g [.] vvc_deblock_bs_chroma
1.64% ffmpeg_g [.] ff_vvc_deblock_bs + vvc_deblock_bs_luma(inlined)
2024-10-16 20:28:09 +08:00
Nuo Mi
d78b43ecf8
avcodec/vvcdec: misc, move pcmf from min_tu_tl_init to min_cb_nz_tl_init
...
pcmf are cu level flags
2024-10-16 20:28:09 +08:00