Commit Graph

89848 Commits

Author SHA1 Message Date
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
Michael Niedermayer 0e62a23734 avcodec/dirac_dwt: Fix overflows in COMPOSE_HAARiH0/COMPOSE_HAARiL0
Fixes: 4830/clusterfuzz-testcase-minimized-5255392054476800
Fixes: signed integer overflow: 2147483646 - -7 cannot be represented in type 'int'

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:15 +01:00
Michael Niedermayer eaa9317589 avcodec/diracdec: Fix integer overflow with quant
Fixes: signed integer overflow: 2 + 2147483646 cannot be represented in type 'int'
Fixes: 4792/clusterfuzz-testcase-minimized-6322450775146496

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:12 +01:00
Michael Niedermayer 1bcd7fefcb avcodec/opus_parser: Check payload_len in parse_opus_ts_header()
Fixes: clusterfuzz-testcase-minimized-6134545979277312
Fixes: crbug 797469

Reported-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-08 21:49:53 +01: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 Niedermayer b3192c64b5 avcodec/jpeg2000dsp: Fix integer overflows in ict_int()
Fixes: signed integer overflow: 46802 * -71230 cannot be represented in type 'int'
Fixes: 4756/clusterfuzz-testcase-minimized-4812495563784192

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 18:57:22 +01:00
Carl Eugen Hoyos ed03fad2cc lavf/oggparseogm: Remove an unneeded include.
Forgotten in e8f7171a
2018-01-08 14:36:18 +01:00
Carl Eugen Hoyos e8f7171a34 lavf/oggparseogm: Remove an unneeded assert.
Suggested-by: Reimar
2018-01-08 13:20:13 +01:00
Paul B Mahol 3f234a0b22 avfilter/af_aiir: do not forget to free gains too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-08 11:22:21 +01:00
Paul B Mahol 205046420d avfilter/af_aiir: fix typo which may cause overread
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-08 08:45:02 +01:00
James Almer 9d68c0191c fate/filter-video: fix 12 bit framerate filter tests on big endian targets
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-08 00:51:19 -03:00
Mark Thompson 03c08d59fb doc/filters: Document OpenCL program filters
Include some example programs.
2018-01-07 23:24:32 +00:00
Mark Thompson dfdc146161 lavfi: Add filters to run arbitrary OpenCL programs 2018-01-07 23:24:30 +00:00
Mark Thompson 202b59cd3d lavfi/opencl: Use filter device if no input device is available
This allows implementing sources as well as filters.
2018-01-07 23:24:28 +00:00