Commit Graph

45225 Commits

Author SHA1 Message Date
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
Zhong Li 29a8ed7663 lavf/qsvvpp: bypass vpp if not needed.
Currently vpp pipeline is always created, even for the unnecessary
cases such as setting the option "vpp_qsv=w=1280:h=720" for an input
with native resolution 1280x720. Thus introduces unnecessary performance
dropping, so bypass vpp if not needed.

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
Zhong Li 52ed83fa1a lavc/qsvdec: expose frame pic_type and key_frame
Currently pict_type and key_frame are unset.
Add an extra param to fetch the picture type from qsv decoder

The judgement “key frame is equal to IDR frame” only suitable for H264.
For HEVC, all IRAP frames are key frames, and other codecs have no IDR
frame.

Signed-off-by: ChaoX A Liu <chaox.a.liu@intel.com>
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
James Almer b0958698ea libaom: remove references to RGB pixfmts
Support for it was apparently never in the codebase, and the enum
values were recently removed from the public headers [1]

Fixes build with latest libaom build.

[1] https://aomedia.googlesource.com/aom/+/3f29cc20e3a4c348cb41a797c68de856ddb84e12

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-04 20:12:41 -03:00
James Almer ef06ed5b18 libaom: remove references to yuv440p pixfmt
Support for it was apparently never in the codebase, and the enum
values were recently removed from the public headers [1]

Fixes build with latest libaom build.

[1] https://aomedia.googlesource.com/aom/+/2e3cd5c5c30fa02134681cda900c32486807af3f

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-01 22:50:42 -03:00
Martin Storsjö 3a7b4ae62c arm: Produce .const_data instead of .section .rodata for Mach-O
This is the same combination of .section directives as used in
aarch64/asm.S.

Since Xcode 9.3, the bundled clang supports altmacro and doesn't
require using gas-preprocessor any longer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-30 15:49:30 +03:00
Martin Storsjö ab05d3934d arm: vc1dsp: Add commas between macro arguments
When targeting darwin, clang requires commas between arguments,
while the no-comma form is allowed for other targets.

Since Xcode 9.3, the bundled clang supports altmacro and doesn't
require using gas-preprocessor any longer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-30 15:47:24 +03:00
Diego Biurrun e744281c49 configure: Revert some incorrect uses of check_cc() 2018-03-30 10:12:13 +02:00
James Almer ea3320bb82 libaomenc: fix profile setting
Main Profile is yuv420p 8 and 10 bit
High Profile is yuv444p 8 and 10 bit
Professional Profile is yuv422p 8, 10, and 12 bit, plus every other pixfmt at 12 bit

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-29 13:06:38 -03:00
James Almer f6171471e6 avcodec: rename the AV1 profiles
Use the proper names instead of numbers

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-29 13:02:56 -03:00
Sven Dueking a2fc8dbae8 Add Haivision SRT protocol
The protocol requires libsrt (https://github.com/Haivision/srt) to be
installed

Signed-off-by: Sven Dueking <sven.dueking@nablet.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-28 16:16:41 +02:00
Diego Biurrun 2124a97a49 configure: Drop unused helper function test_cflags_cpp() 2018-03-27 13:38:20 +02:00
Diego Biurrun 434b44cd6f configure: Simplify vararg check 2018-03-26 18:59:44 +02:00
Diego Biurrun 8c7554e6a9 configure: Add check_x86asm() helper function to simplify some expressions 2018-03-26 18:59:43 +02:00
Diego Biurrun 17ee5b0c13 configure: Use indirection for the -o assembler flag also for x86asm
Similar indirections are used for the -o compiler/assembler flag to
account for differences in compiler/assembler syntax. For x86asm half
the infrastructure for doing the same currently exists unused.
Finish and use that infrastructure for consistency.
2018-03-26 18:54:56 +02:00
Diego Biurrun b9ea301e02 configure: Use a more sensible suffix for x86 assembly tempfiles 2018-03-26 18:52:04 +02:00
Diego Biurrun 5292e97c42 configure: Document available options for the --toolchain parameter 2018-03-26 18:52:04 +02:00
Ruiling Song 86499771d1 qsv: align surface width/height to 16.
Per MediaSDK documentation, it requires width/height to 16 alignment.
Without this patch, hwupload pipeline may fail if 16 alignment is
not met. Although this patch also apply 16 alignment to qsv encoder/decoder,
it will not bring any side-effect to them as they are already aligned.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-21 08:42:47 +01:00
Martin Storsjö ea2f72a2c1 configure: Don't assume a 16 byte aligned stack on BSDs on i386
With GCC, request it to maintain 16 byte alignment, and the existing
entry points already align it via attribute_align_arg.

With clang, do the same as for mingw; disable the aligned stack
and let the assembly functions that require it do the alignment
instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-17 22:27:42 +02:00
Zhong Li deefca02c2 qsvenc: add the Access Unit Delimiter NAL Unit support
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-16 13:36:30 +01:00
Zhong Li 3d6e76b953 qsvenc: Fix a typo of FrameRateExtD/FrameRateExtN
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-16 13:36:08 +01:00
Martin Storsjö 847190ebd9 configure: Don't assume an aligned stack on clang on windows
If we'd enable a 16 byte aligned stack, clang/llvm would also assume
that alignment everywhere and produce code that strictly requires it.
That would require adding realignment (via attribute_align_arg) on every
single public library function or enable -mstackrealign (which does the
same on every single function).

Also relatedly; the parameter currently tested (-mllvm
-stack-alignment=16) hasn't actually been supported for quite some
time; current clang versions use -mstack-alignment=16 for the same.
Actually testing for that parameter would be a different change
though, since it has a real risk of changing behaviour on any other
platform where clang is used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-13 15:25:12 +02:00
Luca Barbato 43778a501f Support AV1 encoding using libaom 2018-03-12 12:10:33 +01:00
Luca Barbato c438899a70 Add AV1 video decoding support through libaom
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-12 08:12:43 +01:00
Luca Barbato 44a1731011 ivf: Support VP9 and AV1 as well 2018-03-12 08:12:43 +01:00
Diego Biurrun dd7e63af93 configure: Restore original endianness test
Previously the bit pattern for the endianness test was declared as a
global, instead of a local, variable. This ensures that the pattern
appears unchanged in the object file and is not optimized out.
2018-03-08 14:02:30 +01:00
Alexander Kravchenko 80a4e6a46f amf: Replace writer_id option with LIBAV_AMF_WRITER_ID constant
AMFTraceWriter is an abstraction to configure how AMF outputs its logs
for the current process and can be configured to output different levels
of trace output. If multiple LibavWriter objects are used in one process,
there will be duplication of output in av_log. Use a constant writer_id
to prevent this scenario.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2018-03-07 14:23:28 +01:00
Diego Biurrun 31a53ab34e configure: Add check_as() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun 18dc1ff0fb configure: Add check_ld() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun 9c37d765ef configure: Add check_cc/require_cc helper functions to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun 83fef16b6a configure: Add check_cpp_condition() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun a5e011c8dc configure: Add check_cmd() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun 49804dc2ba configure: Use test_ prefix for helper functions that do not set variables 2018-03-07 13:55:06 +01:00