1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-12 19:18:44 +02:00
Commit Graph

110463 Commits

Author SHA1 Message Date
Sil Vilerino
a9a2ddaea8 lavu/hwcontext_qsv: Update after adding support for VAAPI on Windows
- qsv_internal.h: Remove unnecessary include va_drm.h
- qsv_internal.h: Enable AVCODEC_QSV_LINUX_SESSION_HANDLE on Linux/VA only
- hwcontext_qsv.c: Do not allow child_device_type VAAPI for Windows until
  support is added, keep D3D11/DXVA2 as more prioritary defaults.

Initial review at https://github.com/intel-media-ci/ffmpeg/pull/619/

Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Reviewed-by: Wu, Tong1 <tong1.wu@intel.com>
2023-04-24 13:24:41 +08:00
Sil Vilerino
5ff1430452 fftools/ffmpeg_opt: Document VAAPI -device usage for DirectX Adapter
Initial review at https://github.com/intel-media-ci/ffmpeg/pull/619/

Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Reviewed-by: Wu, Tong1 <tong1.wu@intel.com>
2023-04-24 13:24:41 +08:00
Sil Vilerino
d54127c41a lavu/hwcontext_vaapi: Add Windows/VAAPI support with vaGetDisplayWin32
Libva 2.17+ adds a new libva-win32 node and Mesa 22.3 adds a VAAPI driver
based on Direct3D 12 for Windows. Both of them are available at:
https://www.nuget.org/packages/Microsoft.Direct3D.VideoAccelerationCompatibilityPack

Initial review at https://github.com/intel-media-ci/ffmpeg/pull/619/

Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Reviewed-by: Wu, Tong1 <tong1.wu@intel.com>
2023-04-24 13:24:41 +08:00
Wang Yaqiang
734a61d282 avformat/movenc: fixed fmp4 packets containing incorrect flags after transcoding
When write multi-trun box, the MOV_TRUN_FIRST_SAMPLE_FLAGS flag
need judge by first param, not 0.
If the original video contains consecutive I frames,
this will cause the packets of fmp4 have error sample_flags ,
and then incorrect keyframes were generated,
and then error packet will be seeked.

Signed-off-by: Wang Yaqiang <wangyaqiang03@kuaishou.com>
Signed-off-by: Steven Liu <liuqi05@chinaffmpeg.org>
2023-04-24 09:46:10 +08:00
James Almer
9a258eefae fate/jpeg2000: add missing dependecy checks
Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-23 18:54:43 -03:00
Paul B Mahol
ef338cfd7b avfilter/af_afir: fix IR switching with different lengths 2023-04-23 23:40:42 +02:00
Thilo Borgmann
4dd3f2098c doc/developer: mention samples-request for FATE upload requests 2023-04-23 21:45:40 +02:00
Zhao Zhili
b56aca9b42 fftools/ffmpeg_mux: fix reporting muxer EOF as error
Fix #10327.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-04-23 21:23:11 +08:00
Pierre-Anthony Lemieux
7ecf1bff6d
fate/jpeg2000: add JPEG 2000 tests using ITU/ISO conformance materials
Adds JPEG 2000 decoder tests using materials from the conformance suite specified in
Rec. ITU-T T.803 | ISO/IEC 15444-4.

The test materials are available at https://gitlab.com/wg1/htj2k-codestreams

Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
2023-04-22 15:57:41 -07:00
caleb
b9c42cdf8d
avcodec/jpeg2000dec: add support for HTJ2K block decoding
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
2023-04-22 15:57:40 -07:00
caleb
4a466aab30
avcodec/jpeg2000dec: move decoder structs to a header file
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
2023-04-22 15:57:35 -07:00
Michael Niedermayer
cadd7e7a75
avcodec/vorbisdec: Check codebook float values to be finite
Fixes: Timeout
Fixes: 55116/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-4572159970508800

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-22 23:21:03 +02:00
Michael Niedermayer
99dc751782
tools/target_dec_fuzzer: Adjust threshold for EXR
Fixes: Timeout
Fixes: 55106/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5052199338377216

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-22 23:20:06 +02:00
Michael Niedermayer
38adbc6eeb
avcodec/g2meet: Replace fake allocation avoidance for framebuf
framebuf is only allocated when the new width/height are larger than the old
but nothing sets the old so its always allocated.
Use av_fast_mallocz() instead.

Fixes: Timeout
Fixes: 55094/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5116909932904448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-22 23:19:16 +02:00
Michael Niedermayer
eddf7e2a3e
avutil/tx_priv: Use unsigned in BF() to avoid signed overflows
Fixes: signed integer overflow: 100183269 - -2132769113 cannot be represented in type 'int'
Fixes: 55063/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5039294027005952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-22 21:17:07 +02:00
Paul B Mahol
014c02d43b avfilter/af_anlms: simplify query formats 2023-04-22 18:12:47 +02:00
James Almer
41bbf2e372 fate/h264: test disabling cropping
Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-22 11:20:58 -03:00
James Almer
95a78c08c1 avcodec/hevcdec: further constrain some slice header field values
num_ref_idx_l0_active_minus1, num_ref_idx_l1_active_minus1,
num_ref_idx_l0_default_active_minus1, and num_ref_idx_l1_default_active_minus1
are all in the range 0 to 14, inclusive.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-22 11:15:06 -03:00
Jun Zhao
73ddcad990 lavc/libopenh264: refine the code
refine the code

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2023-04-22 18:39:27 +08:00
Jun Zhao
de5e2570f0 lavc/libopenh264: Support full range videos in transcoding
Support full range videos when transcoding, enabled the
YUVJ420P to avoid auto scale from YUVJ420P to YUV420P

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2023-04-22 18:39:27 +08:00
James Almer
86645bf0a6 avcodec/pcm_rechunk_bsf: assert that in_pkt is empty after merging its data into out_pkt
If it's not empty here, then a leak would ocurr immediately after.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-21 17:14:36 -03:00
Leo Izen
453b524974
fate: add tests for RGB jpegs
Added framecrc tests for RGB JPEGs to verify future changes to the
decoder.
2023-04-21 09:55:12 -04:00
Leo Izen
869248c053
avcodec/mjpegdec: fix remaining RGB JPEGs
The change introduced in b18a9c2971
created a regression for non-subsampled progressive RGB jpegs. This
should fix that.

Additionally, this should fix other RGB JPEGs broken before the recent
patches, such as those in Trac issue #10190.
2023-04-21 09:55:08 -04:00
James Almer
0e1745774e fftools/ffprobe: fix printing AVFrame.crop_right
Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-21 09:25:53 -03:00
Steven Liu
4570ba5d86 fate/png-icc-parse: update ref data
When enable lcms2, the fate-png-icc-parse will get error bellow.
TEST    png-icc-parse
This because updated how PNG handles colors (no
longer using mastering display metadata for that).

Reviewed-by: Leo Izen <leo.izen@gmail.com>
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2023-04-21 14:06:37 +08:00
James Almer
adeb5b6c67 avcodec/pdvdec: honor the requested avctx->skip_frame value
The decoder is tagged as being FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, so might as
well make use of it.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-20 13:04:34 -03:00
Paul B Mahol
0dceda12e7 avcodec/pdvdec: fix leaks on init failure and when seeking 2023-04-20 17:13:45 +02:00
Paul B Mahol
dc2da568cf avformat: add PDV demuxer 2023-04-20 16:11:18 +02:00
Paul B Mahol
40bae5be5e avcodec: add PDV decoder 2023-04-20 15:44:38 +02:00
James Almer
0760528af2 avcodec/hevc_ps: use get_ue_golomb() for some PPS multilayer extension fields
Also remove the _plus* and _minus* parts of some of these to be in line with
other similar fields in the decoder.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-20 09:53:30 -03:00
James Almer
ab0f3f7fbf avcodec/hevc_ps: fix storage type for some PPS multilayer extension fields
The spec states that the range of values for them is −2^14 to 2^14 − 1, inclusive.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-20 09:53:30 -03:00
James Almer
7fece7676b avcodec/hevc_ps: further constrain allowed num_ref_loc_offsets values
The spec says: "The value of num_ref_loc_offsets shall be in the range of 0 to
vps_max_layers_minus1, inclusive".

Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-20 09:53:30 -03:00
Anton Khirnov
c17e33c058 fftools/ffmpeg: propagate frame durations to packets when encoding
Remove now-obsolete code setting packet durations pre-muxing for CFR
encoded video.

Changes output in the following FATE tests:
* numerous adpcm tests
* ffmpeg-filter_complex_audio
* lavf-asf
* lavf-mkv
* lavf-mkv_attachment
* matroska-encoding-delay
  All of these change due to the fact that the output duration is now
  the actual input data duration and does not include padding added by
  the encoder.

* apng-osample: less wrong packet durations are now passed to the muxer.
  They are not entirely correct, because the first frame duration should
  be 3 rather than 2. This is caused by the vsync code and should be
  addressed later, but this change is a step in the right direction.
* tscc2-mov: last output frame has a duration of 11 rather than 1 - this
  corresponds to the duration actually returned by the demuxer.
* film-cvid: video frame durations are now 2 rather than 1 - this
  corresponds to durations actually returned by the demuxer and matches
  the timestamps.
* mpeg2-ticket6677: durations of some video frames are now 2 rather than
  1 - this matches the timestamps.
2023-04-19 21:12:03 +02:00
Anton Khirnov
af286f17a1 fftools/ffmpeg_enc: set audio frame duration when encoding 2023-04-19 21:12:03 +02:00
Anton Khirnov
9a44e0335c fftools/sync_queue: update audio frame duration when re-chunking 2023-04-19 21:12:03 +02:00
Anton Khirnov
b088d59347 lavc/mjpegdec: properly set pts and duration for smvjpeg
A single smvjpeg packet decodes into one large mjpeg frame, slices of
which are then returned as output frames. Packet duration covers all of
these slices.
2023-04-19 21:12:03 +02:00
Anton Khirnov
7ec4881f3e lavc/mjpegdec: simplify smvjpeg_receive_frame()
Unify the code for returning the first and every subsequent frame in a
packet.
2023-04-19 21:12:03 +02:00
Anton Khirnov
6118be25e1 lavc/encode: do not use pkt_duration for encoding
Current code prefers deprecated AVFrame.pkt_duration over its
replacement AVFrame.duration whenever the former is set and not equal to
the latter. However, duration will only be actually used when the
caller sets the AV_CODEC_FLAG_FRAME_DURATION flag, which was added
_after_ AVFrame.duration.

This implies that any caller aware of AV_CODEC_FLAG_FRAME_DURATION is
also aware of AVFrame.duration. pkt_duration should then never be used.
2023-04-19 21:12:03 +02:00
Anton Khirnov
e392674399 lavfi: ensure audio frame durations match the sample count 2023-04-19 21:12:03 +02:00
Ronald S. Bultje
989ff02472 yuv4mpegenc: add bitdepth multiplier after rounding width.
Fixes output of HBD odd-width chroma.
2023-04-19 09:49:09 -04:00
James Almer
13450b6722 avcodec/mpegvideo_enc: ensure lmin is smaller than lmax
Fixes ticket #10234

Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-18 22:14:06 -03:00
Michael Niedermayer
1440bf15e2
avcodec/pcm_rechunk_bsf: unref packet before putting a new one in
Fixes: memleak
Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_BSF_PCM_RECHUNK_fuzzer-5562089618407424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-18 01:31:38 +02:00
Michael Niedermayer
e2c3aa8e2b
avcodec/lcldec: More space for rgb24
Fixes: Ticket 10239
Fixes: zlib_306_306_rgb24.av

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-18 01:31:38 +02:00
Michael Niedermayer
4ea28554db
avcodec/lcldec: 420 seems missing 2 bytes, ignore that
Fixes: Ticket 10238
Fixes: mszh_306_306_yuv420.avi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-18 01:31:38 +02:00
Michael Niedermayer
0cf1ac905d
avcodec/lcldec: Support 4:1:1 and 4:2:2 with odd width
Fixes: Ticket10240
Fixes: zlib_306_306_yuv422.avi
Fixes: zlib_306_306_yuv411.avi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-18 01:31:37 +02:00
Michael Niedermayer
3eb4e28c26
libavcodec/lcldec: width and height should not be unsigned
Computations like col < width - 3 will not work with unsigned width=1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-04-18 01:31:37 +02:00
Leo Izen
c3625ccfcd
avcodec/mjpegdec: fix regression with baseline RGB JPEGs
Commit b18a9c2971 introduced a regression
that broke some baseline RGB jpegs. (See Trac issue #4045). This fixes
that.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-04-17 10:44:31 -04:00
Anton Khirnov
0b0fa5c2a8 fftools/ffmpeg_enc: make data_size_enc private to encoding code
It is no longer used outside of ffmpeg_enc.c
2023-04-17 12:01:40 +02:00
Anton Khirnov
30699c103f fftools/ffmpeg_mux: make copy_initial_nonkeyframes private to muxing code
It is no longer used outside of ffmpeg_mux*
2023-04-17 12:01:40 +02:00
Anton Khirnov
7f8827f28e fftools/ffmpeg_mux: make copy_prior_start private to muxing code
It is no longer used outside of ffmpeg_mux*
2023-04-17 12:01:40 +02:00