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

45157 Commits

Author SHA1 Message Date
Zhong Li
c8bca9fe46 lavc/qsvenc: dump BufferSizeInKB message
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-09-02 20:02:02 +02:00
Zhong Li
e16b20782a lavc/qsvenc: allow to set qp range for h264 BRC
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-09-02 20:01:42 +02:00
Martin Storsjö
83678dbbae libopenh264dec: Export the decoded profile and level in AVCodecContext
Signed-off-by: Martin Storsjö <martin@martin.st>
2018-08-31 13:25:25 +03:00
Martin Storsjö
8c76bfacf6 tcp: Use ff_connect_parallel for RFC 8305 style connecting
Signed-off-by: Martin Storsjö <martin@martin.st>
2018-08-31 12:26:52 +03:00
Martin Storsjö
9b4c3f5aad network: Add RFC 8305 style "Happy Eyeballs"/"Fast Fallback" helper function
For cases with dual stack (IPv4 + IPv6) connectivity, but where one
stack potentially is less reliable, strive to trying to connect over
both protocols in parallel, using whichever address connected first.

In cases with a hostname resolving to multiple IPv4 and IPv6
addresses, the current connection mechanism would try all addresses
in the order returned by getaddrinfo (with all IPv6 addresses ordered
before the IPv4 addresses normally). If connection attempts to the
IPv6 addresses return quickly with an error, this was no problem, but
if they were unsuccessful leading up to timeouts, the connection process
would have to wait for timeouts on all IPv6 target addresses before
attempting any IPv4 address.

Similar to what RFC 8305 suggests, reorder the list of addresses to
try connecting to, interleaving address families. After starting one
connection attempt, start another one in parallel after a small delay
(200 ms as suggested by the RFC).

For cases with unreliable IPv6 but reliable IPv4, this should make
connection attempts work as reliably as with plain IPv4, with only an
extra 200 ms of connection delay.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-08-31 12:26:51 +03:00
Zhong Li
69caad8959 qsvdec: Release packet on decoding failure for mpeg2/vp8/vc1
H264/265 have been fixed such an issue with commit
559370f2c4.
Similar fixing is needed for other codecs.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-08-23 08:22:46 +02:00
Zhong Li
76eef04f30 qsvenc: Fix a misleading log message
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-08-23 08:22:45 +02:00
Zhong Li
e05e5920a4 qsv: Error out if getting session handle failed in avfilter
Solve some issues found by an automated code scansion.
Suppress the complain "variables 'handle' is used but maybe
uninitialized".

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-08-23 08:22:34 +02:00
James Almer
662558f985 decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 14:33:44 -03:00
James Almer
ad99cbc9b3 decode: flush the internal bsfs instead of constantly reinitalizing them
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 14:33:43 -03:00
James Almer
0e27e27670 h264_redundant_pps_bsf: implement a AVBSFContext.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 14:33:43 -03:00
James Almer
7f01c209f2 vp9_superframe_bsf: implement a AVBSFContext.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 14:33:43 -03:00
James Almer
eb1d1c764c vp9_superframe_split_bsf: implement a AVBSFContext.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 14:33:25 -03:00
James Almer
d6321851ba h264_mp4toannexb_bsf: implement a AVBSFContext.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 14:06:21 -03:00
James Almer
e1e1e8dbb2 bsf: add a flushing mechanism to AVBSFContext
Meant to reset the internal bsf state without the need to reinitialize it.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 14:06:21 -03:00
Martin Storsjö
6a9c00c09d tls_openssl: Fix checks for SSL_ERROR_WANT_WRITE in nonblocking operation
This was a typo in 0671eb2346, spotted by Chris Carroux.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-08-17 13:08:28 +03:00
Martin Storsjö
22f98ac19c network: Check for EINTR in ff_poll_interrupt
Signed-off-by: Martin Storsjö <martin@martin.st>
2018-08-14 22:30:33 +03:00
Simon Thelen
c194b9ad6d network: Use ff_neterrno instead of AVERROR(errno) for poll errors
This makes sure to pick up the actual error codes on windows.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-08-14 22:30:29 +03:00
Andrey Utkin
5d01bd181b http: pass return code from http_open_cnx_internal() on its failure
Previously, AVERROR(EIO) was returned on failure of
http_open_cnx_internal(). Now the value is passed to upper level, thus
it is possible to distinguish ECONNREFUSED, ETIMEDOUT, ENETUNREACH etc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-08-14 22:30:23 +03:00
Maxym Dmytrychenko
325aa63dd1 qsv: enforcing continuous memory layout
we need to make sure that memory allocation for Y/UV planes is continuous and re-used from a
pool

Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-08-06 22:30:18 +02:00
Luca Barbato
f89ec87afa frame: Simplify the video allocation 2018-08-05 22:45:08 +02:00
Martin Storsjö
e1e3a12242 libopenh264: Add support for decoding of b-frames
The current git master version of libopenh264 supports decoding of
b-frames.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-08-01 09:55:41 +03:00
wm4
c011beda26 avconv: make sure packets put into the muxing FIFO are refcounted
Some callers (like do_subtitle_out(), or do_streamcopy()) call this
with an AVPacket that is not refcounted. This can cause undefined
behavior.

Calling av_packet_move_ref() does not make a packet refcounted if it
isn't yet. (And it can't be made to, because it always succeeds,
and can't return ENOMEM.)

Call av_packet_ref() instead to make sure it's refcounted.

Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2018-08-01 09:55:34 +03:00
Dmitry Rogozhkin
c1bcd321ea avcodec/qsv: fix async support
Current implementations of qsv components incorrectly work with async level, they
actually try to work in async+1 level stepping into MFX_WRN_DEVICE_BUSY and polling
loop. This change address this misbehaviour.

Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Cc: Maxym Dmytrychenko <maxim.d33@gmail.com>
Cc: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-07-26 09:57:54 +02:00
Sven Dueking
f25117a428 libsrt: Pass the correct pointer for the passphrase
The passphrase field is a pointer already.

Bug-Id: https://github.com/Haivision/srt/issues/416
2018-07-13 18:36:11 +02:00
Martin Storsjö
b93026777a libfdk-aac: Use enum names instead of literal numbers for the output format
Signed-off-by: Martin Storsjö <martin@martin.st>
2018-07-06 23:03:32 +03:00
John Cox
52fd2afce8 configure: fix inline asm checks
Commit 8c893aa3cd removed quotes that were required to detect
inline asm:

check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }

The correct code is:

void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }

Commit message written by Frank Liberato <liberato@chromium.org>

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-06-29 13:43:28 +03:00
Zhong Li
4ce701b4e6 qsvenc: remove vcm option on Linux
1. vcm mode is only available for H264.
2. vcm is not supported on Linux, but it is shown when run "./avconv -h
encoder=h264_qsv |grep vcm". This shouldn't happen.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-06-11 13:33:52 +02:00
Zhong Li
f8060865f3 qsvenc: use the compression_level to replace private option
Use a common way to control target_usage, keeping consistent with vaapi
encoders. The private option preset is kept only for compatibility.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-06-11 13:33:23 +02:00
Sven Dueking
a507af97ee avformat/libsrt: add latency options and deprecate tspbdelay
Signed-off-by: Sven Dueking <sven.dueking@nablet.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-06-04 18:47:48 +02:00
Sven Dueking
ea8ae27a5e avformat/libsrt: add payload size option
Signed-off-by: Sven Dueking <sven.dueking@nablet.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-06-03 17:46:23 +02:00
Zhong Li
35ed7f93db qsvenc: Add an option to disable MFE mode
Provide proper aliases to enable/disable MFE.

The numeric values are ambiguous and misleading (e.g: user may misunderstand
setting mfmode to 1 is to enable MFE but actually it is to disable MFE, and
set it to be 5 or above is meaningless).

MFX_MF_MANUAL hasn't been exposed since it is to be implemented.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-05-24 14:37:23 +02:00
Diego Biurrun
e368b0cbfa tls_mbedtls: Use non-deprecated header file
/usr/include/mbedtls/net.h:29:2: warning: #warning "Deprecated header file: Superseded by mbedtls/net_sockets.h" [-Wcpp]
2018-04-26 11:27:08 +02:00
Diego Biurrun
ad5bbc4086 configure: Rename require_header() --> require_headers()
This renaming was overlooked in the previous check_header() rename.
2018-04-25 12:24:24 +02:00
Thomas Volkert
4130e05ff4 libavformat: add mbedTLS based TLS
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-04-25 10:34:12 +02:00
Diego Biurrun
39f3b6f3fc configure: Move add_fooflags() helper functions into canonical order 2018-04-20 12:00:11 +02:00
Diego Biurrun
5691c746cf configure: Group toolchain parameter mangling functions together 2018-04-20 12:00:11 +02:00
Diego Biurrun
5cb62f9d95 configure: Rename check_header() --> check_headers()
The plural in the name clarifies the fact that the function
can check for multiple headers at once.
2018-04-20 12:00:11 +02:00
Diego Biurrun
25c2a27c9e configure: Make require_cc() and require_cpp_condition() functions consistent
Their API and implementation is different from other require_foo() functions,
which violates the rule of least astonishment.
2018-04-20 12:00:11 +02:00
Diego Biurrun
23be4eebf8 build: Group external library protocols separately 2018-04-20 12:00:10 +02:00
Alexander Kravchenko
78149d6657 amfenc: Retain a reference to D3D frames used as input during the encoding process
This fixes frame corruption issue when decoder started reusing frames
while they are still in use of encoding process

Issue with frame corruption  was reproduced using:

    avconv.exe -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i input.h264 -an -c:v h264_amf output.mkv

It is recommended to use -extra_hw_frames 16 option in case if hw frames
number in pool is not enough

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-04-19 20:05:24 +02:00
Steve Lhomme
abf806f7f1 random_seed: use bcrypt instead of the old wincrypt API
Remove the wincrypt API calls since we don't support XP anymore and
bcrypt is available since Vista, even on Windows Store builds.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-04-19 10:54:26 +03:00
Martin Storsjö
347aa8f723 x86: Don't declare a non-static function as inline
This fixes building with clang in msvc mode, which does support
gcc style inline assembly.
2018-04-15 23:18:45 +03:00
Diego Biurrun
8f144d9e3d Drop Windows XP support remnants 2018-04-09 21:58:39 +02:00
wm4
c7ab6aff66 w32pthreads: always use Vista+ API, drop XP support
This removes the XP compatibility code, and switches entirely to SRW
locks, which are available starting at Windows Vista.

This removes CRITICAL_SECTION use, which allows us to add
PTHREAD_MUTEX_INITIALIZER, which will be useful later.

Windows XP is hereby not a supported build target anymore.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2018-04-09 21:58:39 +02:00
Vittorio Giovara
c31f6b1d61 avprobe: Print a user-friendly version of the display matrix
Shift fixed point numbers to be actual decimal numbers.
2018-04-09 16:50:03 +02:00
Vittorio Giovara
f821b2ea27 avprobe: Support printing strings with empty keys 2018-04-09 16:50:03 +02:00
Vittorio Giovara
cc06f7bd10 libx265: Support tiny video sizes
Where tiny is less than the default CTU size.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2018-04-09 16:50:03 +02:00
Zhong Li
54307b3531 lavc/qsvdec: set complete_frame flags for progressive picture
Set the flag MFX_BITSTREAM_COMPLETE_FRAME when it is a progressive picture.
This can fix vc1 decoding segment fault issues because can't set the start
code correctly.

See: ./avconv -hwaccel qsv -c:v vc1_qsv -i /fate-suite/vc1/SA00040.vc1
-vf "hwdownload, format=nv12" -f rawvideo /dev/null

v2: fix some h264 interlaced clips regression
a. field_order of some h264 interlaced video (e.g: cama3_vtc_b.avc) is marked as AV_FIELD_UNKNOWN
   in h264_parser.c. This is not a completed frames.
   So only set the MFX_BITSTREAM_COMPLETE_FRAME when it is progressive.
b. some clips have both progressive and interlaced frames (e.g.CAPAMA3_Sand_F.264),
   the parsed field_order maybe changed druing the decoding progress.

This patch has been verified for other codecs(mpeg2/hevc/vp8).

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00
Maxym Dmytrychenko
cca5e4f040 qsv: adding Multi Frame Encode support
Starting from API 1.25 helps to improve performance of the simultaneous
encode, 1:N scenario, like:

./avconv  -y -hwaccel qsv -c:v h264_qsv -r 30000/1001 -i
~/bbb_sunflower_1080p_60fps_normal.mp4  -vframes 600 -an \
    -filter_complex "split=2[s1][s2]; [s1]scale_qsv=1280:720[o1];
[s2]scale_qsv=960:540[o2]" \
    -map [o1] -c:v h264_qsv -b:v 3200k -minrate 3200k -maxrate 3200k -f
rawvideo /tmp/3200a.264 \
    -map [o2] -c:v h264_qsv -b:v 1750k -minrate 1750k -maxrate 1750k -f
rawvideo /tmp/1750a.264

Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00