libgsm never installed more than a single header, the headers installed into
the gsm/ subdirectory by some distros are private. Who started this nonsense
is a mystery, but it got cargo-culted around ever since.
Build h2645_parse.o with it, as every hevc_ps dependency also needs it.
This is more in line with h264's h264parse module.
Signed-off-by: James Almer <jamrial@gmail.com>
Remove the SDL_main define from the global cflags but not from the
ffplay cflags, and the -mwindows linker option from extralibs instead
of overriding it with the addition of -mconsole.
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This reverts commit c2d155e11e.
GCC 6 incorrectly passes the configure test and then logs many warnings
of the form:
src/libavformat/dump.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-bool-operation’
This helper is split off check_pkg_config(), setting only the pkg CFLAGS
and extralibs. This is useful for checks that do not require or do not
benefit from setting global CFLAGS.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Revert back to the test as done by commit af7a75cb51,
where it was changed to compile and not just preprocess to fix build failures on
FreeBSD with gcc 4.7
Signed-off-by: James Almer <jamrial@gmail.com>
This adds hardware decoding for H.264 / HEVC / VP8 / VP9 using the MPP
Rockchip API. It returns frames holding an AVDRMFrameDescriptor struct
in buf[0] that allows drm / dmabuf usage. Tested on RK3288 (TinkerBoard)
and RK3328.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Support for this device has been removed in kernel since v2.6.37. dv1394 has been superseded by libiec61883 which is functionally equivalent.
Signed-off-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
This reverts commit 740e557d6e, reversing
changes made to 932e28b13e.
The commit apparently broke builds with shared libs, and "suggesting"
the use of external libraries that need to be explicitly enable has
dubious usefulness anyway.
This patchset enhances Alexis Ballier's original patch and validates
it using Qualcomm's Venus hardware (driver recently landed upstream
[1]).
This has been tested on Qualcomm's DragonBoard 410c and 820c
Configure/make scripts have been validated on Ubuntu 10.04 and
16.04.
Tested decoders:
- h264
- h263
- mpeg4
- vp8
- vp9
- hevc
Tested encoders:
- h264
- h263
- mpeg4
Tested transcoding (concurrent encoding/decoding)
Some of the changes introduced:
- v4l2: code cleanup and abstractions added
- v4l2: follow the new encode/decode api.
- v4l2: fix display size for NV12 output pool.
- v4l2: handle EOS (EPIPE and draining)
- v4l2: vp8 and mpeg4 decoding and encoding.
- v4l2: hevc and vp9 support.
- v4l2: generate EOF on dequeue errors.
- v4l2: h264_mp4toannexb filtering.
- v4l2: fixed make install and fate issues.
- v4l2: codecs enabled/disabled depending on pixfmt defined
- v4l2: pass timebase/framerate to the context
- v4l2: runtime decoder reconfiguration.
- v4l2: add more frame information
- v4l2: free hardware resources on last reference being released
- v4l2: encoding: disable b-frames for upstreaming (patch required)
[1] https://lwn.net/Articles/697956/
System Level view:
v42l_m2m_enc/dec --> v4l2_m2m --> v4l2_context --> v4l2_buffers
Reviewed-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Alexis Ballier <aballier@gentoo.org>
Tested-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
The filter supports two inputs and (implicitly) scaling the second input
during composition, unlike the software overlay.
The code has been separated into common interface and qsv overlay
implementation. The common part mainly creates the qsv session and
manages the surface which is nearly the same for all qsv filters.
So the qsvvpp.c/qsvvpp.h API can be used by other QSV vpp filters
to reduce code redundancy.
Usage:
-hwaccel qsv -c:v mpeg2_qsv -r 25 -i in.m2v -hwaccel qsv -c:v h264_qsv
-i in.h264 -filter_complex
"overlay_qsv=eof_action=repeat:x=(W-w)/2:y=(H-h)/2" -b 2M -maxrate 3M
-c:v h264_qsv -y out.h264
Two inputs should have different sizes otherwise one will be completely
covered or you need to scale the second input as follows:
-hwaccel qsv -c:v mpeg2_qsv -r 25 -i in.m2v -hwaccel qsv -c:v h264_qsv
-i in.h264 -filter_complex
"overlay_qsv=w=720:h=576:x=(W-w)/2:y=(H-h)/2" -b 2M -maxrate 3M -c:v
h264_qsv -y out.h264
Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com>
Change-Id: I5c381febb0af6e2f9622c54ba00490ab99d48297
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
Add common filters of the qsv vpp features including scale,denosie,
deinterlace,frc,crop and procAmp.
Performance will be significantly reduced in the test if using cascade
mode just like qsv framerate + qsv scale + qsv deinterlace + qsv denoise in
separated way no matter in system or video memmory cases.
And the code is so redundant because so much the same just as session and
surface's creation and management.
So we add a common qsv filter.
Usage:
-hwaccel qsv -c:v h264_qsv -r 25 -i in -vf
vpp_qsv=w=iw/2:h=400:deinterlace=1:framerate=60:detail=50:denoise=50
-b 2M -maxrate 3M -c:v h264_qsv -y out.h264
Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com>
Change-Id: I130392ce722138c209ab658c5f03f0009b6e8024
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
ffmpeg need a dash demuxer for demux the dash formats base on
https://github.com/samsamsam-iptvplayer/exteplayer3/blob/master/tmp/ffmpeg/patches/3.2.2/000001_add_dash_demux.patch
TODO:
1. support multi bitrate dash.
v2 fixed:
1. from autodetect to disabled
2. from camelCase code style to ffmpeg code style
3. from RepType to AVMediaType
4. fix variable typo
5. change time value from uint32_t to uint64_t
6. removed be used once API
7. change 'time(NULL)`, except it is not 2038-safe.' to av_gettime and av_timegm
8. merge complex free operation to free_fragment
9. use API from snprintf to av_asprintf
v3 fixed:
1. fix typo from --enabled-xml2 to --enable-xml2
v4 fixed:
1. from --enable-xml2 to --enable-libxml2
2. move system includes to top
3. remove nouse includes
4. rename enum name
5. add a trailing comma for the last entry enum
6. fix comment typo
7. add const to DASHContext class front
8. check sscanf if return arguments and give warning message when error
9. check validity before free seg->url and seg
10. check if the val is null, before use atoll
v5 fixed:
1. fix typo from mainifest to manifest
v6 fixed:
1. from realloc to av_realloc
2. from free to av_free
v7 fixed:
1. remove the -lxml2 from configure when require_pkg_config
v8 fixed:
1. fix replace filename template by av_asprintf secure problem
v9 modified:
1. make manifest parser clearly
v10 fixed:
1. fix function API name code style
2. remove redundant strreplace call
3. remove redundant memory operation and check return value from get_content_url()
4. add space between ) and {
5. remove no need to log the value for print
v11 fixed:
1. from atoll to strtoll
Suggested-by: Michael Niedermayer <michael@niedermayer.cc>
v12 fixed:
1. remove strreplace and instead by av_strreplace
Suggested-by: Nicolas George <george@nsup.org>
v13 fixed:
1. fix bug: cannot play:
http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd
Reported-by: Andy Furniss <adf.lists@gmail.com>
v14 fixed:
1. fix bug: TLS connection was non-properly terminated
2. fix bug: No trailing CRLF found in HTTP header
Reported-by: Andy Furniss <adf.lists@gmail.com>
v15 fixed:
1. play youtube link: ffmpeg -i $(youtube-dl -J "https://www.youtube.com/watch?v=XmL19DOP_Ls" | jq -r ".requested_formats[0].manifest_url")
2. code refine for timeline living stream
Reported-by: Ricardo Constantino <wiiaboo@gmail.com>
v16 fixed:
1. remove the snprintf and instead by get_segment_filename make safety
2. remove unnecessary loops
3. updated xmlStrcmp and xmlFree to av_* functions
4. merge code repeat into one function
5. add memory alloc faild check
6. update update_init_section and open_url
7. output safety error message when filename template not safe
Suggested-by : wm4 <nfxjfg@googlemail.com>
v17 fixed:
1. add memory alloc faild check
2. fix resource space error at free_representation
v18 fixed:
1. add condition of template format
v19 fixed:
1. fix typo of the option describe
v20 fixed:
1. add the c->base_url alloc check
2. make the DASHTmplId same to dashenc
v21 fixed:
1. remove get_repl_pattern_and_format and get_segment_filename
2. process use dashcomm APIs
v22 fixed:
1. modify the include "dashcomm.h" to include "dash.h"
2. use internal API from dash_fill_tmpl_params to ff_dash_fill_tmpl_params
Signed-off-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: samsamsam <samsamsam@o2.pl>
- there is no need for kCVImageBufferColorPrimaries_ITU_R_2020 checks,
it's done at runtime
- VideoToolbox presence is now checked with check_apple_framework()
- link to CoreServices is only done when videotoolbox is enabled
$headers is a variable set in the context of other functions (we don't
use the "local" keyword in our scripts, so those variables are global).
Currently, when checking for AVFoundation/AVFoundation.h, the actual
enabled header is math.h.
Similarly, when testing for QuartzCore/CoreImage.h, the actual enabled
header is CoreGraphics/CoreGraphics.h.
This is completely broken and may be the reason why these checks are
made in random places.
On ARM platforms, accessing the PMU registers requires special user
access permissions. Since there is no other way to get accurate timers,
the current implementation of timers in FFmpeg rely on these registers.
Unfortunately, enabling user access to these registers on Linux is not
trivial, and generally involve compiling a random and unreliable github
kernel module, or patching somehow your kernel.
Such module is very unlikely to reach the upstream anytime soon. Quoting
Robin Murphin from ARM:
> Say you do give userspace direct access to the PMU; now run two or more
> programs at once that believe they can use the counters for their own
> "minimal-overhead" profiling. Have fun interpreting those results...
>
> And that's not even getting into the implications of scheduling across
> different CPUs, CPUidle, etc. where the PMU state is completely beyond
> userspace's control. In general, the plan to provide userspace with
> something which might happen to just about work in a few corner cases,
> but is meaningless, misleading or downright broken in all others, is to
> never do so.
As a result, the alternative is to use the Performance Monitoring Linux
API which makes use of these registers internally (assuming the PMU of
your ARM board is supported in the kernel, which is definitely not a
given...).
While the Linux API is obviously cross platform, it does have a
significant overhead which needs to be taken into account. As a result,
that mode is only weakly enabled on ARM platforms exclusively.
Note on the non flexibility of the implementation: the timers (native
FFmpeg vs Linux API) are selected at compilation time to prevent the
need of function calls, which would result in a negative impact on the
cycle counters.