ffmpeg.git
4 years agox86/vf_w3fdif: simplify w3fdif_simple_high
James Almer [Sat, 10 Oct 2015 23:29:56 +0000 (20:29 -0300)]
x86/vf_w3fdif: simplify w3fdif_simple_high

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec: remove leftover iff_byterun1 decoder
Andreas Cadhalpun [Sun, 11 Oct 2015 20:31:45 +0000 (22:31 +0200)]
avcodec: remove leftover iff_byterun1 decoder

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>
4 years agoffplay: eliminate stream_component_close forward declaration
Marton Balint [Tue, 6 Oct 2015 23:21:40 +0000 (01:21 +0200)]
ffplay: eliminate stream_component_close forward declaration

No change in fuctionality.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoffplay: close streams and AVFormatContext in the main thread
Marton Balint [Fri, 6 Feb 2015 00:37:53 +0000 (01:37 +0100)]
ffplay: close streams and AVFormatContext in the main thread

To avoid race conditions.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agointmath: remove av_ctz.
Ronald S. Bultje [Sun, 11 Oct 2015 21:43:29 +0000 (17:43 -0400)]
intmath: remove av_ctz.

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.

4 years agoAAC encoder tests: increase fuzz for pred test
Claudio Freire [Sun, 11 Oct 2015 21:45:27 +0000 (18:45 -0300)]
AAC encoder tests: increase fuzz for pred test

MIPS needs more fuzz

4 years agoffmpeg: modify tty state when stderr is redirected
Ganesh Ajjanagadde [Fri, 31 Jul 2015 12:36:27 +0000 (08:36 -0400)]
ffmpeg: modify tty state when stderr is redirected

Removes unnecessary isatty(), fixes Ticket2964

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
4 years agoAAC encoder: cosmetics from last commit
Claudio Freire [Sun, 11 Oct 2015 21:06:02 +0000 (18:06 -0300)]
AAC encoder: cosmetics from last commit

Reindent

4 years agoAAC encoder: Extensive improvements
Claudio Freire [Sun, 11 Oct 2015 20:29:50 +0000 (17:29 -0300)]
AAC encoder: Extensive improvements

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.

4 years agoavfilter/buffersrc: add av_warn_unused_result attributes
Ganesh Ajjanagadde [Tue, 6 Oct 2015 22:53:47 +0000 (18:53 -0400)]
avfilter/buffersrc: add av_warn_unused_result attributes

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>
4 years agoconfigure: fix configure when using gcc
Jean-Yves Avenard [Sun, 11 Oct 2015 13:37:42 +0000 (09:37 -0400)]
configure: fix configure when using gcc

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>
4 years agox86/vf_w3fdif: move pxor outside the loop in w3fdif_complex_low
James Almer [Sat, 10 Oct 2015 23:28:11 +0000 (20:28 -0300)]
x86/vf_w3fdif: move pxor outside the loop in w3fdif_complex_low

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/sipr: use AVERROR return code instead of -1
Paul B Mahol [Sat, 10 Oct 2015 15:31:12 +0000 (17:31 +0200)]
avcodec/sipr: use AVERROR return code instead of -1

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat/rsd: support XADP tag
Paul B Mahol [Sun, 11 Oct 2015 16:33:57 +0000 (18:33 +0200)]
avformat/rsd: support XADP tag

It appears that Xbox ADPCM is same as WAV adpcm.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavcodec/pngdec: Use av_malloc_array()
Michael Niedermayer [Sun, 11 Oct 2015 14:39:41 +0000 (16:39 +0200)]
avcodec/pngdec: Use av_malloc_array()

Suggested-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/jpeg2000dec: Check that step_x/y are valid before use in JPEG2000_PGOD_PCRL
Michael Niedermayer [Sun, 11 Oct 2015 12:52:39 +0000 (14:52 +0200)]
avcodec/jpeg2000dec: Check that step_x/y are valid before use in JPEG2000_PGOD_PCRL

Fixes: CID1322305 and CID1322304

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter: add selectivecolor filter
Clément Bœsch [Sun, 7 Jun 2015 18:21:28 +0000 (20:21 +0200)]
avfilter: add selectivecolor filter

4 years agoavcodec/pngdec: Alloc buffer after blend_op check in handle_p_frame_apng()
Michael Niedermayer [Sun, 11 Oct 2015 11:09:56 +0000 (13:09 +0200)]
avcodec/pngdec: Alloc buffer after blend_op check in handle_p_frame_apng()

Avoids memleak on error
Fixes CID1322342

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoRevert "Merge commit '8b830ee9a26d47b138f12a82085cdb372f407f1e'" (avconv: Do not...
Michael Niedermayer [Sun, 11 Oct 2015 10:10:42 +0000 (12:10 +0200)]
Revert "Merge commit '8b830ee9a26d47b138f12a82085cdb372f407f1e'" (avconv: Do 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>
4 years agoavutil/intmath: Change debruijn_ctz64 to use 8bit elements
Michael Niedermayer [Sun, 11 Oct 2015 02:21:01 +0000 (04:21 +0200)]
avutil/intmath: Change debruijn_ctz64 to use 8bit elements

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>
4 years agoavutil/mathematics: speed up av_gcd by using Stein's binary GCD algorithm
Ganesh Ajjanagadde [Sun, 11 Oct 2015 01:58:47 +0000 (21:58 -0400)]
avutil/mathematics: speed up av_gcd by using Stein's binary GCD algorithm

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>
4 years agoavcodec/pngdec: Check blend_op.
Michael Niedermayer [Sun, 11 Oct 2015 01:46:44 +0000 (03:46 +0200)]
avcodec/pngdec: Check blend_op.

Fixes CID1322359, CID1322358

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodoc/resampler, swresample/options: use proper capitalization
Ganesh Ajjanagadde [Sat, 10 Oct 2015 16:48:08 +0000 (12:48 -0400)]
doc/resampler, swresample/options: use proper capitalization

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>
4 years agogitignore: ignore object file temporaries
Ganesh Ajjanagadde [Sat, 10 Oct 2015 16:36:27 +0000 (12:36 -0400)]
gitignore: ignore object file temporaries

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>
4 years agodoc/scaler, swscale/options: use proper capitalization
Ganesh Ajjanagadde [Sat, 10 Oct 2015 16:54:33 +0000 (12:54 -0400)]
doc/scaler, swscale/options: use proper capitalization

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>
4 years agofate/async: test error code from underlying protocol
Zhang Rui [Sat, 10 Oct 2015 09:51:09 +0000 (17:51 +0800)]
fate/async: test error code from underlying protocol

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/async: pass internal I/O error
Zhang Rui [Sat, 10 Oct 2015 09:51:08 +0000 (17:51 +0800)]
avformat/async: pass internal I/O error

av_fifo_generic_write() does not return any error code.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/x86/vf_w3fdif: add colons after labels
Paul B Mahol [Sat, 10 Oct 2015 15:53:22 +0000 (17:53 +0200)]
avfilter/x86/vf_w3fdif: add colons after labels

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agolavc: move bitstream filter args to the bsf ctx
Rodger Combs [Thu, 8 Oct 2015 02:09:26 +0000 (21:09 -0500)]
lavc: move bitstream filter args to the bsf ctx

4 years agoavfilter/vf_w3fdif: add x86 SIMD
Paul B Mahol [Wed, 7 Oct 2015 19:03:16 +0000 (21:03 +0200)]
avfilter/vf_w3fdif: add x86 SIMD

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agodoc/developer: minor typo and consistency fixes
Ganesh Ajjanagadde [Thu, 8 Oct 2015 13:01:38 +0000 (09:01 -0400)]
doc/developer: minor typo and consistency fixes

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agodoc/build_system: miscellaneous typo and consistency fixes
Ganesh Ajjanagadde [Thu, 8 Oct 2015 13:01:04 +0000 (09:01 -0400)]
doc/build_system: miscellaneous typo and consistency fixes

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavcodec/ac3enc: fix undefined negative left shift
Ganesh Ajjanagadde [Fri, 9 Oct 2015 19:59:04 +0000 (15:59 -0400)]
avcodec/ac3enc: fix undefined negative left shift

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>
4 years agoMerge commit 'c3e5c47bdae2bb8219fea62d91b7455650b22c60'
Hendrik Leppkes [Sat, 10 Oct 2015 07:58:42 +0000 (09:58 +0200)]
Merge commit 'c3e5c47bdae2bb8219fea62d91b7455650b22c60'

* commit 'c3e5c47bdae2bb8219fea62d91b7455650b22c60':
  libopenh264enc: Added max_nal_size option

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '00cc10aee380f882507bac994ac469d8358d12e8'
Hendrik Leppkes [Sat, 10 Oct 2015 07:56:29 +0000 (09:56 +0200)]
Merge commit '00cc10aee380f882507bac994ac469d8358d12e8'

* commit '00cc10aee380f882507bac994ac469d8358d12e8':
  asfdec: do not skip padding if offset is above packet size - padding

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'a8956eca1ff3b5b7f9aadbe6eb46536efeb2f828'
Hendrik Leppkes [Sat, 10 Oct 2015 07:56:14 +0000 (09:56 +0200)]
Merge commit 'a8956eca1ff3b5b7f9aadbe6eb46536efeb2f828'

* commit 'a8956eca1ff3b5b7f9aadbe6eb46536efeb2f828':
  cabac: Make CABAC states hardcoded

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agocabac: Make cabac starts hardcoded
Anton Khirnov [Wed, 7 Oct 2015 15:39:46 +0000 (11:39 -0400)]
cabac: Make cabac starts hardcoded

There's not much reason to generate such a small table at runtime.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoRevert "cabac: Allow hardcoding CABAC table."
Derek Buitenhuis [Wed, 7 Oct 2015 15:39:45 +0000 (11:39 -0400)]
Revert "cabac: Allow hardcoding CABAC table."

This becomes unuseful in the following commit.

This reverts commit 092d1977cc7146f20c8db2155e7d648afb300de7.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '2830bce47e2eb29c76202f19017031ddc1f95dd3'
Hendrik Leppkes [Sat, 10 Oct 2015 07:45:44 +0000 (09:45 +0200)]
Merge commit '2830bce47e2eb29c76202f19017031ddc1f95dd3'

* commit '2830bce47e2eb29c76202f19017031ddc1f95dd3':
  w32pthreads: Load dynamically loaded functions on demand

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'b22693b06d1e5d73454a65c203b4d31c1ca5b69a'
Hendrik Leppkes [Sat, 10 Oct 2015 07:45:16 +0000 (09:45 +0200)]
Merge commit 'b22693b06d1e5d73454a65c203b4d31c1ca5b69a'

* commit 'b22693b06d1e5d73454a65c203b4d31c1ca5b69a':
  w32pthreads: Add pthread_once emulation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '8b830ee9a26d47b138f12a82085cdb372f407f1e'
Hendrik Leppkes [Sat, 10 Oct 2015 07:43:47 +0000 (09:43 +0200)]
Merge commit '8b830ee9a26d47b138f12a82085cdb372f407f1e'

* commit '8b830ee9a26d47b138f12a82085cdb372f407f1e':
  avconv: Do not try to configure filter outputs without streams

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'd7a5a178c252b625537adc046392624ad543dea7'
Hendrik Leppkes [Sat, 10 Oct 2015 07:37:51 +0000 (09:37 +0200)]
Merge commit 'd7a5a178c252b625537adc046392624ad543dea7'

* commit 'd7a5a178c252b625537adc046392624ad543dea7':
  configure: When disabling a library disable all the related components

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '58b42345b38b46d11c32e11d9c57517f99d6a601'
Hendrik Leppkes [Sat, 10 Oct 2015 07:32:59 +0000 (09:32 +0200)]
Merge commit '58b42345b38b46d11c32e11d9c57517f99d6a601'

* commit '58b42345b38b46d11c32e11d9c57517f99d6a601':
  dcadec: reorganise context data

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '3a4d369ea4ded91b1178ae6e2ff0ab9ea470e344'
Hendrik Leppkes [Sat, 10 Oct 2015 07:13:32 +0000 (09:13 +0200)]
Merge commit '3a4d369ea4ded91b1178ae6e2ff0ab9ea470e344'

* commit '3a4d369ea4ded91b1178ae6e2ff0ab9ea470e344':
  g2m: Relax resolution change constraints

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agox86/takdsp: use arithmetic shift instructions
James Almer [Sat, 10 Oct 2015 02:17:31 +0000 (23:17 -0300)]
x86/takdsp: use arithmetic shift instructions

p1 and p2 are int32_t.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agolavf/mov: add support for sidx fragment indexes
Rodger Combs [Mon, 20 Jul 2015 20:00:35 +0000 (15:00 -0500)]
lavf/mov: add support for sidx fragment indexes

Fixes trac #3842

4 years agoh264_mp4toannexb: fix the pps offset when there are more than one sps in avcc
赵宇龙 [Fri, 9 Oct 2015 05:59:56 +0000 (13:59 +0800)]
h264_mp4toannexb: fix the pps offset when there are more than one sps in avcc

the pps offset is used to locate pps in the spspps_buf; however, the
current calc method is wrong because it is the offset of the original
avctx->extradata;
when there is only one sps in the avcc; the value is correct by
coincidence, however, it will fail in avcc with multi sps

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/h264_mp4toannexb_bsf: Use av_freep() to free spspps_buf
Michael Niedermayer [Fri, 9 Oct 2015 22:07:30 +0000 (00:07 +0200)]
avcodec/h264_mp4toannexb_bsf: Use av_freep() to free spspps_buf

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/xvmc: apply attribute_deprecated correctly
Ganesh Ajjanagadde [Fri, 9 Oct 2015 22:44:49 +0000 (18:44 -0400)]
avcodec/xvmc: apply attribute_deprecated correctly

This fixes a warning observed on Clang 3.7:
"warning: attribute 'deprecated' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes]"
and thus enables deprecation warning for the relevant struct.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
4 years agoavcodec/mpegvideoenc: fix undefined negative left shift
Ganesh Ajjanagadde [Fri, 9 Oct 2015 18:43:04 +0000 (14:43 -0400)]
avcodec/mpegvideoenc: fix undefined negative left shift

This should fix the first undefined behavior reported in:
https://trac.ffmpeg.org/ticket/4727.

I can't reproduce the runtime behavior reported in the ticket, hence I
can't confirm that this actually fixes the exact issue reported in the
ticket.

Regardless, I can confirm that this is a genuine issue, and that
negative shifts can (and do) occur, fixed by this.

Tested with FATE.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofate: add DNxHD/HR tests
Christophe Gisquet [Mon, 5 Oct 2015 15:37:38 +0000 (17:37 +0200)]
fate: add DNxHD/HR tests

Currently only 2 profiles are evaluated because they are the only 2
with distributed test sequences.
- CID 1260: YUV 4:2:2 10 bits with block-adaptive interlace coding,
  from ticket 4876;
- CID 1270: YUV 4:4:4 10 bits (HR), 1920x839, from ticket 4581.

They were generated from the ticket sequences by running the
following kind of command-line;
ffmpeg -i $INPUT -an -sn -vcodec copy -vframes 1 -y $OUTPUT.mov

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodoc: fix spelling errors
Andreas Cadhalpun [Tue, 29 Sep 2015 18:08:26 +0000 (20:08 +0200)]
doc: fix spelling errors

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavcodec/takdec: add x86 SIMD for rest of decorrelation modes
Paul B Mahol [Mon, 5 Oct 2015 10:28:41 +0000 (12:28 +0200)]
avcodec/takdec: add x86 SIMD for rest of decorrelation modes

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoffmpeg: avoid possible undefined behavior
Ganesh Ajjanagadde [Fri, 9 Oct 2015 14:39:27 +0000 (10:39 -0400)]
ffmpeg: avoid possible undefined behavior

On lines 1633,1634 FFABS(pts) is performed. However, if av_stream_get_end_pts
returns AV_NOPTS_VALUE always, pts remains stuck at INT64_MIN, leading
to undefined behavior on FFABS.

One could conceive of a solution using FFNABS. However, such a solution
has to deal with the implementation defined rounding of integer division
with at least one negative operand in ANSI C89. C99 forces truncation to
zero, but I am not sure that all of our platforms compile with full C99
support, and in particular whether we can safely assume a fixed
rounding behavior across all platforms.

This solution is simple, and I doubt changing INT64_MIN to INT64_MIN + 1
has any practical loss - if it is stuck at its initial value, the stream
is messed up anyway.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavc/mjpegenc: Add an option to force outputting chroma matrix.
Carl Eugen Hoyos [Fri, 9 Oct 2015 18:58:07 +0000 (20:58 +0200)]
lavc/mjpegenc: Add an option to force outputting chroma matrix.

RFC 2435 suggests that mjpeg over rtp uses both two tables.

4 years agolibopenh264enc: Added max_nal_size option
Mario Gasparoni [Thu, 8 Oct 2015 17:28:55 +0000 (14:28 -0300)]
libopenh264enc: Added max_nal_size option

Also added dynamic slice_mode option, needed for the max_nal_size.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoavcodec/pthread_frame: update doxygen for update_context_from_thread
Ganesh Ajjanagadde [Fri, 9 Oct 2015 13:27:47 +0000 (09:27 -0400)]
avcodec/pthread_frame: update doxygen for update_context_from_thread

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
4 years agobuild system: fix dependency generation
Christophe Gisquet [Thu, 8 Oct 2015 10:30:51 +0000 (12:30 +0200)]
build system: fix dependency generation

When trying to build the binary dct-test under MSYS2/Win64, the
makefile rule does not have the SUBDIR in the target for its
object file.

Consequently, modifications to various include files (e.g. C ones)
do not trigger a recompilation.

When tracing the dependency generating, the dependency generation
has this strange content (linebreak inserted):
sed -e "/^#.*/d" -e "s,^[[:space:]]*dct\\.o,libavcodec/dct.o," \
 > libavcodec/dct-test.d

For some reason, the $(*F) has weird content. It looks simpler to
use $(@F) instead of $(*F)\\.o, although this was tested on one
single version of make.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_blend: fix normal mode with opacity != 1
Paul B Mahol [Fri, 9 Oct 2015 10:12:03 +0000 (12:12 +0200)]
avfilter/vf_blend: fix normal mode with opacity != 1

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agolavf/hls: don't convert NULL options to empty strings; fixes HTTP CRLF warnings
Rodger Combs [Mon, 21 Sep 2015 02:50:22 +0000 (21:50 -0500)]
lavf/hls: don't convert NULL options to empty strings; fixes HTTP CRLF warnings

4 years agolavu/opt: add flag to return NULL when applicable in av_opt_get
Rodger Combs [Mon, 21 Sep 2015 09:16:58 +0000 (04:16 -0500)]
lavu/opt: add flag to return NULL when applicable in av_opt_get

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavu/opt: switch AV_OPT flags to shift-based formatting
Rodger Combs [Mon, 21 Sep 2015 09:15:56 +0000 (04:15 -0500)]
lavu/opt: switch AV_OPT flags to shift-based formatting

4 years agobuild: restore videotoolbox compilation on iOS
Clément Bœsch [Thu, 1 Oct 2015 15:58:40 +0000 (17:58 +0200)]
build: restore videotoolbox compilation on iOS

4 years agoavformat/srtdec: make sure we probe a number
Clément Bœsch [Fri, 9 Oct 2015 08:52:58 +0000 (10:52 +0200)]
avformat/srtdec: make sure we probe a number

Fixes regression since 7218352e0228028dfa009a3799ec93fd041065f1: WebVTT
files were matching the SRT probing.

4 years agolavf/matroskadec: drop indexes that appear broken
Rodger Combs [Thu, 8 Oct 2015 20:34:59 +0000 (15:34 -0500)]
lavf/matroskadec: drop indexes that appear broken

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/ass: fix doxygen typo
wm4 [Thu, 8 Oct 2015 21:28:36 +0000 (23:28 +0200)]
avcodec/ass: fix doxygen typo

4 years agodoc/faq: use https instead of http
Ganesh Ajjanagadde [Thu, 8 Oct 2015 01:40:53 +0000 (21:40 -0400)]
doc/faq: use https instead of http

Change to https for FFmpeg websites.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/af_afade: fix start of fade out
Justin Greer [Thu, 8 Oct 2015 20:26:20 +0000 (15:26 -0500)]
avfilter/af_afade: fix start of fade out

Fixes #4919

4 years agoasfdec: do not skip padding if offset is above packet size - padding
Alexandra Hájková [Tue, 28 Jul 2015 08:17:16 +0000 (10:17 +0200)]
asfdec: do not skip padding if offset is above packet size - padding

Sample-Id: https://samples.libav.org/asf-wmv/demux-asf-assert-failed.wmv

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agocabac: Make CABAC states hardcoded
Anton Khirnov [Wed, 7 Oct 2015 16:33:00 +0000 (12:33 -0400)]
cabac: Make CABAC states hardcoded

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>
4 years agoconfigure: add message to avoid manual modification of config.texi
Ganesh Ajjanagadde [Thu, 8 Oct 2015 13:01:20 +0000 (09:01 -0400)]
configure: add message to avoid manual modification of config.texi

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agodoc/writing_filters: miscellaneous grammar and typo fixes
Ganesh Ajjanagadde [Thu, 8 Oct 2015 13:00:44 +0000 (09:00 -0400)]
doc/writing_filters: miscellaneous grammar and typo fixes

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agotests: update fate-filter-delogo test reference after commit 8bc708fcee137ead6d0773fa...
Stefano Sabatini [Thu, 8 Oct 2015 10:44:48 +0000 (12:44 +0200)]
tests: update fate-filter-delogo test reference after commit 8bc708fcee137ead6d0773fad8e24ab471ab2122

4 years agoavfilter/delogo: Set default band to 1
Jean Delvare [Wed, 7 Oct 2015 13:03:32 +0000 (15:03 +0200)]
avfilter/delogo: Set default band to 1

The original interpolation algorithm behaved poorly on the borders and
did not even guarantee continuity at the borders. For this reason, a
second interpolation/blending pass was required on the borders to make
them seamless.

However, since the interpolation algorithm was improved in June 2013,
the border issues no longer exist. The new algorithm does guarantee
continuity at the borders, making the second pass useless. A larger
band always increases the cumulated interpolation error. In most cases
it also increases the average interpolation error, even though the
samples in the band are only partially interpolated.

For this reason I would like to get rid of the "band" parameter. As a
first step, let's change its default value from 4 to 1 and document it
as deprecated.

I have benchmarked this change on a combination of input sources and
realistic logo areas. Lowering the band value from 4 to 1 resulted in
8 to 39 % less interpolation error per frame (or 1 to 34 % less
interpolation error per luma sample.)

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
4 years agodnxhdenc: mark CID 1260 encoder experimental
Christophe Gisquet [Mon, 5 Oct 2015 18:44:46 +0000 (20:44 +0200)]
dnxhdenc: mark CID 1260 encoder experimental

The MBAFF handling recently introduced on the decoder side shows that
the encoder does not support it correctly. Therefore, make the related
profile experimental.

Furthermore, current encoder logic treats it as unable to encode as
progressive, which isn't the case.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodnxhddata: introduce and use MBAFF flag
Christophe Gisquet [Mon, 5 Oct 2015 18:44:45 +0000 (20:44 +0200)]
dnxhddata: introduce and use MBAFF flag

MBAFF-like handling of interlaced content in CID 1260 is different from
the other CIDs, and in particular doesn't use the same syntax.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_w3fdif: scale down coefficiends by 2
Paul B Mahol [Wed, 7 Oct 2015 21:27:14 +0000 (23:27 +0200)]
avfilter/vf_w3fdif: scale down coefficiends by 2

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agodnxhddec: better support for 4:4:4
Christophe Gisquet [Sun, 4 Oct 2015 08:06:28 +0000 (10:06 +0200)]
dnxhddec: better support for 4:4:4

Profiles 1256 & 1270 (currently) signal at the frame header and MB
levels the colorspace used, either RGB or YUV. While a MB-level
varying colorspace is not supported, whether it is constant can be
tracked so as to determine the exact colorspace.

This requires having bitdepth and the ACT and 4:4:4 flags, in turn
needing the CID. Because setting those before having validated
enough things may result in invalid/unset DSP fucntions, setting
the bitdepth in the context is delayed.

It is not tested against a true RGB sequence, though.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/x86/vf_blend.asm: hardmix: do same with two pxor instructions less
Paul B Mahol [Wed, 7 Oct 2015 21:12:09 +0000 (23:12 +0200)]
avfilter/x86/vf_blend.asm: hardmix: do same with two pxor instructions less

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavfilter/x86/vf_blend.asm: 11th register is used, update functions
Paul B Mahol [Wed, 7 Oct 2015 20:53:54 +0000 (22:53 +0200)]
avfilter/x86/vf_blend.asm: 11th register is used, update functions

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavfilter/x86/vf_blend.asm: add hardmix and phoenix sse2 SIMD
Paul B Mahol [Wed, 7 Oct 2015 08:12:26 +0000 (10:12 +0200)]
avfilter/x86/vf_blend.asm: add hardmix and phoenix sse2 SIMD

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agolavfi/vf_yadif: reindent after last commit.
Nicolas George [Fri, 2 Oct 2015 13:58:53 +0000 (15:58 +0200)]
lavfi/vf_yadif: reindent after last commit.

4 years agolavfi/vf_thumbnail: reindent after last commit.
Nicolas George [Fri, 2 Oct 2015 14:20:17 +0000 (16:20 +0200)]
lavfi/vf_thumbnail: reindent after last commit.

4 years agolavfi/vf_w3fdif: reindent after last commit.
Nicolas George [Fri, 2 Oct 2015 14:17:56 +0000 (16:17 +0200)]
lavfi/vf_w3fdif: reindent after last commit.

4 years agolavfi/vf_alphamerge: reindent after last commit.
Nicolas George [Fri, 2 Oct 2015 14:12:51 +0000 (16:12 +0200)]
lavfi/vf_alphamerge: reindent after last commit.

4 years agolavfi/avf_showspectrum: reindent after last commit.
Nicolas George [Fri, 2 Oct 2015 14:03:16 +0000 (16:03 +0200)]
lavfi/avf_showspectrum: reindent after last commit.

4 years agolavfi/vf_yadif: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 13:54:41 +0000 (15:54 +0200)]
lavfi/vf_yadif: remove looping on request_frame().

4 years agolavfi/vf_w3fdif: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 14:17:41 +0000 (16:17 +0200)]
lavfi/vf_w3fdif: remove looping on request_frame().

4 years agolavfi/vf_thumbnail: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 14:19:55 +0000 (16:19 +0200)]
lavfi/vf_thumbnail: remove looping on request_frame().

4 years agolavfi/vf_select: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 14:29:08 +0000 (16:29 +0200)]
lavfi/vf_select: remove looping on request_frame().

4 years agolavfi/vf_fps: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 14:16:10 +0000 (16:16 +0200)]
lavfi/vf_fps: remove looping on request_frame().

4 years agolavfi/vf_alphamerge: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 14:12:38 +0000 (16:12 +0200)]
lavfi/vf_alphamerge: remove looping on request_frame().

4 years agolavfi/avf_showwaves: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 14:04:47 +0000 (16:04 +0200)]
lavfi/avf_showwaves: remove looping on request_frame().

4 years agolavfi/avf_showspectrum: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 14:03:02 +0000 (16:03 +0200)]
lavfi/avf_showspectrum: remove looping on request_frame().

4 years agolavfi/avf_showcqt: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 14:00:53 +0000 (16:00 +0200)]
lavfi/avf_showcqt: remove looping on request_frame().

4 years agolavfi/af_aresample: remove looping on request_frame().
Nicolas George [Fri, 2 Oct 2015 13:54:55 +0000 (15:54 +0200)]
lavfi/af_aresample: remove looping on request_frame().

4 years agow32pthreads: Load dynamically loaded functions on demand
Hendrik Leppkes [Wed, 7 Oct 2015 13:15:14 +0000 (15:15 +0200)]
w32pthreads: Load dynamically loaded functions on demand

This removes the requirement of calling w32thread_init before being
able to use the threading primitives.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agow32pthreads: Add pthread_once emulation
Hendrik Leppkes [Wed, 7 Oct 2015 13:10:59 +0000 (15:10 +0200)]
w32pthreads: Add pthread_once emulation

The emulation uses native InitOnce* APIs on Windows Vista+, and a
lock-free/allocation-free approach using atomics and spinning for
Windows XP.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoavconv: Do not try to configure filter outputs without streams
Luca Barbato [Mon, 5 Oct 2015 18:49:55 +0000 (20:49 +0200)]
avconv: Do not try to configure filter outputs without streams

Prevent a NULL-dereference.

CC: libav-stable@libav.org
4 years agoconfigure: When disabling a library disable all the related components
Luca Barbato [Mon, 5 Oct 2015 01:41:41 +0000 (03:41 +0200)]
configure: When disabling a library disable all the related components

This way is sufficient to use the component specific configure variable
and not guard against the global library configure variable in code
that is outside it (e.g. checkasm).