Age | Commit message (Collapse) | Author |
|
Signed-off-by: Steven Liu <lq@onvideo.cn>
|
|
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Hardware-accelerated encoding may not support 10-bit encoding. Use
'-require_sw 1' in this case.
Fixes: #7581
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Aman Gupta <aman@tmm1.net>
|
|
On macOS, a zero rc_max_rate cause an error from
VTSessionSetProperty(kVTCompressionPropertyKey_DataRateLimits).
on iOS (depending on device/version), a zero rc_max_rate cause invalid
arguments from the vtenc_output_callback after few frames and then a crash
within the VideoToolbox library.
Signed-off-by: Aman Gupta <aman@tmm1.net>
|
|
Cf. comment. Restart the VT session when the APP goes from foreground to
background and vice versa.
Signed-off-by: Aman Gupta <aman@tmm1.net>
|
|
Split vtenc_init() into vtenc_init() (VTEncContext initialization) and
vtenc_configure_encoder() (creates the vt session).
This commit will allow to restart the vt session while encoding.
Signed-off-by: Aman Gupta <aman@tmm1.net>
|
|
The leak could happen when the vtenc_create_encoder() function failed.
Signed-off-by: Aman Gupta <aman@tmm1.net>
|
|
Explicitly identify decoder/encoder wrappers with a common name. This
saves API users from guessing by the name suffix. For example, they
don't have to guess that "h264_qsv" is the h264 QSV implementation, and
instead they can just check the AVCodec .codec and .wrapper_name fields.
Explicitly mark AVCodec entries that are hardware decoders or most
likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
API users listing hardware decoders in a more generic way. The proposed
AVCodecHWConfig does not provide this information fully, because it's
concerned with decoder configuration, not information about the fact
whether the hardware is used or not.
AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
implementations in case the hardware is not capable.
Based on a patch by Philip Langdale <philipl@overt.org>.
Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.
|
|
Signed-off-by: Aman Gupta <aman@tmm1.net>
|
|
Cosmetic change only.
Signed-off-by: Aman Gupta <aman@tmm1.net>
|
|
Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Rodger Combs <rodger.combs@gmail.com>
|
|
This avoids confusion with equivalent H.265 SEI values when both are
being used at the same time.
(cherry picked from commit 6ea220cbeec8863e2006a03b73bed52db2b13ee7)
|
|
Checks for NULL before using object.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
|
|
Signed-off-by: James Almer <jamrial@gmail.com>
|
|
add kVTCompressionPropertyKey_DataRateLimits support by rc_max_bitrate
Reviewed-by: Rick Kern <kernrj@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
|
|
Removes explicit reference to symbols and fixes dereferencing issue.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Fixes #6081. Some dictionary keys are not present on OS X 10.8.
This loads the symbols and uses a default value if not present.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Handles insertion into existing SEI NAL unit, inserts emulation
prevention bytes.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Prevents encode callback from running after codec is closed.
Fixes a crash when an error is returned.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
VideoToolbox doesn't supply parameter sets until the first frame is done
encoding. This spins up a temporary encoder and encodes a single frame to
get this data.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Allocates a buffer with padding, and with enough room for start codes when
length codes are smaller.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Setting AVFrame.pic_type to AV_PICTURE_TYPE_I will force an I-frame.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Add frames_before and frames_after as hints that there will be frames before
or after the frames produced in this session. This may help with
concatenation issues like bit rate spikes.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Hint to the encoder that encoding should be done in real-time, even at the
expense of quality.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Some devices output an invalid DTS when B-frames aren't used. Using PTS for
the DTS in this case.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Now set by the encoder, not used as an input parameter.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Add an entropy setting to choose between CAVLC and CABAC.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Software encoding can be allowed by setting allow_sw to 1.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
Handle AV_PIX_FMT_VIDEOTOOLBOX.
This results in better energy usage and faster encoding, especially on iOS.
When the buffer comes from the media server, no memcpy's are needed.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
This reduces the chance of a memcpy in the media server.
Signed-off-by: Rick Kern <kernrj@gmail.com>
|
|
CMVideoFormatDescriptionGetH264ParameterSetAtIndex() fails on some
hardware/OS versions when retrieving the parameter set count alone.
Signed-off-by: Rick Kern <kernrj@gmail.com>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
|
|
Fixes crash in #5352. VTCompressionSessionInvalidate() crashes if the
internal encoder hasn't completed, but hasn't experienced an error.
The function call isn't needed since the encoder is invalidated when
the reference count reaches 0 anyway.
Signed-off-by: Rick Kern <kernrj@gmail.com>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
|
|
These macros were added in OS X 10.11, and the file compiles without warnings
on both 10.10 and 10.11 with them removed.
Thanks to mark4o on IRC for pointing out the failure and testing the patch.
|
|
Autodetected by default. Encode using -codec:v h264_videotoolbox.
Signed-off-by: Rick Kern <kernrj@gmail.com>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
|