- 18 Mar, 2022 10 commits
-
-
CTCaer authored
Various packets and players have different timestamps defined. For example old mpeg videos do not have PTS and many streaming apps or other players do not have or remove PTS. In such cases if user pts (reordered_opaque) is not set, set AV_NOPTS_VALUE instead of 0. In cases where user PTS is provided, use a flag so we know in capture plane that this is the case. Then set pts to AV_NOPTS_VALUE and reordered opaque properly. That works quite well with NVV4L2 because it reorders the frames automatically. And so we just need to set the proper timestamp on queued buffer, along with a flag to identify it's not PTS but user based PTS.
-
CTCaer authored
Some apps use different processes for init and decoding. NvBuffer transformations happen on both pids. So use NvBuffer Session as parameter to id in order to not cause a crash. That's because nvbuffer_utils can't handle gracefully any error. It just segfaults.
-
CTCaer authored
Sometimes the decoder can be opened with no packet sent or not many for a frame to be decoded. In such cases the thread will get stuck for 50s waiting for a resolution event to happen. Use the streamon and eos checks properly to get out of such a loop.
-
CTCaer authored
-
CTCaer authored
To enable, use `twopass=on` as encoder option. This also forces CBR mode, even if VBR was defined in options.
-
CTCaer authored
Transformations of formats to formats of simply Block linear to Pitch are done in HW. VIC is responsible for that and has the limitation that width must be aligned to 64 Bytes. This allows the decoder to work with every single non standard resolution, effectively bringing full support to any video. That is particularly important on emulators that use ffmpeg for decoding in game videos which sometimes are used as backgrounds. These have weird dimensions and need that fix. The output frame of course has the original line width.
-
CTCaer authored
Nvidia has the tendency to break compatibility on documented apis for no reason. Adding new values to enums in-between older values and not the end is unacceptable. A heuristic is now in use that can identify NvBuffer version and adjusts such values accordingly. That depends on using nvv4l2_ext_utils header with the specific values there.
-
CTCaer authored
-
CTCaer authored
Do not lock with mutexes until we need to do more in pools. Use atomics for now to lower latency.
-
CTCaer authored
Make needed headers builtin as this will help to bring compatibility from r32.3.1 till r32.7.1 and newer with a single build.
-
- 06 Mar, 2022 2 commits
- 05 Mar, 2022 2 commits
-
-
CTCaer authored
This enforces NVV4L2 even if user requests another codec. Additionally, it forces nvv4l2 to go through software codecs first to get context if needed.
-
CTCaer authored
Use `--enable-nvv4l2` to enable it. This Codec uses customized V4L2, called NVV4L2 that adds various features. NVV4L2 uses the Tegra HW video engines NVDEC and NVENC. Decoder features: - Codecs: MPEG2, MPEG4, H264, HEVC, VP8, VP9 - Output: YUV420, NV12 - Low latency mode for realtime streaming by using `AV_CODEC_FLAG_LOW_DELAY` - Higher throughput than original Nvidia specs and provided software. (Tegra X1: 4k@63, 1080p@265, 720p@439) Encoder features: - Codecs: H264, HEVC - Output: YUV420, YUV444, NV12, P010 - Higher throughput than original Nvidia specs and provided software. (Tegra X1: 4k@60, 1080p@202, 720p@414) - Options for H264: profile: baseline, main (default), high, high444 level: 1.0 to 5.1 (default). (5.1 is L4T kernel limitation. Max is 6.2.) rc: cbr, vbr (default) lossless: off (default), on. (Sets profile to high444 and constant QP to 0) preset: default (medium), slow, medium (default), fast, ultrafast num_capture_buffers: 1 to 32. (Default: 10) AVCodec defaults: b: 5M, g: 50, all others unchanged. - Options for HEVC: profile: main (default), main10 tier: main (default), high level: 1.0 to 6.2 (default) rc: cbr, vbr (default) lossless: off (default), on. (Sets constant QP to 0) preset: default (medium), slow, medium (default), fast, ultrafast num_capture_buffers: 1 to 32. (Default: 10) AVCodec defaults: b: 5M, g: 50, all others unchanged. Decoder to Encoder speed: FPS are halved. Some formats are supported from Tegra X1 and up. For more, check the NVDEC/NVENC version support matrix.
-
- 29 May, 2021 1 commit
-
-
Timo Rothenpieler authored
Leads to weird crashes with valid looking input data for otherwise unknown reasons.
-
- 22 May, 2021 1 commit
-
-
Martin Storsjö authored
This is marginally slower, but correct for all input values. The previous implementation failed with certain input seeds, e.g. "checkasm --test=hevc_idct 98". Signed-off-by:
Martin Storsjö <martin@martin.st> (cherry picked from commit f27e3ccf)
-
- 20 May, 2021 1 commit
-
-
Fei Wang authored
Previously, only the size of a given tile was passed, making the offset and size marked in VASliceParameterBufferAV1 invalid with multiple tiles. Signed-off-by:
Fei Wang <fei.w.wang@intel.com> (cherry picked from commit 9b131e85)
-
- 19 May, 2021 1 commit
-
-
Zane van Iperen authored
Fixes build failure on older SDKs without it. Fixes #9242 (cherry picked from commit f9eb440e ) Signed-off-by:
Zane van Iperen <zane@zanevaniperen.com>
-
- 14 May, 2021 1 commit
-
-
Anton Khirnov authored
They should be treated the same as APNG_DISPOSE_OP_NONE. Broken in 56633015. Fixes #9184. (cherry picked from commit aa726eae ) Signed-off-by:
Anton Khirnov <anton@khirnov.net>
-
- 13 May, 2021 1 commit
-
-
Jan Ekström authored
Otherwise the rate emulation logic in `transcode_step` never gets hit, and the unavailability flag never gets reset, leading to an eternal loop with some rate emulation use cases. This change was missed during the rework of ffmpeg.c, in which encoder initialization was moved further down the time line in commit 67be1ce0 . Previously, as the encoder initialization had happened earlier, this state was not possible (flow getting as far as hitting the rate emulation logic, yet not having the encoder initialized yet). Fixes #9160 (cherry picked from commit ec20b813)
-
- 12 May, 2021 2 commits
-
-
Andreas Rheinhardt authored
The SVQ1 decoder does not need mpegvideo or rl.c, but it uses stuff from h263data.c. But since 61fe4815 h263data.c called ff_rl_init() and this of course led to build errors when the SVQ1 decoder is enabled and mpegvideo disabled. Fix this by moving ff_h263_init_rl_inter() to h263.c. Fixes ticket #9224. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (cherry picked from commit e2301fea)
-
Andreas Rheinhardt authored
Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (cherry picked from commit 8f588eea)
-
- 10 May, 2021 1 commit
-
-
Andreas Rheinhardt authored
Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (cherry picked from commit 14a60253)
-
- 02 May, 2021 3 commits
-
-
James Almer authored
Finishes fixing ticket #9190. Signed-off-by:
James Almer <jamrial@gmail.com>
-
James Almer authored
Don't blindly copy all bytes in extradata past ChannelMappingFamily. Instead check if ChannelMappingFamily is not 0 and then only write the correct amount of bytes from ChannelMappingTable, as defined in the spec[1]. Fixes part of ticket #9190. [1] https://opus-codec.org/docs/opus_in_isobmff.html#4.3.2 Signed-off-by:
James Almer <jamrial@gmail.com>
-
James Almer authored
Fixes: stack-use-after-return Fixes: clusterfuzz-testcase-minimized-ffmpeg_BSF_AV1_METADATA_fuzzer-5931515701755904 Fixes: clusterfuzz-testcase-minimized-ffmpeg_BSF_AV1_METADATA_fuzzer-6105676541722624 Reviewed-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by:
James Almer <jamrial@gmail.com>
-
- 29 Apr, 2021 1 commit
-
-
Andreas Rheinhardt authored
NellyMoserEncodeContext.avctx is only set in init after these checks, yet it is used by encode_end(). This is a regression since 0a56bfa7 . Reviewed-by:
Michael Niedermayer <michael@niedermayer.cc> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (cherry picked from commit 652279e3)
-
- 24 Apr, 2021 1 commit
-
-
Brad Smith authored
Signed-off-by:
Brad Smith <brad@comstyle.com> Signed-off-by:
Marton Balint <cus@passwd.hu> (cherry picked from commit c8fb68ec)
-
- 18 Apr, 2021 1 commit
-
-
Timo Rothenpieler authored
Relying on the order of the enum is bad. It clashes with the new presets having to sit at the end of the list, so that they can be properly filtered out by the options parser on builds with older SDKs. So this refactors nvenc.c to instead rely on the internal NVENC_LOSSLESS flag. For this, the preset mapping has to happen much earlier, so it's moved from nvenc_setup_encoder to nvenc_setup_device and thus runs before the device capability check.
-
- 11 Apr, 2021 2 commits
-
-
Timo Rothenpieler authored
-
Timo Rothenpieler authored
-
- 10 Apr, 2021 1 commit
-
-
Andreas Rheinhardt authored
Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (cherry picked from commit 08c805f4)
-
- 09 Apr, 2021 1 commit
-
-
Michael Niedermayer authored
Found-by: <jamrial> Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
- 08 Apr, 2021 7 commits
-
-
Michael Niedermayer authored
Name suggested by Lynne, Gyan, Reto, Zane, Jan, Derek Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Michael Niedermayer authored
Fixes: out of array read Fixes: 32968/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSP2_fuzzer-5315296027082752 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit caaf4633 ) Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Michael Niedermayer authored
Fixes: Invalid read of size 4 Fixes: ASAN_Deadlysignal.zip Found-by:
Hardik Shah <hardik05@gmail.com> Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0f6a3405 ) Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Anton Khirnov authored
Calling av_frame_make_writable() from decoders is tricky, especially when frame threading is used. It is much simpler and safer to just make a private copy of the frame. This is not expected to have a major performance impact, since APNG_DISPOSE_OP_BACKGROUND is not used often and av_frame_make_writable() would typically make a copy anyway. Found-by:
James Almer <jamrial@gmail.com> Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit b593abda ) Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Marton Balint authored
Signed-off-by:
Marton Balint <cus@passwd.hu> (cherry picked from commit fb4da90f)
-
Marton Balint authored
Ugly, but a lot less broken than it was. Fixes ticket #9166. Signed-off-by:
Marton Balint <cus@passwd.hu> (cherry picked from commit 5dc5f289)
-
Anton Khirnov authored
The length does not cover the chunk type or CRC. (cherry picked from commit ae08eec6 ) Signed-off-by:
Anton Khirnov <anton@khirnov.net>
-