Commit Graph

76009 Commits

Author SHA1 Message Date
Zhang Rui
6c7f289fab avformat/async: cache some data for fast seek backward
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-14 20:40:09 +02:00
Zhang Rui
87ff61b9ab avutil/fifo: add function av_fifo_generic_peek_at()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-14 20:23:58 +02:00
Ganesh Ajjanagadde
55d3e97970 avutil/intmath: use de Bruijn based ff_ctz
It has already been demonstrated that the de Bruijn method has benefits
over the current implementation: commit 971d12b7f9.
That commit implemented it for long long, this extends it to the int version.

Tested with FATE.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2015-10-14 13:39:42 -04:00
Hendrik Leppkes
2d0a10e369 Remove test file that accidentally ended up in one commit 2015-10-14 17:06:07 +02:00
Carl Eugen Hoyos
1f2c474cb2 lavf/vc1dec: Autodetect raw vc-1 streams.
Move the demuxer into its own file.
2015-10-14 16:40:57 +02:00
Clément Bœsch
c793a271d5 doc/filters: fix selectivecolor example
Fixes Ticket #4927
2015-10-14 16:34:41 +02:00
Ganesh Ajjanagadde
bf0d2d6030 avfilter/formats: add av_warn_unused_result to function prototypes
This uses the av_warn_unused_result attribute liberally to catch some forms of improper
usage of functions defined in avfilter/formats.h.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-14 10:19:26 -04:00
Ganesh Ajjanagadde
6aaac24d72 avfilter/all: propagate errors of functions from avfilter/formats
Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM).
This propagates the return values.

All of these were found by using av_warn_unused_result, demonstrating its utility.

Tested with FATE. I am least sure of the changes to avfilter/filtergraph,
since I don't know what/how reduce_format is intended to behave and how it should
react to errors.

Fixes: CID 1325680, 1325679, 1325678.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Previous version Reviewed-by: Nicolas George <george@nsup.org>
Previous version Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-14 10:04:01 -04:00
Hendrik Leppkes
8ededd5836 Merge commit '6a23a34274b747280c1e4a00ad22f97f99bbb48a'
* commit '6a23a34274b747280c1e4a00ad22f97f99bbb48a':
  mimic: drop AVPicture usage

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 15:01:54 +02:00
Hendrik Leppkes
3d93ff289e Merge commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3'
* commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3':
  libschroedinger: Properly use AVFrame API

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 15:00:53 +02:00
Hendrik Leppkes
9c3f75c29d Merge commit '901f9c0a32985f48672fd68594111dc55d88a57a'
* commit '901f9c0a32985f48672fd68594111dc55d88a57a':
  qtrle: Properly use AVFrame API

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 14:56:16 +02:00
Hendrik Leppkes
6281749909 Merge commit '17e41cf3614973258c24aa2452215ef7e3bfa5ed'
* commit '17e41cf3614973258c24aa2452215ef7e3bfa5ed':
  avcodec: Do not lock during init if there is no init function

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 14:54:04 +02:00
Hendrik Leppkes
a34dfc93ef ffmpeg: add deprecation guards around remaining AVFMT_RAWPICTURE usage 2015-10-14 14:52:43 +02:00
Hendrik Leppkes
435dfc15df ffmpeg: remove trailing whitespace that sneaked into the previous merge 2015-10-14 14:52:42 +02:00
Hendrik Leppkes
1899b25799 Merge commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e'
* commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e':
  avformat: Do not use AVFMT_RAWPICTURE

Removal from ffmpeg.c not merged because some parts of avdevice
still use it

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 14:43:20 +02:00
Hendrik Leppkes
9ccd90626f Merge commit '16b0c929621f84983b83b9735ce973acb12723bc'
* commit '16b0c929621f84983b83b9735ce973acb12723bc':
  avconv: Add loop option.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 14:28:20 +02:00
Hendrik Leppkes
b994788353 Merge commit '11c5f438ff83da5040e85bfa6299f56b321d32ef'
* commit '11c5f438ff83da5040e85bfa6299f56b321d32ef':
  dict: Change return type of av_dict_copy()

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 14:01:11 +02:00
Hendrik Leppkes
fcfb66ba9b Merge commit 'c1aac39eaccd32dc3b74ccfcce701d3d888fbc6b'
* commit 'c1aac39eaccd32dc3b74ccfcce701d3d888fbc6b':
  build: add Solaris symbol versioning

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 13:54:50 +02:00
Hendrik Leppkes
64ceeac26a Merge commit 'b9ece15a01782b4f301c0c139d1d7b20f848914c'
* commit 'b9ece15a01782b4f301c0c139d1d7b20f848914c':
  nullenc: Use the wrapped avframe pseudo-encoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 13:48:22 +02:00
Hendrik Leppkes
1dd5f3340e Merge commit 'd00a8fd417ad20cecbc7ca17b25f352655148fb1'
* commit 'd00a8fd417ad20cecbc7ca17b25f352655148fb1':
  yuv4mpeg: Use the wrapped avframe pseudo-encoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 13:44:33 +02:00
Hendrik Leppkes
037b44a3b4 Merge commit '00332e0a064dad866812de9162b009cbaba6f5df'
* commit '00332e0a064dad866812de9162b009cbaba6f5df':
  wrapped_avframe: Initial implementation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 13:26:17 +02:00
wm4
6a23a34274 mimic: drop AVPicture usage
Work on the AVFrame references directly.

Instead of setting up a flipped/swapped "view" on the pictures,
flip/swap them when returning decoded frames to the API user.
2015-10-14 11:25:53 +02:00
Vittorio Giovara
6fdd4c678a libschroedinger: Properly use AVFrame API
Rather than copying data buffers around, allocate a proper frame, and
use the standard AVFrame functions. This effectively makes the decoder
capable of direct rendering.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-14 11:24:55 +02:00
Vittorio Giovara
901f9c0a32 qtrle: Properly use AVFrame API
Rather than copying data buffers around, just add a reference to
the current frame.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-14 11:24:24 +02:00
Ganesh Ajjanagadde
d59bfcd112 avformat/mov: fix integer overflow
Partially fixes Ticket 4727.

-duration is not a safe expression, since duration can be INT_MIN.
One might ask how it can become INT_MIN.
Although it is true that line 2574 is no longer reached with INT_MIN due
to commit 053e80f6ea (which fixed another
integer overflow issue), mov_update_dts_shift is called on line 3549 as
well, right after a read of untrusted data.
One can do the fix locally there, but that function is already a huge
mess. Changing mov_update_dts_shift is likely better.

This changes duration to INT_MIN + 1 in such cases. This should not make any
practical difference since such streams are anyway fuzzer files.

Tested with FATE.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-13 19:41:07 -04:00
Ganesh Ajjanagadde
4c8ca76965 ffserver_config: check for INT_MIN before doing FFABS
FFABS(INT_MIN) is not safe. Alternative of using FFNABS is not as
readable.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-13 19:40:09 -04:00
James Almer
74a87ae210 x86/vp9itxfm: fix register clobbering in ff_vp9_idct_idct_4x4_add_12_sse2
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-13 20:21:33 -03:00
Christophe Gisquet
234369d0fd dnxhdenc: fix access outside of image
This is the same test as for the 8bit case.
2015-10-13 18:53:10 -03:00
Christophe Gisquet
74c414202f x86: simple_idct10_template: use const
This avoid going through constants.c while still sharing them
with proresdsp.asm

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-13 22:52:33 +02:00
Michael Niedermayer
147b12162d avutil/fifo: Fix thread saftey of av_fifo_generic_peek()
changing the context state and restoring it is not safe if another
thread writes data into the fifo

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-13 19:08:42 +02:00
Pedro Arthur
5bd62a1b3c swscale: fix ticket #4881
When scaling only a slice of a frame the output was written always
in the first lines leaving the rest of the frame black.
2015-10-13 13:43:39 -03:00
Nedeljko Babic
de262d018d avcodec/mips/aaccoder_mips: Sync with the generic code
This patch fixes build of AAC encoder optimized for mips that was broken due
 to some changes in generic code that were not propagated to the optimized code.

Also, some functions in the optimized code are basically duplicate of functions
 from generic code. Since they do not bring enough improvement to the optimized
 code to justify their existence, they are removed (which improves
 maintainability of the optimized code).

Optimizations disabled in 97437bd are enabled again.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-13 17:22:56 +02:00
Ronald S. Bultje
e578638382 vp9: use registers for constant loading where possible. 2015-10-13 11:06:01 -04:00
Ronald S. Bultje
408bb8556f vp9: refactor itx coefficients and share between 8 and 10/12bpp. 2015-10-13 11:06:01 -04:00
Ronald S. Bultje
eb4b5ff738 vp9: add itxfm_add eob shortcuts to 10/12bpp functions.
These aren't quite as helpful as the ones in 8bpp, since over there,
we can use pmulhrsw, but here the coefficients have too many bits to
be able to take advantage of pmulhrsw. However, we can still skip
cols for which all coefs are 0, and instead just zero the input data
for the row itx. This helps a few % on overall decoding speed.
2015-10-13 11:06:01 -04:00
Ronald S. Bultje
488fadebbc vp9: add 10/12bpp idct_idct_32x32 sse2 SIMD version. 2015-10-13 11:06:00 -04:00
Ronald S. Bultje
3d0ca2fe89 vp9: 10/12bpp sse2 SIMD for iadst16. 2015-10-13 11:06:00 -04:00
Ronald S. Bultje
0e80265b0a vp9: refactor 10/12bpp dc-only code in 4x4/8x8 and add to 16x16. 2015-10-13 11:06:00 -04:00
Ronald S. Bultje
1338fb79d4 vp9: add 10/12bpp sse2 SIMD version for idct_idct_16x16. 2015-10-13 11:06:00 -04:00
Ronald S. Bultje
cb054d061a vp9: add 10/12bpp sse2 SIMD versions of iadst8x8. 2015-10-13 11:05:59 -04:00
Ronald S. Bultje
e0610787b2 vp9: add 10/12bpp sse2 SIMD for idct_idct_8x8. 2015-10-13 11:05:59 -04:00
Ronald S. Bultje
a35f6bdb38 vp9: add 12bpp sse2 versions of iadst4. 2015-10-13 11:05:59 -04:00
Ronald S. Bultje
235e76aeb8 vp9: initial attempt at a idct_idct_4x4 12bpp x86 simd (sse2) impl.
The trouble with this function is that intermediates overflow 31+sign
bits, so I've added some helpers (that will also be used in 10/12bpp
8x8, 16x16 and 32x32) to make that easier, basically emulating a half-
assed pmaddqd using 2xpmaddwd. It's currently sse2-only, if anyone sees
potential in adding ssse3, I'd love to hear it.
2015-10-13 11:05:58 -04:00
Ronald S. Bultje
f76423d097 vp9: add x86 simd (sse2/ssse3) for iadst4 10bpp functions. 2015-10-13 11:05:58 -04:00
Ronald S. Bultje
6b579cf547 vp9: add 10bpp simd (mmxext/ssse3) for idct_idct_4x4. 2015-10-13 11:05:58 -04:00
Ronald S. Bultje
1c3be32533 vp9: add 10/12bpp mmxext-optimized iwht_iwht_4x4 function. 2015-10-13 11:05:57 -04:00
Christophe Gisquet
b6594a9605 x86: dct-test: add more idcts
In particular for 10 and 12 bits.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-13 16:03:04 +02:00
Michael Niedermayer
a745d1a9e4 avcodec/dct-test: Print failure notice below the failed *dct
This makes it easier to see where a failure happens

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-13 16:03:03 +02:00
Christophe Gisquet
7ece8b50b1 x86: simple_idct: 12bits versions
On 12 frames of a 444p 12 bits DNxHR sequence, _put function:
C:         78902 decicycles in idct,  262071 runs,     73 skips
avx:       32478 decicycles in idct,  262045 runs,     99 skips

Difference between the 2:
stddev:    0.39 PSNR:104.47 MAXDIFF:    2

This is unavoidable and due to the scale factors used in the x86
version, which cannot match the C ones.

In addition, the trick of adding an initial bias to the input of a
pass can overflow, as the input coefficients are already 15bits,
which is the maximum this function can handle.

Overall, however, the omse on 12 bits samples goes from 0.16916 to
0.16883. Reducing rowshift by 1 improves to 0.0908, but causes
overflows.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-13 15:34:32 +02:00
Derek Buitenhuis
17e41cf361 avcodec: Do not lock during init if there is no init function
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-13 13:43:29 +02:00