summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* aacenc: add support for changing options based on a profileRostislav Pehlivanov2015-10-12
| | | | | | | | | | | | | | | | | | | | This commit adds the ability for a profile to set the default options, as well as for the user to override such options by simply stating them in the command line while still keeping the same profile, as long as those options are still permitted by the profile. Example: setting the profile to aac_low (the default) will turn PNS and IS on. They can be disabled by -aac_pns 0 and -aac_is 0, respectively. Turning on -aac_pred 1 will cause the profile to be elevated to aac_main, as long as no options forbidding aac_main have been entered (like AAC-LTP, which will be pushed soon). A useful feature is that by setting the profile to mpeg2_aac_low, all MPEG4 features will be disabled and if the user tries to enable them then the program will exit with an error. This profile is signalled with the same bitstream as aac_low (MPEG4) but some devices and decoders will fail if any MPEG4 features have been enabled.
* avfilter/drawtext: allow to format pts with strftimeAlex Agranovsky2015-10-12
| | | | Signed-off-by: Alex Agranovsky <alex@sighthound.com>
* lavf/tee: allow multiple stream specifiers in select.Bela Bodecs2015-10-12
| | | | | | | | | It makes possible to put multiple stream specifier into the select option separated by comma. eg. select=\'a:0,v\' Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu> Signed-off-by: Nicolas George <george@nsup.org>
* aacenc: add support for encoding 7.1 channel audioRostislav Pehlivanov2015-10-12
| | | | | | | This commit implements support for 7.1 channel audio. There's no more predefined bitstream channel mappings so going beyond 8 channels (and 7 channels exactly) will require programmable channel elements, which is already underway.
* aacenc_quantization: fix header descriptionRostislav Pehlivanov2015-10-12
| | | | Two guesses as to which file was used as boilerplate.
* AAC encoder: memoize quantize_band_costClaudio Freire2015-10-12
| | | | | | | | | | The bulk of calls to quantize_band_cost are replaced by a call to a version that memoizes, greatly improving performance, since during coefficient search there is a great deal of repeat work. Memoization cannot always be applied, so do this in a different function, and leave the original as-is.
* avformat/flvdec: set broken_sizes for "metadatacreator : MEGA"Michael Niedermayer2015-10-12
| | | | | | | | The 2nd size value is wrong for the sample file Fixes: Ticket4903 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* AAC encoder: fix assertion error re SF differencesClaudio Freire2015-10-11
| | | | | | | | Intermediate results can indeed violate SF delta. Instead of asserting there, just make the code safe, and assert on the final result. Also re-clamp SFs more often in short windows (which tend to violate the restriction when encoding the switch from one window to the other)
* aaccoder_twoloop.h: simplify and comment ff_pns_bits()Rostislav Pehlivanov2015-10-12
|
* aacenc_utils: add 'inline' flag to find_form_factor, silence warningRostislav Pehlivanov2015-10-12
| | | | Seems it was forgotten.
* x86/vf_w3fdif: use aligned loads in w3fdif_simple_highJames Almer2015-10-11
| | | | | Found-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* x86/vf_w3fdif: simplify w3fdif_simple_highJames Almer2015-10-11
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove leftover iff_byterun1 decoderAndreas Cadhalpun2015-10-12
| | | | | | | | | | | It was merged with the iff_ilbm decoder in commit 929a24efff9a208a52748605eb412ffb915c1403. Define AV_CODEC_ID_IFF_BYTERUN1 as AV_CODEC_ID_IFF_ILBM for API compatibility. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* ffplay: eliminate stream_component_close forward declarationMarton Balint2015-10-12
| | | | | | No change in fuctionality. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: close streams and AVFormatContext in the main threadMarton Balint2015-10-12
| | | | | | To avoid race conditions. Signed-off-by: Marton Balint <cus@passwd.hu>
* intmath: remove av_ctz.Ronald S. Bultje2015-10-11
| | | | | It's a non-installed header and only used in one place (flacenc). Since ff_ctz is static inline, it's fine to use that instead.
* AAC encoder tests: increase fuzz for pred testClaudio Freire2015-10-11
| | | | MIPS needs more fuzz
* ffmpeg: modify tty state when stderr is redirectedGanesh Ajjanagadde2015-10-11
| | | | | | | Removes unnecessary isatty(), fixes Ticket2964 Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* AAC encoder: cosmetics from last commitClaudio Freire2015-10-11
| | | | Reindent
* AAC encoder: Extensive improvementsClaudio Freire2015-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This finalizes merging of the work in the patches in ticket #2686. Improvements to twoloop and RC logic are extensive. The non-exhaustive list of twoloop improvments includes: - Tweaks to distortion limits on the RD optimization phase of twoloop - Deeper search in twoloop - PNS information marking to let twoloop decide when to use it (turned out having the decision made separately wasn't working) - Tonal band detection and priorization - Better band energy conservation rules - Strict hole avoidance For rate control: - Use psymodel's bit allocation to allow proper use of the bit reservoir. Don't work against the bit reservoir by moving lambda in the opposite direction when psymodel decides to allocate more/less bits to a frame. - Retry the encode if the effective rate lies outside a reasonable margin of psymodel's allocation or the selected ABR. - Log average lambda at the end. Useful info for everyone, but especially for tuning of the various encoder constants that relate to lambda feedback. Psy: - Do not apply lowpass with a FIR filter, instead just let the coder zero bands above the cutoff. The FIR filter induces group delay, and while zeroing bands causes ripple, it's lost in the quantization noise. - Experimental VBR bit allocation code - Tweak automatic lowpass filter threshold to maximize audio bandwidth at all bitrates while still providing acceptable, stable quality. I/S: - Phase decision fixes. Unrelated to #2686, but the bugs only surfaced when the merge was finalized. Measure I/S band energy accounting for phase, and prevent I/S and M/S from being applied both. PNS: - Avoid marking short bands with PNS when they're part of a window group in which there's a large variation of energy from one window to the next. PNS can't preserve those and the effect is extremely noticeable. M/S: - Implement BMLD protection similar to the specified in ISO-IEC/13818:7-2003, Appendix C Section 6.1. Since M/S decision doesn't conform to section 6.1, a different method had to be implemented, but should provide equivalent protection. - Move the decision logic closer to the method specified in ISO-IEC/13818:7-2003, Appendix C Section 6.1. Specifically, make sure M/S needs less bits than dual stereo. - Don't apply M/S in bands that are using I/S Now, this of course needed adjustments in the compare targets and fuzz factors of the AAC encoder's fate tests, but if wondering why the targets go up (more distortion), consider the previous coder was using too many bits on LF content (far more than required by psy), and thus those signals will now be more distorted, not less. The extra distortion isn't audible though, I carried extensive ABX testing to make sure. A very similar patch was also extensively tested by Kamendo2 in the context of #2686.
* avfilter/buffersrc: add av_warn_unused_result attributesGanesh Ajjanagadde2015-10-11
| | | | | | | This adds av_warn_unused_result whenever it is relevant. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* configure: fix configure when using gccJean-Yves Avenard2015-10-11
| | | | | | | | | | | | Fixes Ticket4922. Commit 060102389e572abb2beaed3b9f5e1036aeea43f1 broke configure, since the inversion ! was missed while converting the grep to a case statement. Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* x86/vf_w3fdif: move pxor outside the loop in w3fdif_complex_lowJames Almer2015-10-11
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/sipr: use AVERROR return code instead of -1Paul B Mahol2015-10-11
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/rsd: support XADP tagPaul B Mahol2015-10-11
| | | | | | It appears that Xbox ADPCM is same as WAV adpcm. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/pngdec: Use av_malloc_array()Michael Niedermayer2015-10-11
| | | | | Suggested-by: ubitux Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000dec: Check that step_x/y are valid before use in ↵Michael Niedermayer2015-10-11
| | | | | | | | JPEG2000_PGOD_PCRL Fixes: CID1322305 and CID1322304 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter: add selectivecolor filterClément Bœsch2015-10-11
|
* avcodec/pngdec: Alloc buffer after blend_op check in handle_p_frame_apng()Michael Niedermayer2015-10-11
| | | | | | | Avoids memleak on error Fixes CID1322342 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Revert "Merge commit '8b830ee9a26d47b138f12a82085cdb372f407f1e'" (avconv: Do ↵Michael Niedermayer2015-10-11
| | | | | | | | | | | | | | | | | | | | | | not try to configure filter outputs without streams) FFmpeg already tests for this case in configure_output_filter() and printed a clearer error message example: ./ffmpeg -f lavfi -i color -f lavfi -i color -filter_complex "[1]null[x],[0][1]overlay" -f null - before the merge / after the revert: Filter null has a unconnected output after the merge / before the revert: Output pad "default" with type video of the filter instance "Parsed_null_0" of null not connected to any destination Error configuring complex filters. Invalid argument This reverts commit 3e3779cd517e4d2d1f21d5eb6afdb428cd3c1aa0, reversing changes made to 0b28039a44b33753d77116691d680bd60f3bac1f. Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
* avutil/intmath: Change debruijn_ctz64 to use 8bit elementsMichael Niedermayer2015-10-11
| | | | | | | This reduces the memory & cache need from 256 to 64 bytes the code also seems faster with this change Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/mathematics: speed up av_gcd by using Stein's binary GCD algorithmGanesh Ajjanagadde2015-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses Stein's binary GCD algorithm: https://en.wikipedia.org/wiki/Binary_GCD_algorithm to get a roughly 4x speedup over Euclidean GCD on standard architectures with a compiler intrinsic for ctzll, and a roughly 2x speedup otherwise. At the moment, the compiler intrinsic is used on GCC and Clang due to its easy availability. Quick note regarding overflow: yes, subtractions on int64_t can, but the llabs takes care of that. The llabs is also guaranteed to be safe, with no annoying INT64_MIN business since INT64_MIN being a power of 2, is shifted down before being sent to llabs. The binary GCD needs ff_ctzll, an extension of ff_ctz for long long (int64_t). On GCC, this is provided by a built-in. On Microsoft, there is a BitScanForward64 analog of BitScanForward that should work; but I can't confirm. Apparently it is not available on 32 bit builds; so this may or may not work correctly. On Intel, per the documentation there is only an intrinsic for _bit_scan_forward and people have posted on forums regarding _bit_scan_forward64, but often their documentation is woeful. Again, I don't have it, so I can't test. As such, to be safe, for now only the GCC/Clang intrinsic is added, the rest use a compiled version based on the De-Bruijn method of Leiserson et al: http://supertech.csail.mit.edu/papers/debruijn.pdf. Tested with FATE, sample benchmark (x86-64, GCC 5.2.0, Haswell) with a START_TIMER and STOP_TIMER in libavutil/rationsl.c, followed by a make fate. aac-am00_88.err: builtin: 714 decicycles in av_gcd, 4095 runs, 1 skips de-bruijn: 1440 decicycles in av_gcd, 4096 runs, 0 skips previous: 2889 decicycles in av_gcd, 4096 runs, 0 skips Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pngdec: Check blend_op.Michael Niedermayer2015-10-11
| | | | | | Fixes CID1322359, CID1322358 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/resampler, swresample/options: use proper capitalizationGanesh Ajjanagadde2015-10-10
| | | | | | | | | | | | | | Proper names should be capitalized in all user facing API as far as possible. The option names themselves have not been changed since: 1. We consistently keep option names in lower case. 2. Changing them would break existing scripts. 3. I suspect that we want to be similar to Sox and its relevant options. The converse is also true: improper names should not be capitalized generally. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* gitignore: ignore object file temporariesGanesh Ajjanagadde2015-10-10
| | | | | | | | | | | | | | | | During a build, a lot of *.o.-hash files are created - had not noticed this as they are usually dumped in tmpfs on Linux. However, they sometimes are present during a long build in the project directory, making it annoying to commit while the project is being built. These have been observed with Clang, -fsanitize-undefined on Arch Linux, though other configurations may also generate such temporaries. The solution here is on lines with the Linux kernel's .gitignore: https://github.com/torvalds/linux/blob/master/.gitignore. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/scaler, swscale/options: use proper capitalizationGanesh Ajjanagadde2015-10-10
| | | | | | | | | | | | | Proper names should be capitalized in all user facing API as far as possible. The option names themselves have not been changed since: 1. We consistently keep option names in lower case. 2. Changing them would break existing scripts. The converse is also true: improper names should not be capitalized generally. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate/async: test error code from underlying protocolZhang Rui2015-10-10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/async: pass internal I/O errorZhang Rui2015-10-10
| | | | | | av_fifo_generic_write() does not return any error code. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/x86/vf_w3fdif: add colons after labelsPaul B Mahol2015-10-10
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavc: move bitstream filter args to the bsf ctxRodger Combs2015-10-10
|
* avfilter/vf_w3fdif: add x86 SIMDPaul B Mahol2015-10-10
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* doc/developer: minor typo and consistency fixesGanesh Ajjanagadde2015-10-10
| | | | Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* doc/build_system: miscellaneous typo and consistency fixesGanesh Ajjanagadde2015-10-10
| | | | Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec/ac3enc: fix undefined negative left shiftGanesh Ajjanagadde2015-10-10
| | | | | | | | | | | | | | | This should fix the undefined behavior reported in: https://trac.ffmpeg.org/ticket/4727. I can reproduce this at runtime: simply stick in an abort call in asym_quant to check if c < 0 and run FATE. I don't know ac3 so I can't confirm if negative coefficients are intentional, but at the moment they clearly are according to FATE. This resolves the undefined behavior. Tested with FATE. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'c3e5c47bdae2bb8219fea62d91b7455650b22c60'Hendrik Leppkes2015-10-10
|\ | | | | | | | | | | | | * commit 'c3e5c47bdae2bb8219fea62d91b7455650b22c60': libopenh264enc: Added max_nal_size option Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * libopenh264enc: Added max_nal_size optionMario Gasparoni2015-10-09
| | | | | | | | | | | | Also added dynamic slice_mode option, needed for the max_nal_size. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit '00cc10aee380f882507bac994ac469d8358d12e8'Hendrik Leppkes2015-10-10
|\| | | | | | | | | | | | | * commit '00cc10aee380f882507bac994ac469d8358d12e8': asfdec: do not skip padding if offset is above packet size - padding Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * asfdec: do not skip padding if offset is above packet size - paddingAlexandra Hájková2015-10-08
| | | | | | | | | | | | Sample-Id: https://samples.libav.org/asf-wmv/demux-asf-assert-failed.wmv Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit 'a8956eca1ff3b5b7f9aadbe6eb46536efeb2f828'Hendrik Leppkes2015-10-10
|\| | | | | | | | | | | | | * commit 'a8956eca1ff3b5b7f9aadbe6eb46536efeb2f828': cabac: Make CABAC states hardcoded Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * cabac: Make CABAC states hardcodedAnton Khirnov2015-10-08
| | | | | | | | | | | | | | There is not much reason to generate such a small table at runtime. Signed-off-by: Derek Buitenhuis <derekb@vimeo.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>