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
Mark Thompson
67eb2b16da vaapi_h265: Mark unused entries in RefPicList[01] as explicitly invalid
The iHD driver looks at entries beyond num_ref_idx_l[01]_active_minus1
for unknown reasons.
2018-02-20 22:04:12 +00:00
Mark Thompson
216c44dfc1 vaapi_encode: Destroy output buffer pool before VA context
The buffers are created associated with the context, so they should be
destroyed before the context is.  This is enforced by the iHD driver.
2018-02-20 22:04:12 +00:00
Jun Zhao
c8e135ea92 vaapi_encode: Allocate slice structures and parameter buffers dynamically
This removes the arbitrary limit on the allowed number of slices and
parameter buffers.

From ffmpeg commit e4a6eb70f4.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-02-20 22:04:12 +00:00
Mark Thompson
254e728d20 cbs: Minor comment fixes / cosmetics 2018-02-20 22:04:12 +00:00
Mark Thompson
1d12a545ce cbs: Add an explicit type for coded bitstream unit types
Also fix conversion specifiers used for the unit type.
2018-02-20 22:04:12 +00:00
Mark Thompson
2651352988 cbs: Allocate the context inside the init function
... instead of making callers allocate it themselves.  This is more
consistent with other APIs in libav.
2018-02-20 22:04:12 +00:00
Martin Storsjö
cc1c94dacd configure: Pass the right machine types to dlltool for arm and arm64 mingw
These are supported by llvm-dlltool.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-02-19 12:36:41 +02:00
Martin Storsjö
97eee953e6 Revert "configure: Stop using dlltool to create an import library"
This reverts commit 67c72f08a4.

While the linker produced import libraries might work with MSVC in
simple test cases, they don't if e.g. linking to multiple GNU ld
produced import libraries at the same time. (They end up importing
functions from the wrong libraries.) The ones produced by dlltool
work fine though.

This issue was pointed out by Hendrik Leppkes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-02-19 12:36:09 +02:00
Diego Biurrun
a674b31240 build: Ignore generated mpeg12framerate test binary 2018-02-12 10:04:08 +01:00
Michael Niedermayer
5b6213ef6b avcodec/vc1dec: fix mby_start for interlaced content
Bug-Id: 1100
Bug-Id: ffmpeg/Ticket2531
Cc: libav-stable@libav.org
2018-02-11 23:48:54 -05:00
Ruiling Song
9b09792c90 lavc/qsv: default la_ds to MFX_LOOKAHEAD_DS_UNKNOWN
MFX_LOOKAHEAD_DS_UNKNOWN means auto.
-1 is not a valid value.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-02-12 00:34:45 +01:00
Zhong Li
8bb9824fcb qsvenc: AVBR is not supported on non-windows OS
AVBR is supported from API 1.3 but only available for Windows

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-02-12 00:34:34 +01:00
Mark Thompson
e412d683fe hwcontext: Perform usual uninitialisation on derived frames contexts 2018-02-11 22:11:10 +00:00
Mark Thompson
caecb85014 hwcontext: Perform usual initialisation on derived device contexts
The initialisation should be common.  For libmfx, it was previously
happening in the derivation function and this moves it out.
2018-02-11 22:11:10 +00:00
Mark Thompson
c6bc18bc12 vf_hwupload/hwmap: Support setting a fixed pool size
These filters do not directly know whether the API they are using will
support dynamic frame pools, so this is somewhat tricky.  If the user
sets extra_hw_frames, we assume that they are aware of the problem and
set a fixed size based on that.  If not, most cases use dynamic sizing
just like they did previously.  The hardware-reverse-mapping case for
hwmap previously had a large fixed size (64) here, primarily as a hack
for QSV use - this is removed and extra_hw_frames will need to be set
for QSV to work since it requires fixed-size pools (as the other cases
do, and which didn't work before).
2018-02-11 22:11:10 +00:00
Mark Thompson
e4cdef0026 vf_scale_qsv: Support increasing hardware frame pool size
The deinterlacer does not change, because it does not allocate any new
frames (for output it uses the same pool as the input).
2018-02-11 22:11:10 +00:00
Mark Thompson
b128be1748 vf_*_vaapi: Support increasing hardware frame pool size
Defaults to 10 frames to preserve compatibility, but can allocate
fewer if extra_hw_frames is set explicitly.
2018-02-11 22:11:10 +00:00
Mark Thompson
6d86cef06b lavfi: Add support for increasing hardware frame pool sizes
AVFilterContext.extra_hw_frames functions identically to the field of
the same name in AVCodecContext.
2018-02-11 22:11:06 +00:00
Mark Thompson
cad739dace lavc: Add per-thread surfaces in get_hw_frame_parameters()
This number is definitely required when frame threading is enabled, so
add it here rather than forcing all users to handle it themselves.

DXVA2 contained this addition in specific code as well (therefore being
added twice in the internal case) - just remove it from there.
2018-02-11 22:00:48 +00:00
Mark Thompson
5b145290df lavc: Add support for increasing hardware frame pool sizes
AVCodecContext.extra_hw_frames is added to the size of hardware frame
pools created by libavcodec for APIs which require fixed-size pools.
This allows the user to keep references to a greater number of frames
after decode, which may be necessary for some use-cases.

It is also added to the initial_pool_size value returned by
avcodec_get_hw_frames_parameters() if a fixed-size pool is required.
2018-02-11 22:00:33 +00:00
Diego Biurrun
fd36cf6bf6 configure: Factorize check_64_bit() 2018-02-06 11:13:19 +01:00
Diego Biurrun
38434a9ff5 configure: Simplify restrict keyword handling
Skip a variable indirection and only redefine restrict if necessary.
2018-02-06 11:13:10 +01:00
Diego Biurrun
4cf84e254a Drop some unnecessary config.h #includes 2018-02-06 10:03:15 +01:00
Diego Biurrun
bca41545b3 configure: Group code that sets the license string with licensing checks
This also moves the setting of the licensing string out of a block that
is skipped when quiet operation is requested.
2018-02-06 10:03:15 +01:00
Mark Thompson
2eb396b175 hwcontext: Fix memory leak on derived frame allocation failure 2018-02-04 13:47:25 +00:00
Jun Zhao
96e476cc9d hwcontext: Fix documentation for av_hwdevice_ctx_alloc()
From ffmpeg commit 9365dfcbf6.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-02-04 13:47:19 +00:00
Martin Storsjö
8965e2af92 avpacket: Initialize the allocated padding area in side data
This makes sure that consumers of the side data actually can
rely on the padding as intended, without having the callers of
av_packet_new_side_data to explicitly zero initialize it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-02-01 15:50:00 +02:00
Sean McGovern
5085f25ace vc1: skip motion compensation when data for last picture is invalid
Bug-Id: 1101
Cc: libav-stable@libav.org
2018-01-30 19:04:07 -05:00
Zhong Li
6829a07944 qsvdec: Relax the surface vs coded dimension check
Fix a common vp8 decoding failure.

Many vp8 clips cannot decode if hw_frames_ctx is enabled, reporting
"Error during QSV decoding.: incompatible video parameters (-14)".

It is due to mfx.FrameInfo.Width/Height not matching coded_w/coded_h.

See: avconv -hwaccel qsv -init_hw_device qsv -c:v vp8_qsv -i vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf
-vf "hwdownload,format=nv12" -pix_fmt yuv420p -f md5 -

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-26 10:00:17 +01:00
Ruiling, Song
559370f2c4 qsv: Skip the packet if decoding failure
MediaSDK may fail to decode some frame, just skip it.
Otherwise, it will keep decoding the failure packet repeatedly
without processing any packet afterwards.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-25 11:13:34 +01:00
Josh Allmann
a2a9e4eea0 rtmp: Plug leak if sending bytes read report fails.
Signed-off-by: Martin Storsjö <martin@martin.st>
2018-01-24 07:16:06 +02:00
Martin Storsjö
85e10c0a93 intreadwrite: Use __unaligned in MSVC for ARM64 as well
This attribute is supported for this architecture in MSVC as well
(but produces errors if used for 32 bit x86).

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-01-16 22:52:11 +02:00
Maxym Dmytrychenko
cbe28bc069 qsv: better to use alignment by 16 and HEVC 10b requires alignment by 32 2018-01-08 21:30:38 +01:00
Michael Wootton
34c113335b Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK
Requires AMF headers for at least version 1.4.4.1.

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-04 18:15:56 +01:00
Sean McGovern
7b0b5bc810 cmdutils: update copyright year to 2018 2018-01-01 02:51:51 -05:00
Zhong Li
1efbbfedca examples/qsvdec: do not set the deprecated field refcounted_frames
It is used by the deprecated API avcodec_decode_video2 and ignored by the
new decode APIs (avcodec_send_packet/avcodec_receive_frame).

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-12-29 16:13:02 +00:00
Zhong Li
e23190269f lavu/qsv: add log message for libmfx version
It is benefit to diagnose issues related to different libmfx version.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-12-29 16:12:16 +00:00
Luca Barbato
c6558e8840 x264: Support version 153
It has native simultaneus 8 and 10 bit support.
2017-12-27 15:59:45 +00:00
Martin Storsjö
2beba58e0e mmaldec: Fix compilation after 2fcb0090
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-12-20 10:11:27 +02:00
Mark Thompson
ddea22a684 avconv: Use codec hardware config to configure hwaccels
Removes specific support for all hwaccels supported by the generic code
(CUVID, DXVA2, D3D11VA, VAAPI and VDPAU).
2017-12-19 23:24:59 +00:00
Mark Thompson
2117725dc5 lavc: Mark all AVHWAccel structures as const 2017-12-19 23:24:24 +00:00
Mark Thompson
2a4d34d462 lavc: Delete all fake hwaccels
They are now unused.
2017-12-19 23:22:35 +00:00
Mark Thompson
433522a1b9 lavc: Remove register mechanism for hwaccels
There is no longer any need for a list of them at runtime, because
decoders now carry the pointers to their associated hwaccels internally.
The file containing external declarations is now used to make the list
of hwaccels for configure.
2017-12-19 23:22:35 +00:00
Mark Thompson
e2d575543c lavc: Deprecate av_hwaccel_next() and av_register_hwaccel() 2017-12-19 23:22:31 +00:00
Mark Thompson
39056b5240 lavc: Use hardware config information in ff_get_format()
This removes the dependency that hardware pixel formats previously had on
AVHWAccel instances, meaning only those which actually do something need
exist after this patch.

Also updates avcodec_default_get_format() to be able to choose hardware
formats if either a matching device has been supplied or no additional
external configuration is required, and avcodec_get_hw_frames_parameters()
to use the hardware config rather than searching the old hwaccel list.
2017-12-19 23:21:59 +00:00
Mark Thompson
57623cba13 webp: Fix alpha initialisation
ff_get_format() in the next patch will reject formats which aren't in the
offered list, so the hack in 7cb9296db8 is
no longer valid.  Change the hack by adding a new field in the VP8 decoder
context to indicate that it's actually WebP and don't call ff_get_format()
at all in that case.
2017-12-19 23:21:59 +00:00
Mark Thompson
2fcb009011 lavc: Add hardware config metadata for decoders supporting hardware output
This includes a pointer to the associated hwaccel for decoders using
hwaccels - these will be used later to implement the hwaccel setup
without needing a global list.

Also added is a new file listing all hwaccels as external declarations -
this will be used later to generate the hwaccel list at configure time.
2017-12-19 23:21:59 +00:00
Mark Thompson
720cf4e6e7 lavc: Add codec metadata to indicate hardware support 2017-12-19 23:21:53 +00:00
wm4
47687a2f8a avcodec: add metadata to identify wrappers and hardware decoders
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>.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-12-14 16:58:45 +01:00
Luca Barbato
5083785566 qsv: Support explicit lookahead downscaling 2017-12-12 15:43:02 +00:00