summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* hevcdec: add a CUVID hwaccelcuvid2Anton Khirnov2017-07-24
|
* fate/hevc: specify output pixel format explicitlyAnton Khirnov2017-07-24
| | | | This allows running those tests with hwaccel.
* hevcdec: set the active SPS before calling get_format()Anton Khirnov2017-07-24
| | | | This way the SPS is available to the hwaccel init code.
* h264dec: add a CUVID hwaccelAnton Khirnov2017-07-24
| | | | | Some parts of the code are based on a patch by Timo Rothenpieler <timo@rothenpieler.org>
* decode: add a per-frame private data for hwaccel useAnton Khirnov2017-07-24
| | | | | | This will be useful in the CUVID hwaccel. It should also eventually replace current decoder-specific mechanisms used by various other hwaccels.
* decode: add a mechanism for performing delayed processing on the decoded framesAnton Khirnov2017-07-24
| | | | This will be useful in the CUVID hwaccel.
* decode: add a method for attaching lavc-internal data to framesAnton Khirnov2017-07-24
| | | | | | | | Use the AVFrame.opaque_ref field. The original user's opaque_ref is wrapped in the lavc struct and then unwrapped before the frame is returned to the caller. This new struct will be useful in the following commits.
* decode: avoid leaks on failure in ff_get_buffer()Anton Khirnov2017-07-24
| | | | | If the get_buffer() call fails, the frame might have some side data already set. Make sure it gets freed.
* lavf: allow avformat_close_input() with NULLwm42017-07-22
| | | | | | This is consistent with how other destructors behave. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dxva: DXVA2_ModeHEVC_VLD_Main10 does not support Mainwm42017-07-22
| | | | | | | | This mode apparently does not support decoding of HEVC Main (8 bit). With D3D11 and Intel drivers on Windows 10 I get green corruption, while using DXVA2_ModeHEVC_VLD_Main works. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* caf: add an Opus tagAnton Khirnov2017-07-22
| | | | CC: libav-stable@libav.org
* hevc: Make sure to update the current frame transfer characteristicVittorio Giovara2017-07-21
| | | | | | | Otherwise the first decoded frame will still be tagged with the original transfer instead of the alternative one. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* rmdec: don't ignore the return value of av_get_packet()Sean McGovern2017-07-17
|
* build: Add feature test macros for glibc 2.19+Diego Biurrun2017-07-10
| | | | | | | glibc introduced _DEFAULT_SOURCE in version 2.19 to replace _BSD_SOURCE and _SVID_SOURCE, which were deprecated in version 2.20. Add _DEFAULT_SOURCE where the latter two are used to be forwards-compatible and avoid warnings about the use of deprecated definitions.
* flac: Use a local cache for decode_residual()Luca Barbato2017-07-09
| | | | | | About an additional 4% speedup. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* flac: Postpone unlikely condition checksLuca Barbato2017-07-09
| | | | | | About 2% speedup on gcc-6.3. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* flac: Convert to the new bitstream readerAlexandra Hájková2017-07-09
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* bitstream: Avoid undefined behavior in bitstream_skip()Luca Barbato2017-07-09
| | | | | | | | | | Do not use skip_remaining() to fully wipe the cache, as this could do a 64-bit shift of a 64-bit variable which is undefined behavior in C. Instead set the related variables to zero directly. Thanks to Uoti for pointing out the problem. CC: libav-stable@libav.org
* bink: Split read_dct_coeffs()Diego Biurrun2017-07-05
| | | | | This works around type aliasing violations and related warnings. Also add some missing error checking.
* fate: Add cinepak encoder vsynth testsDiego Biurrun2017-07-05
|
* cinepakenc: misc small changesDiego Biurrun2017-07-05
| | | | | | Avoid anonymously typedeffed structs and enums, drop an unused context member, fix a small wording mishap, sizeof(type) ---> sizeof(*variable), drop a needlessly verbose log message, use av_malloc_array() where appropriate.
* cinepakenc: K&R formatting cosmeticsDiego Biurrun2017-07-05
|
* cinepakenc: Stop using AVPictureTimothy Gu2017-07-05
|
* cinepakenc: Drop broken debug codeDiego Biurrun2017-07-05
|
* cinepakenc: add option handling for flexibilityaddr-see-the-website@aetey.se2017-07-05
| | | | | | | Now it is possible to adjust compression speed vs R/D when needed and also skip vintage player compatibility at will. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* cinepakenc: fixes and improvementsaddr-see-the-website@aetey.se2017-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version 2013-02-08 Rl - fixes/optimization in multistrip encoding and codebook size choice, quality/bitrate is now better than that of the binary proprietary encoder version 2013-02-12 Rl - separated codebook training sets, avoided the transfer of wasted bytes, which yields both better quality and smaller files - now using the correct colorspace (TODO: move conversion to libswscale) version 2013-02-14 Rl "Valentine's Day" version: - made strip division more robust - minimized bruteforcing the number of strips, (costs some R/D but speeds up compession a lot), the heuristic assumption is that score as a function of the number of strips has one wide minimum which moves slowly, of course not fully true - simplified codebook generation, the old code was meant for other optimizations than we actually do - optimized the codebook generation / error estimation for MODE_MC version 2013-04-28 Rl - bugfixed codebook optimization logic version 2014-01-20 Rl - made the encoder compatible with vintage decoders and added some yet unused code for possible future incremental codebook updates - fixed a small memory leak version 2014-01-21 Rl - believe it or not, now we get even smaller files, with better quality (which means I missed an optimization earlier :) Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Add Cinepak encoderTomas Härdin2017-07-05
| | | | | | With permission of Tomas Härdin applied by Rl aetey.se Signed-off-by: Diego Biurrun <diego@biurrun.de>
* os_support: Use HAVE_UWP instead of manually checking WINAPI_FAMILYMartin Storsjö2017-07-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARYMartin Storsjö2017-07-05
| | | | | | | | | | | | | If using the winstore compat library, a fallback LoadLibrary function does exist, that only calls LoadPackagedLibrary though (which doesn't work for dynamically loading d3d11 DLLs). Therefore explicitly check the targeted API family instead. Make this check a reusable HAVE_* component which other parts of the libraries can check when necessary as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Remove codec_tag from dashenc and smoothstreamingencMartin Storsjö2017-07-02
| | | | | | | | | | | Currently, the tags enforced and set on the segmenter muxer level mismatch what the mp4/ismv muxer uses (since 713efb2c0d013). Skip the codec_tag altogether here, to let the user (try to) set whichever codec/tag is preferred; the individual chained muxer will reject invalid codecs anyway. Signed-off-by: Martin Storsjö <martin@martin.st>
* hevc: Add support for alternative transfer characterics SEIVittorio Giovara2017-06-28
| | | | | | | | | | The use of this SEI is for backward compatibility in HLG HDR systems: older devices that cannot interpret the "arib-std-b67" transfer will get the compatible transfer (usually bt709 or bt2020) from the VUI, while newer devices that can interpret HDR will read the SEI and use its value instead. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* dvbsubdec: Free subrect memory on allocation errorVittorio Giovara2017-06-28
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* dvbsubdec: Fixed segfault when decoding subtitlesLorenz Brun2017-06-28
| | | | | | | | | | This fixes a segfault (originally found in Movian, but traced to libav) when decoding subtitles because only an array of rects is allocated, but not the actual structs it contains. The issue was probably introduced in commit 2383323 where the loop to allocate the rects in the array was thrown away. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* hwframe: Allow hwaccel frame allocators to align surface sizesAnton Khirnov2017-06-27
| | | | | | | | | | | | | | | Hardware accelerated decoding generally uses AVHWFramesContext for pool allocation of hardware surfaces. These are setup to allocate surfaces aligned to hardware and hwaccel API requirements. Due to the architecture, av_hwframe_get_buffer() will return AVFrames with the dimensions set to the aligned sizes. This causes some decoders (like hevc) return these aligned size as final frame size, instead of cropping them to the video's actual dimensions. To make sure this doesn't happen, crop the frame to the size the decoder expects when ff_get_buffer() is called. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dxva: verbose-log decoder GUID listwm42017-06-27
| | | | | | Helpful for debugging. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* hwcontext_d3d11va: add option to enable debug modewm42017-06-27
| | | | | | | | | Basically copied from VLC (LGPL): http://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/win32/direct3d11.c;h=e9fcb83dcabfe778f26e63d19f218caf06a7c3ae;hb=HEAD#l1482 http://git.videolan.org/?p=vlc.git;a=blob;f=modules/codec/avcodec/d3d11va.c;h=85e7d25caebc059a9770da2ef4bb8fe90816d76d;hb=HEAD#l599 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dxva: support DXGI_FORMAT_420_OPAQUE decodingwm42017-06-27
| | | | | | | | | | | | Some devices (some phones, apparently) will support only this opaque format. Of course this won't work with CLI, because copying data directly is not supported. Automatic frame allocation (setting AVCodecContext.hw_device_ctx) does not support this mode, even if it's the only supported mode. But since opaque surfaces are generally less useful, that's probably ok. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* hwcontext_d3d11va: allocate staging texture lazilywm42017-06-27
| | | | | | | | Makes dealing with formats that can not be used for staging textures easier (DXGI_FORMAT_420_OPAQUE). It also saves memory if the staging texture is never needed, so this is a good thing. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* hwcontext_d3d11va: fix crash on frames_init failurewm42017-06-27
| | | | | | | It appears in this case, frames_ininit is called twice (once by av_hwframe_ctx_init(), and again by unreffing the frames ctx ref). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dxva: fix some warningswm42017-06-27
| | | | | | | | | | Some existed since forever, some are new. The cast in get_surface() is silly, but unless we change the av_log function signature, or all callers of ff_dxva2_get_surface_index(), it's needed to remove the const warning. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dxva: add declarative profile checkswm42017-06-27
| | | | | | | | | | | | | | | | | | | Make supported codec profiles part of each dxva_modes entry. Every DXVA2 mode is representative for a codec with a subset of supported profiles, so reflecting that in dxva_modes seems appropriate. In practice, this will more strictly check MPEG2 profiles, will stop relying on the surface format checks for selecting the correct HEVC profile, and remove the verbose messages for mismatching H264/HEVC profiles. Instead of the latter, it will now print the more nebulous "No decoder device for codec found" verbose message. This also respects AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH. Move the Main10 HEVC entry before the normal one to make this work better. Originally inspired by VLC's code. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* configure: Reset X86ASM_DEP(FLAGS) when probing for the assembler programDiego Biurrun2017-06-24
| | | | | | | These variables might be set from a previous probe run, but one or the other program that is probed for may not grok the flags, resulting in errors during assembling when the values of those variables are passed to the assembler.
* nvenc: Minimize the surface allocationBen Chang2017-06-24
| | | | | | | The previous default sets the allocated surfaces to 32 unless it is user-overridden or the lookahead parameter is set. Change the surfaces calculation for default, B-frames and lookahead scenario.
* nvenc: Use a fifo to manage the free surface poolBen Chang2017-06-24
| | | | | Previously, if a session allocates x surfaces, only x-1 surfaces are used (due to combination of output delay and lock toggle logic).
* nvenc: Add an explicit auto aliasBen Chang2017-06-24
|
* build: Add an option for passing linker flags to the shared library buildJanne Grunau2017-06-22
| | | | | | Also employ this mechanism to pass $libdir to the runtime library search path if rpath is enabled. This fixes underlinking of some test binaries on some systems.
* configure: Automatically add -isysroot for darwin if --sysroot is specifiedMartin Storsjö2017-06-21
| | | | | | | | | | | Check the existing flags in the cc/cflags/cppflags/ldflags for occurrances of -isysroot; if none is found but --sysroot was specified, set -isysroot to the same value as --sysroot. This simplifies configuring cross-builds for iOS, if the global environment variable SDKROOT isn't set. Signed-off-by: Martin Storsjö <martin@martin.st>
* af_bs2b: Add missing casts to complex pointer assignmentsDiego Biurrun2017-06-21
| | | | | Fixes several warnings of the type: libavfilter/af_bs2b.c:171:22: warning: assignment from incompatible pointer type
* tls_gnutls: Readd support for nonblocking operationMartin Storsjö2017-06-20
| | | | | | | | | | | | | | | | | | | | The rtmp protocol uses nonblocking reads, to poll for incoming messages from the server while publishing a stream. Prior to 94599a6de3822b13c94096d764868128f388ba28 and d13b124eaf452b267480074b2e6946538ed03a6e, the tls protocol handled the nonblocking flag, mostly as a side effect from not using custom IO callbacks for reading from the socket. When custom IO callbacks were taken into use in d15eec4d6bdfa3bd4c4b5b7dd2dbd699ba253d02, the handling of a nonblocking socket wasn't necessary for the default blocking mode any longer. The code was simplified, since it was overlooked that other code within libavformat actually used the tls protocol in nonblocking mode. This fixes publishing over rtmps, with the gnutls backend. Signed-off-by: Martin Storsjö <martin@martin.st>
* tls_openssl: Readd support for nonblocking operationMartin Storsjö2017-06-20
| | | | | | | | | | | | | | | | | | | | The rtmp protocol uses nonblocking reads, to poll for incoming messages from the server while publishing a stream. Prior to 94599a6de3822b13c94096d764868128f388ba28 and d13b124eaf452b267480074b2e6946538ed03a6e, the tls protocol handled the nonblocking flag, mostly as a side effect from not using custom IO callbacks for reading from the socket. When custom IO callbacks were taken into use in d15eec4d6bdfa3bd4c4b5b7dd2dbd699ba253d02, the handling of a nonblocking socket wasn't necessary for the default blocking mode any longer. The code was simplified, since it was overlooked that other code within libavformat actually used the tls protocol in nonblocking mode. This fixes publishing over rtmps, with the openssl backend. Signed-off-by: Martin Storsjö <martin@martin.st>