1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

89806 Commits

Author SHA1 Message Date
wm4
cbbb206734 hwcontext_vdpau: implement av_hwdevice_get_hwframe_constraints()
In addition, this does not allow creating frames contexts with sw_format
for which no known transfer formats exist. In theory, we should check
whether the chroma format (i.e. the sw_format) is supported at all by
the vdpau driver, but checking for transfer formats has the same effect.

Note that the pre-existing code adds 1 to priv->nb_pix_fmts[i] for
unknown reason, and some checks need to account for that to check for
empty lists. They are not off-by-one errors.
2018-01-15 12:37:30 +01:00
wm4
43e1ccfea1 http: cosmetics: reformat reconnect check for better readability
The condition was a bit too long, and most editors will break the line
and turn it into an unreadable mess. Move out some of the conditions.

This should not change the behavior.
2018-01-15 12:37:30 +01:00
Robert Nagy
856b7cae9f avfilter/vf_idet: added more YUVA formats to idet query_formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-14 23:19:01 +01:00
sfan5
57dbabd9c1 dashdec: Support SegmentTemplate inside Period
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 23:02:26 +08:00
sfan5
01d74c4055 dashdec: Avoid trying to read any segments beyond the last
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 23:01:45 +08:00
sfan5
74b143d81f dashdec: Correct seeking behaviour
dash_read_seek() is called only once to issue a seek
of *all* streams to the specified timestamp. But to
avoid reopening each stream, do a "dry run" for streams
that are in a discarded state.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 22:36:02 +08:00
sfan5
bb0cc2e7bd dashdec: Search for segment timeline inside AdaptionSets too 2018-01-14 22:35:31 +08:00
sfan5
94cc16499f dashdec: Support for multiple video/audio streams
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 22:34:43 +08:00
sfan5
66e551eafb dashdec: Expose bandwidth and representation ID as metadata
The primary goal was making it viable to play YouTube/Vimeo/... videos
using the native demuxer, since mpv currently uses a workaround in form
of Edit Decision Lists (EDL).

Implemented features:

1 Exposing id / bitrate as stream metadata (similar to the HLS demuxer)
2 Support for multiple video and audio streams
3 A few minor parts of the specification that are in use at YouTube

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 22:33:57 +08:00
Gyan Doshi
96f94624e0 avformat/adtsenc: allow only AAC streams
The ADTS muxer will silently (attempt to) mux any audio stream passed to it.
Patch adds a codec check.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-14 09:57:51 -03:00
James Almer
02dba49dd3 avformat/adtsenc: add adts_init()
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-14 09:57:42 -03:00
Rostislav Pehlivanov
c51301db14 dcaenc: move all tables inside context and fix incorrect coding style
Functionally identical to the old code, with less lines wasted.
Partially fixes the complete disregard for the 80 col/line guide.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-13 18:37:54 +00:00
Daniil Cherednik
ec6e389c75 avcodec/dcaenc: Use ffmpeg mdct instead of own implementation
Signed-off-by: Daniil Cherednik <dan.cherednik@gmail.com>
2018-01-13 18:13:58 +00:00
Rostislav Pehlivanov
56e11ebf55 dcaenc: cleanup on init failure and add a threadsafe init codec cap
The encoder didn't clean up if a malloc failed during init.
It also doesn't need any external tables to be initialized on init.
Finally, it didn't need to check for whether avctx->priv_data exists during
uninit.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-13 18:06:59 +00:00
Daniil Cherednik
c7d726f7f4 opusenc_psy: Typo, use all coeffs in range for band tonality calculation 2018-01-13 17:54:20 +00:00
Rostislav Pehlivanov
6c4b9eb935 fate: remove the fate-aac-ltp-encode test
It tests a useless profile which sounds no better than regular aac and which
takes extremely long to encoder something. Also it has been behind experimental
flag for as long as it has been supported.
Should be removed altogether sometime in the future.
2018-01-13 12:03:49 +00:00
Rostislav Pehlivanov
fcb681ac3e aacenc: use the fast coder as the default
The twoloop coder sounds decent at low bitrates, however at higher bitrates
it sounds worse than the fast coder (which used to be the old twoloop coder
before October 2015) and needs quite a lot more CPU.
Change the default to fast. It has been well tested and has had little changes
over the years so its been confirmed to be quite stable.
Also change its description (not valid for more than a year) and the
documentation.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-13 12:03:19 +00:00
Rodger Combs
1eb7c1d49d lavc/libx265: support all color parameters that x265 does 2018-01-12 18:33:58 -06:00
Marton Balint
0c31a3876d avfilter/vf_framerate: simplify filter
The framerate filter was quite convoluted with some filter_frame /
request_frame logic bugs. It seemed easier to rewrite the whole filter_frame /
request_frame part and also the frame interpolation ratio calculation part in
one step.

Notable changes:
- The filter now only stores 2 frames instead of 3
- filter_frame outputs all the frames it can to be able to handle consecutive
  filter_frame calls which previously caused early drops of buffered frames.
- because of this, request_frame is largely simplified and it only outputs
  frames on flush. Previously consecuitve request_frame calls could cause the
  filter to think it is in flush mode filling its buffer with the same frames
  causing a "ghost" effect on the output.
- PTS discontinuities are handled better
- frames with unknown PTS values are now dropped

Fixes ticket #4870.
Probably fixes ticket #5493.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-12 23:40:41 +01:00
Michael Niedermayer
860d991fcd avcodec/utils: Avoid hardcoding duplicated types in sizeof()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 22:57:01 +01:00
Michael Niedermayer
2cd718a4c5 avcodec/opus: Add {} over multiline if() body
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 22:57:01 +01:00
Michael Niedermayer
7dbbb75ee3 avcodec/arm/sbrdsp_neon: Use a free register instead of putting 2 things in one
Fixes high pitched shriek
Fixes: 25420848_1478428308873746_4255813235963330560_n.mp4

Reported-by: Dale Curtis <dalecurtis@google.com>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 22:45:02 +01:00
Richard Shaffer
9147c09755 avformat/http: fix memory leak in parse_cookie.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Jérôme Martinez
58e16a4f4b avcodec/ffv1enc: mark RGB48 support as non-experimental
Resulting bitstream was tested with a conformance checker
using the last draft of FFV1 specifications.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Also the files are already in the wild, and decoder support is
thus needed. And with decoders widely supporting it, there is no
advantage in not allowing it in the encoder.
The exact bitstream format may change in future versions of the
spec, if improvments are found.
2018-01-12 12:31:55 +01:00
Harald Gaechter
43e510d668 avdevice/gdigrab: Fix screen size and mouse position calculations on hi-DPI screens
Signed-off-by: Harald Gaechter <harald.gaechter@wolfvision.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Jörn Heusipp
8b1b25a86f avformat/libopenmpt: Update to libopenmpt 0.3 API
libopenmpt 0.3 deprecates openmpt_module_create_from_memory() and
provides a replacement function openmpt_module_create_from_memory2().

Detecting libopenmpt 0.3 can be done at build time via the API
version macros provided by libopenmpt. libopenmpt 0.2 did not provide
all required macros, however libopenmpt documents the required #define
shims that can be safely added for libopenmpt 0.2.

Using openmpt_module_create_from_memory2() instead of
openmpt_module_create_from_memory() avoids the deprecation warning
when building ffmpeg with libopenmpt 0.3.

openmpt_module_create_from_memory2() provides more fine-grained error
reporting and in particular allows distinguishing out-of-memory from
input file parsing errors. Return appropriate ffmpeg errors
accordingly.

libopenmpt 0.3 is ABI and API compatible with applications built
against libopenmpt 0.2. Building ffmpeg with libopenmpt 0.2 is still
supported.

Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Jörn Heusipp
a571a2a65a avformat/libopenmpt: Fix mixed code and declarations
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Jun Zhao
9b955eece6 examples/vaapi_encode: Remove redundancy check when free context.
avcodec_free_context have handle NULL pointer case, so caller doesn't
need to check the NULL before call this function.

Signe-off-by: Jun Zhao <jun.zhao@intel.com>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
James Almer
6e80079a28 avcodec: increase AV_INPUT_BUFFER_PADDING_SIZE to 64
AVX-512 support has been introduced, and even if no functions currently
use zmm registers (able to load as much as 64 bytes of consecutive data
per instruction), they will be added eventually.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-11 23:46:31 -03:00
Martin Vignali
b94cd55155 avfilter/x86/vf_interlace : add AVX2 version 2018-01-11 21:03:19 +01:00
James Almer
ef21033c32 avutil/mastering_display_metadata: fix copyright header wrongly formated as doxy
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-11 11:35:51 -03:00
Carl Eugen Hoyos
af964baf09 configure: Simplify detection of static x264 on systems without pkg-config.
Fixes a regression since 6dfcbd80.
2018-01-11 11:12:38 +01:00
Eduard Sinelnikov
7fcbebbeaf avformat/aiffdec: AIFF fix in case of ANNO
Apple's AIFF protocol clearly states that each chucnk which is odd sized a padding should be added.
In the old version of aiffdec adding of padding was done in `get_meta`. And in case of unknown chunk name it was done in defalut case.
The new version has deleted the padding in default case and added padding adding after the switch.
But the new version didn't removed the padding adding in the `get_meta` function so in some cases padding was added twice which leaded to a bug.

Fixes: sample.aiff

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-11 03:29:25 +01:00
Mark Thompson
526a87b471 vf_program_opencl: Add missing error code returns
Fixes CID #1427285.
2018-01-10 23:27:19 +00:00
Mark Thompson
9b4611a1c1 vf_overlay_opencl: Don't leak output frame on error
Fixes CID #1423277.
2018-01-10 23:25:56 +00:00
Paul B Mahol
6cc44c0583 doc/filters: fix error in aiir options names
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 20:32:22 +01:00
Paul B Mahol
de8a1d8d4d avfilter/af_aiir: add polar zeros/poles format variant
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 20:25:50 +01:00
Paul B Mahol
de5b12c93f avfilter/af_aiir: unbreak clipping detection
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 19:24:41 +01:00
Paul B Mahol
ea25b7b41c doc/filters: fix examples for aiir filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 18:46:29 +01:00
Paul B Mahol
3c29f68b4d avfilter/af_aiir: do not leak memory on failure in convert_zp2tf()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 18:38:01 +01:00
Paul B Mahol
16ba6a8ad1 avformat/wavdec: make fact chunk parsing for w64 more robust
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 15:54:15 +01:00
James Almer
32f85056b3 configure: don't use SDL.h in check_func_headers when checking for SDL2
check_func_headers() defines a main() function, which clashes with a
redefinition done by said SDL header. Check for SDL_PollEvent using
SDL_events.h only instead, where the redefinition doesn't happen.

Fixes a regression since d03c39b46b.

Tested-by: RiCON
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-10 11:23:45 -03:00
Paul B Mahol
d38a223943 doc/filters: update aiir filter documentation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-09 18:02:01 +01:00
Paul B Mahol
e9edd61965 avfilter/af_aiir: refactor code so it uses IIRChannel struct
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-09 17:46:27 +01:00
James Almer
ded409b7c9 avresample: remove deprecated attribute from the AVAudioResampleContext struct
Having all the public functions marked as deprecated is enough.

This gets rid of a warning spam when compiling any file including
libavresample/avresample.h even when avresample is not enabled, like
it's the case with fftools/cmdutils.c

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-09 10:56:53 -03:00
Paul B Mahol
21c99f4b40 avfilter/af_aiir: make default processing to serially cascaded
Also add several helpfull log messages.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-09 13:08:01 +01:00
Paul B Mahol
d9a3074b93 avfilter/af_aiir: add slice threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-09 12:25:35 +01:00
Paul B Mahol
7add1ca2b5 avfilter/af_aiir: add cascaded biquads support
Also add precision option.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-09 12:25:35 +01:00
Kyle Swanson
42a5fe340f doc/filters: correct typo in psnr filter docs
Signed-off-by: Kyle Swanson <k@ylo.ph>
2018-01-08 16:35:23 -08:00
Michael Niedermayer
d6945aeee4 avcodec/h264addpx_template: Fixes integer overflows
Fixes: signed integer overflow: 512 + 2147483491 cannot be represented in type 'int'
Fixes: 4780/clusterfuzz-testcase-minimized-4709066174627840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-08 21:50:34 +01:00