summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* 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>
* movenc: allow alternative hvc1 h.265 codec tagJohn Stebbins2017-06-20
| | | | | If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for h.265 streams. QuickTime (and other Apple software) requires 'hvc1'.
* movenc: write correct format hvcc when tag is hvc1John Stebbins2017-06-20
|
* movenc: move tags definitions to where they are usedJohn Stebbins2017-06-20
|
* movenc: simplify codec_tag lookupJohn Stebbins2017-06-20
| | | | | | | | mux.c init_muxer() already sets codec_tag correctly in the cases simplified here. This also adds the capability to support alternative tags for the same codec_id.
* movenc: use correct tag list for AVOutputFormat.codec_tagJohn Stebbins2017-06-20
| | | | | | | | | | | ff_mp4_obj_type contains the wrong type of tags for AVOutputFormat.codec_tag. AVOutputFormat.codec_tag is used to validate AVCodecParameters.codec_tag so needs to be the same type of tag. Creates new tag lists for mp4 and ismv. New tag lists support same list of codecs found in ff_mp4_obj_type. psp uses the same tag list as mp4 since these both use mp4_get_codec_tag to look up tags.
* aarch64: vp9: Fix assembling with Xcode 6.2 and olderMemphiz2017-06-20
| | | | | | | | | Properly use the b.eq/b.ge forms instead of the nonstandard forms (which both gas and newer clang accept though), and expand the register list that used a range (which the Xcode 6.2 clang, based on clang 3.5 svn, didn't support). Signed-off-by: Martin Storsjö <martin@martin.st>
* doc: Drop the legacy symlink to READMELuca Barbato2017-06-19
| | | | Windows does not like symlinks and README.md is pretty common nowadays.
* d3d11va: Link directly to dxgi.dll and d3d11.dll functions if LoadLibrary is ↵Martin Storsjö2017-06-18
| | | | | | | | | | | unavailable When targeting the UWP API subset, the LoadLibrary function is not available (and the fallback, LoadPackagedLibrary, can't be used to load system DLLs). In these cases, link directly to the functions in the DLLs instead of trying to load them dynamically at runtime. Signed-off-by: Martin Storsjö <martin@martin.st>
* avconv_hw: Free device on initialisation failureMark Thompson2017-06-18
|
* vf_hwmap: Properly free a locally derived deviceMark Thompson2017-06-18
|
* vf_hwmap: Add missing error codeMark Thompson2017-06-18
|
* configure: Fix handling of _select dependenciesDiego Biurrun2017-06-17
| | | | | | | | | | | | | | The handling of _select dependencies had two issues: 1) extralibs from _select dependencies of a component were not added to the list of extralibs for that component. 2) extralibs from dependencies were only added to the extralibs of a component if the component was enabled. This led to incorrect results if that component was enabled by another component later in the dependency resolution process. Instead, always generate the full list of component extralibs for use later in the dependency resolution process. Also remove a leftover unused variable.
* build: Adjust dependencies for faan(i)dct componentsDiego Biurrun2017-06-17
|
* configure: Factorize qsv dependenciesDiego Biurrun2017-06-17
|
* configure: Add missing arch dependencies for arch extensionsDiego Biurrun2017-06-17
|
* configure: Add x86 dependency for mmx_internalDiego Biurrun2017-06-17
| | | | This ensures that mmx_internal is only ever enabled on x86.
* build: Add missing idctdsp dependency for clearvideoDiego Biurrun2017-06-17
|
* build: Add missing mpeg4audio dependency for RTP muxerDiego Biurrun2017-06-17
|
* hwcontext: Mark local table static constMark Thompson2017-06-15
|
* libfdk-aacdec: Correct buffer_size parameterMichael Niedermayer2017-06-13
| | | | | | | | | | | | | | | The timeDataSize argument to aacDecoder_DecodeFrame() seems undocumented and until 2016 04 (203e3f28fbebec7011342017fafc2a0bda0ce530) unused. After that commit libfdk-aacdec interprets it as size in sample units and memsets that on error. FFmpeg as well as others (like GStreamer) did interpret it as size in bytes. Fixes: 1442/clusterfuzz-testcase-minimized-4540199973421056 (This requires recent libfdk to reproduce) Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Martin Storsjö <martin@martin.st>
* mmal: Add missing .item_name to AVClass declarationDiego Biurrun2017-06-13
|
* configure: Simplify AltiVec/VSX check with a helper functionDiego Biurrun2017-06-13
|
* ppc: Drop support for Apple GCCDiego Biurrun2017-06-13
| | | | Apple GCC has not been a thing anymore on PowerPC since many years.
* Convert all AVClass struct declarations to designated initializers.Diego Biurrun2017-06-12
|
* nvenc: Add default value for AVCodecContext::refsSrinath K R2017-06-10
| | | | | | | | | | | | | AVCodecContext::refs is used to control the DPB size to be used by the encoder. The default value for AVCodecContext::refs as set in libavcodec/options_table.h is 1. This patch sets AVCodecContext::refs to 0 for h264_nvenc and hevc_nvenc in order to let the driver take the decision of the correct DPB size to use in all cases. Signed-off-by: Srinath K R <skr@nvidia.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dxva: add support for new dxva2 and d3d11 hwaccel APIswm42017-06-08
| | | | | | | | | | This also adds support to avconv (which is trivial due to the new hwaccel API being generic enough). The new decoder setup code in dxva2.c is significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* dxva: move d3d11 locking/unlocking to functionswm42017-06-08
| | | | | | | | | I want to make it non-mandatory to set a mutex in the D3D11 device context, and replacing it with user callbacks seems like the best solution. This is preparation for it. Also makes the code slightly more readable. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* dxva: preparations for new hwaccel APIwm42017-06-08
| | | | | | | | | | | | The actual hwaccel code will need to access an internal context instead of avctx->hwaccel_context, so add a new DXVA_CONTEXT() macro, that will dispatch between the "old" external and the new internal context. Also, the new API requires a new D3D11 pixfmt, so all places which check for the pixfmt need to be adjusted. Introduce a ff_dxva2_is_d3d11() function, which does the check. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavc: set avctx->hwaccel before initwm42017-06-08
| | | | | | | | | So a hwaccel can access avctx->hwaccel in init for whatever reason. This is for the new d3d hwaccel API. We could create separate entrypoints for each of the 3 hwaccel types (dxva2, d3d11va, new d3d11va), but this seems nicer. Signed-off-by: Diego Biurrun <diego@biurrun.de>