]> git.sesse.net Git - ffmpeg/log
ffmpeg
8 years agoswresample: slightly nicer debug output for auto matrix
wm4 [Thu, 15 Oct 2015 17:07:27 +0000 (19:07 +0200)]
swresample: slightly nicer debug output for auto matrix

This is the matrix that will be used for up/downmixing.

8 years agoavcodec/h264: remove redundant and bogus get_format call
wm4 [Sun, 11 Oct 2015 17:02:40 +0000 (19:02 +0200)]
avcodec/h264: remove redundant and bogus get_format call

The AVCodecContext.get_format callback is not only used for pixel format
negotiation with the API user, but also for hwaccel init. For the
latter, it's required that some codec parameters, in particular the
codec profile, are set when the callback is invoked.

This patch removes a get_format invocation where this is not guaranteed.
The codec parameters, including the profile, are really set further
below. (The same code path that sets the profile also calls get_format
properly too.)

This just happened to work by coincidence in most cases. For example, if
the API user just copied or reused the AVStream's AVCodecContext when
decoding, the profile would be set properly. But in some cases it
fails., such as with the sample WolfensteinTwitch.mp4 on the samples
server.

Remove the redundant get_format call. Apparently it serves no purpose
anymore, although it is possible that this was different at the time it
was added in commit ffd77f94a26be22b8ead3178ceec3ed39e68abc5.

This fixes hwaccel usage for API users which do not set the profile
when setting up the AVCodecContext (which is allowed).

8 years agoaac: Make codec init run under ff_thread_once
Derek Buitenhuis [Wed, 14 Oct 2015 18:25:51 +0000 (14:25 -0400)]
aac: Make codec init run under ff_thread_once

This makes AAC init threadsafe.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
8 years agowinrt: multithreading support
wang-bin [Tue, 29 Sep 2015 10:11:03 +0000 (18:11 +0800)]
winrt: multithreading support

_beginthreadex is for desktop only. CreateThread is available for windows store apps on windows (and phone) 8.1 and later. http://msdn.microsoft.com/en-us/library/ms682453%28VS.85%29.aspx

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
8 years agoavformat/hls: add support for EXT-X-MAP
Anssi Hannula [Thu, 15 Oct 2015 11:23:00 +0000 (14:23 +0300)]
avformat/hls: add support for EXT-X-MAP

Without EXT-X-MAP support we miss the first bytes of some streams.

These streams worked by luck before byte-ranged segment support was added in
da7759b3579de3e98deb1ac58e642b861280ba54

Fixes ticket #4797.

8 years agoavformat/hls: fix segment selection regression on track changes of live streams
Anssi Hannula [Thu, 15 Oct 2015 10:42:38 +0000 (13:42 +0300)]
avformat/hls: fix segment selection regression on track changes of live streams

Commit ad701326b43078b90 ("avformat/hls: open playlists immediately when
AVDISCARD_ALL is dropped") inadvertently caused first_packet to never be
cleared, causing select_cur_seq_no() to not use the specific code for
live streams.

In practice this means that when the user selects a different audio
track during live stream (i.e. non-VOD) playback, there may be some
additional delay as the code might select an incorrect segment at first,
and we have to wait for video to catch audio (if too late segment was
selected) or to download more following audio segments (if too early
segment was selected).

Fix that by restoring the zeroing of first_packet.

8 years agovp9: expose reference frames in VP9SharedContext
Hendrik Leppkes [Wed, 14 Oct 2015 08:03:20 +0000 (10:03 +0200)]
vp9: expose reference frames in VP9SharedContext

8 years agovp9: split header into separate struct and expose in vp9.h
Ronald S. Bultje [Wed, 14 Oct 2015 07:51:54 +0000 (09:51 +0200)]
vp9: split header into separate struct and expose in vp9.h

This allows hwaccels to access the bitstream header information.

8 years agobuild/videotoolbox: add missing CoreVideo framework
Clément Bœsch [Thu, 15 Oct 2015 08:43:42 +0000 (10:43 +0200)]
build/videotoolbox: add missing CoreVideo framework

8 years agoffmpeg/videotoolbox: protect UTGetOSTypeFromString on both VDA and VT
Clément Bœsch [Thu, 15 Oct 2015 08:21:52 +0000 (10:21 +0200)]
ffmpeg/videotoolbox: protect UTGetOSTypeFromString on both VDA and VT

8 years agoffmpeg/videotoolbox: try to fix compilation when cross compiling ffmpeg with VT for...
Clément Bœsch [Thu, 15 Oct 2015 08:12:19 +0000 (10:12 +0200)]
ffmpeg/videotoolbox: try to fix compilation when cross compiling ffmpeg with VT for iOS under certain configuration

Likely a regression from 8f6f357fde0ea88db180db07a6d749ef95f52c28

8 years agodoc/ffmpeg: use stream_loop instead of loop
Ganesh Ajjanagadde [Thu, 15 Oct 2015 01:51:15 +0000 (21:51 -0400)]
doc/ffmpeg: use stream_loop instead of loop

Commit dbb03b8e47f905f0f7b10c3eb5ac11f9bfc793ff renamed loop to
stream_loop. This documents the change.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavfilter/af_tremolo: clean up extra newlines
Kyle Swanson [Wed, 14 Oct 2015 14:56:48 +0000 (09:56 -0500)]
avfilter/af_tremolo: clean up extra newlines

Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agodnxhd: interleave AC levels and flags
Christophe Gisquet [Wed, 14 Oct 2015 17:20:49 +0000 (19:20 +0200)]
dnxhd: interleave AC levels and flags

This allows more efficient access to the array as the level and flags
are contiguous. Around 4% faster coefficient decoding.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavf: Remove duplicated latm demuxer.
Carl Eugen Hoyos [Wed, 14 Oct 2015 23:11:17 +0000 (01:11 +0200)]
lavf: Remove duplicated latm demuxer.

The demuxer used to demux loas files for which a dedicated demuxer exists.

8 years agodoc/examples/muxing: Fix mixed declaration and code
Michael Niedermayer [Wed, 14 Oct 2015 22:00:45 +0000 (00:00 +0200)]
doc/examples/muxing: Fix mixed declaration and code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoMerge commit 'd15368ee3926152a3a301c13cc638fbf7a062ddf'
Hendrik Leppkes [Wed, 14 Oct 2015 21:06:06 +0000 (23:06 +0200)]
Merge commit 'd15368ee3926152a3a301c13cc638fbf7a062ddf'

* commit 'd15368ee3926152a3a301c13cc638fbf7a062ddf':
  h264: Run VLC init under pthread_once

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'c53e796f8b69799b7ad6d28fbab981d37edf1bc9'
Hendrik Leppkes [Wed, 14 Oct 2015 21:02:35 +0000 (23:02 +0200)]
Merge commit 'c53e796f8b69799b7ad6d28fbab981d37edf1bc9'

* commit 'c53e796f8b69799b7ad6d28fbab981d37edf1bc9':
  thread: Provide no-op variants for pthread_once

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '08377f9c3bf6dbe216512a2e05c9fac837b13fc0'
Hendrik Leppkes [Wed, 14 Oct 2015 21:02:00 +0000 (23:02 +0200)]
Merge commit '08377f9c3bf6dbe216512a2e05c9fac837b13fc0'

* commit '08377f9c3bf6dbe216512a2e05c9fac837b13fc0':
  dxva: Include last the internal header

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'c1348506697377b46f844339c178332e3314149a'
Hendrik Leppkes [Wed, 14 Oct 2015 21:01:20 +0000 (23:01 +0200)]
Merge commit 'c1348506697377b46f844339c178332e3314149a'

* commit 'c1348506697377b46f844339c178332e3314149a':
  httpauth: Add space after commas in HTTP/RTSP auth header

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'e55376a1fd5abebbb0a082aa20739d58c2260a37'
Hendrik Leppkes [Wed, 14 Oct 2015 20:55:55 +0000 (22:55 +0200)]
Merge commit 'e55376a1fd5abebbb0a082aa20739d58c2260a37'

* commit 'e55376a1fd5abebbb0a082aa20739d58c2260a37':
  rtmpproto: Write correct flv packet sizes at the end of packets

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoffmpeg_opt: rename loop option to stream_loop
Michael Niedermayer [Wed, 14 Oct 2015 17:52:17 +0000 (19:52 +0200)]
ffmpeg_opt:  rename loop option to stream_loop

The "loop" option is used in several demuxers (like img2dec) and muxers, using the same name in ffmpeg_opt
breaks them. Feel free to revert this and replace by any other solution or rename both as preferred
This is just as a quick fix to avoid the regression with existing command lines and to have both named
the same (which does not work)

Example:
./ffmpeg -loop 1 -i fate-suite/png1/lena-rgb24.png -t 1 test.avi
will produce 25 frames with the img2dec loop but only 1 frame at 25fps with the ffmpeg loop option

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/async: cache some data for fast seek backward
Zhang Rui [Tue, 13 Oct 2015 10:30:47 +0000 (18:30 +0800)]
avformat/async: cache some data for fast seek backward

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/fifo: add function av_fifo_generic_peek_at()
Zhang Rui [Wed, 14 Oct 2015 06:20:07 +0000 (14:20 +0800)]
avutil/fifo: add function av_fifo_generic_peek_at()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/intmath: use de Bruijn based ff_ctz
Ganesh Ajjanagadde [Wed, 14 Oct 2015 14:26:59 +0000 (10:26 -0400)]
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 971d12b7f9d7be3ca8eb98e6c04ed521f83cbd3c.
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>
8 years agoRemove test file that accidentally ended up in one commit
Hendrik Leppkes [Wed, 14 Oct 2015 15:06:07 +0000 (17:06 +0200)]
Remove test file that accidentally ended up in one commit

8 years agolavf/vc1dec: Autodetect raw vc-1 streams.
Carl Eugen Hoyos [Wed, 14 Oct 2015 14:40:57 +0000 (16:40 +0200)]
lavf/vc1dec: Autodetect raw vc-1 streams.

Move the demuxer into its own file.

8 years agodoc/filters: fix selectivecolor example
Clément Bœsch [Wed, 14 Oct 2015 14:34:41 +0000 (16:34 +0200)]
doc/filters: fix selectivecolor example

Fixes Ticket #4927

8 years agoavfilter/formats: add av_warn_unused_result to function prototypes
Ganesh Ajjanagadde [Mon, 5 Oct 2015 13:20:33 +0000 (09:20 -0400)]
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>
8 years agoavfilter/all: propagate errors of functions from avfilter/formats
Ganesh Ajjanagadde [Mon, 5 Oct 2015 03:39:25 +0000 (23:39 -0400)]
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>
8 years agoMerge commit '6a23a34274b747280c1e4a00ad22f97f99bbb48a'
Hendrik Leppkes [Wed, 14 Oct 2015 13:01:54 +0000 (15:01 +0200)]
Merge commit '6a23a34274b747280c1e4a00ad22f97f99bbb48a'

* commit '6a23a34274b747280c1e4a00ad22f97f99bbb48a':
  mimic: drop AVPicture usage

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3'
Hendrik Leppkes [Wed, 14 Oct 2015 13:00:53 +0000 (15:00 +0200)]
Merge commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3'

* commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3':
  libschroedinger: Properly use AVFrame API

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '901f9c0a32985f48672fd68594111dc55d88a57a'
Hendrik Leppkes [Wed, 14 Oct 2015 12:56:16 +0000 (14:56 +0200)]
Merge commit '901f9c0a32985f48672fd68594111dc55d88a57a'

* commit '901f9c0a32985f48672fd68594111dc55d88a57a':
  qtrle: Properly use AVFrame API

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '17e41cf3614973258c24aa2452215ef7e3bfa5ed'
Hendrik Leppkes [Wed, 14 Oct 2015 12:54:04 +0000 (14:54 +0200)]
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>
8 years agoffmpeg: add deprecation guards around remaining AVFMT_RAWPICTURE usage
Hendrik Leppkes [Wed, 14 Oct 2015 12:46:40 +0000 (14:46 +0200)]
ffmpeg: add deprecation guards around remaining AVFMT_RAWPICTURE usage

8 years agoffmpeg: remove trailing whitespace that sneaked into the previous merge
Hendrik Leppkes [Wed, 14 Oct 2015 12:51:49 +0000 (14:51 +0200)]
ffmpeg: remove trailing whitespace that sneaked into the previous merge

8 years agoMerge commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e'
Hendrik Leppkes [Wed, 14 Oct 2015 12:43:20 +0000 (14:43 +0200)]
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>
8 years agoh264: Run VLC init under pthread_once
Derek Buitenhuis [Wed, 7 Oct 2015 16:33:01 +0000 (12:33 -0400)]
h264: Run VLC init under pthread_once

This makes the h.264 decoder threadsafe to initialize.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agothread: Provide no-op variants for pthread_once
Luca Barbato [Wed, 7 Oct 2015 20:43:38 +0000 (22:43 +0200)]
thread: Provide no-op variants for pthread_once

8 years agodxva: Include last the internal header
Luca Barbato [Tue, 13 Oct 2015 21:20:33 +0000 (23:20 +0200)]
dxva: Include last the internal header

It redefines _WIN32_WINNT, possibly causing problems with the
w32pthreads.h header.

8 years agohttpauth: Add space after commas in HTTP/RTSP auth header
Andrey Utkin [Tue, 13 Oct 2015 09:44:37 +0000 (12:44 +0300)]
httpauth: Add space after commas in HTTP/RTSP auth header

This fixes access to Grandstream cameras, which return 401 otherwise.
VLC sends Authorization: header with spaces between parameters, and it
is known to work with Grandstream devices and broad range of other HTTP
and RTSP servers, so author considers switching to such behaviour safe.

See RFC 2617 (HTTP Auth).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agortmpproto: Write correct flv packet sizes at the end of packets
Michael Niedermayer [Tue, 13 Oct 2015 09:17:24 +0000 (12:17 +0300)]
rtmpproto: Write correct flv packet sizes at the end of packets

In one case it was written as zero, one case left it uninitialized,
missed the 11 bytes for the flv header.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoMerge commit '16b0c929621f84983b83b9735ce973acb12723bc'
Hendrik Leppkes [Wed, 14 Oct 2015 12:28:20 +0000 (14:28 +0200)]
Merge commit '16b0c929621f84983b83b9735ce973acb12723bc'

* commit '16b0c929621f84983b83b9735ce973acb12723bc':
  avconv: Add loop option.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '11c5f438ff83da5040e85bfa6299f56b321d32ef'
Hendrik Leppkes [Wed, 14 Oct 2015 12:01:11 +0000 (14:01 +0200)]
Merge commit '11c5f438ff83da5040e85bfa6299f56b321d32ef'

* commit '11c5f438ff83da5040e85bfa6299f56b321d32ef':
  dict: Change return type of av_dict_copy()

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'c1aac39eaccd32dc3b74ccfcce701d3d888fbc6b'
Hendrik Leppkes [Wed, 14 Oct 2015 11:54:50 +0000 (13:54 +0200)]
Merge commit 'c1aac39eaccd32dc3b74ccfcce701d3d888fbc6b'

* commit 'c1aac39eaccd32dc3b74ccfcce701d3d888fbc6b':
  build: add Solaris symbol versioning

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'b9ece15a01782b4f301c0c139d1d7b20f848914c'
Hendrik Leppkes [Wed, 14 Oct 2015 11:48:22 +0000 (13:48 +0200)]
Merge commit 'b9ece15a01782b4f301c0c139d1d7b20f848914c'

* commit 'b9ece15a01782b4f301c0c139d1d7b20f848914c':
  nullenc: Use the wrapped avframe pseudo-encoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'd00a8fd417ad20cecbc7ca17b25f352655148fb1'
Hendrik Leppkes [Wed, 14 Oct 2015 11:44:33 +0000 (13:44 +0200)]
Merge commit 'd00a8fd417ad20cecbc7ca17b25f352655148fb1'

* commit 'd00a8fd417ad20cecbc7ca17b25f352655148fb1':
  yuv4mpeg: Use the wrapped avframe pseudo-encoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '00332e0a064dad866812de9162b009cbaba6f5df'
Hendrik Leppkes [Wed, 14 Oct 2015 11:25:25 +0000 (13:25 +0200)]
Merge commit '00332e0a064dad866812de9162b009cbaba6f5df'

* commit '00332e0a064dad866812de9162b009cbaba6f5df':
  wrapped_avframe: Initial implementation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agomimic: drop AVPicture usage
wm4 [Tue, 13 Oct 2015 12:48:55 +0000 (14:48 +0200)]
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.

8 years agolibschroedinger: Properly use AVFrame API
Vittorio Giovara [Mon, 12 Oct 2015 16:54:52 +0000 (18:54 +0200)]
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>
8 years agoqtrle: Properly use AVFrame API
Vittorio Giovara [Mon, 12 Oct 2015 17:00:31 +0000 (19:00 +0200)]
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>
8 years agoavformat/mov: fix integer overflow
Ganesh Ajjanagadde [Sat, 10 Oct 2015 17:39:28 +0000 (13:39 -0400)]
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 053e80f6eaf8d87521fe58ea96886b6ee0bbe59d (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>
8 years agoffserver_config: check for INT_MIN before doing FFABS
Ganesh Ajjanagadde [Fri, 9 Oct 2015 15:25:16 +0000 (11:25 -0400)]
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>
8 years agox86/vp9itxfm: fix register clobbering in ff_vp9_idct_idct_4x4_add_12_sse2
James Almer [Tue, 13 Oct 2015 23:03:52 +0000 (20:03 -0300)]
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>
8 years agodnxhdenc: fix access outside of image
Christophe Gisquet [Tue, 13 Oct 2015 20:02:41 +0000 (22:02 +0200)]
dnxhdenc: fix access outside of image

This is the same test as for the 8bit case.

8 years agox86: simple_idct10_template: use const
Christophe Gisquet [Tue, 13 Oct 2015 19:21:39 +0000 (21:21 +0200)]
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>
8 years agoavutil/fifo: Fix thread saftey of av_fifo_generic_peek()
Michael Niedermayer [Tue, 13 Oct 2015 16:29:04 +0000 (18:29 +0200)]
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>
8 years agoswscale: fix ticket #4881
Pedro Arthur [Tue, 13 Oct 2015 16:32:07 +0000 (13:32 -0300)]
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.

8 years agoavcodec/mips/aaccoder_mips: Sync with the generic code
Nedeljko Babic [Tue, 13 Oct 2015 14:14:51 +0000 (16:14 +0200)]
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>
8 years agovp9: use registers for constant loading where possible.
Ronald S. Bultje [Mon, 12 Oct 2015 13:54:59 +0000 (09:54 -0400)]
vp9: use registers for constant loading where possible.

8 years agovp9: refactor itx coefficients and share between 8 and 10/12bpp.
Ronald S. Bultje [Sun, 11 Oct 2015 00:31:57 +0000 (20:31 -0400)]
vp9: refactor itx coefficients and share between 8 and 10/12bpp.

8 years agovp9: add itxfm_add eob shortcuts to 10/12bpp functions.
Ronald S. Bultje [Sat, 10 Oct 2015 02:35:49 +0000 (22:35 -0400)]
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.

8 years agovp9: add 10/12bpp idct_idct_32x32 sse2 SIMD version.
Ronald S. Bultje [Mon, 12 Oct 2015 14:19:05 +0000 (10:19 -0400)]
vp9: add 10/12bpp idct_idct_32x32 sse2 SIMD version.

8 years agovp9: 10/12bpp sse2 SIMD for iadst16.
Ronald S. Bultje [Thu, 8 Oct 2015 20:53:44 +0000 (16:53 -0400)]
vp9: 10/12bpp sse2 SIMD for iadst16.

8 years agovp9: refactor 10/12bpp dc-only code in 4x4/8x8 and add to 16x16.
Ronald S. Bultje [Mon, 12 Oct 2015 14:21:48 +0000 (10:21 -0400)]
vp9: refactor 10/12bpp dc-only code in 4x4/8x8 and add to 16x16.

8 years agovp9: add 10/12bpp sse2 SIMD version for idct_idct_16x16.
Ronald S. Bultje [Thu, 8 Oct 2015 14:16:36 +0000 (10:16 -0400)]
vp9: add 10/12bpp sse2 SIMD version for idct_idct_16x16.

8 years agovp9: add 10/12bpp sse2 SIMD versions of iadst8x8.
Ronald S. Bultje [Wed, 7 Oct 2015 19:42:52 +0000 (15:42 -0400)]
vp9: add 10/12bpp sse2 SIMD versions of iadst8x8.

8 years agovp9: add 10/12bpp sse2 SIMD for idct_idct_8x8.
Ronald S. Bultje [Mon, 12 Oct 2015 14:17:23 +0000 (10:17 -0400)]
vp9: add 10/12bpp sse2 SIMD for idct_idct_8x8.

8 years agovp9: add 12bpp sse2 versions of iadst4.
Ronald S. Bultje [Wed, 7 Oct 2015 01:59:10 +0000 (21:59 -0400)]
vp9: add 12bpp sse2 versions of iadst4.

8 years agovp9: initial attempt at a idct_idct_4x4 12bpp x86 simd (sse2) impl.
Ronald S. Bultje [Mon, 12 Oct 2015 14:16:56 +0000 (10:16 -0400)]
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.

8 years agovp9: add x86 simd (sse2/ssse3) for iadst4 10bpp functions.
Ronald S. Bultje [Tue, 6 Oct 2015 15:42:03 +0000 (11:42 -0400)]
vp9: add x86 simd (sse2/ssse3) for iadst4 10bpp functions.

8 years agovp9: add 10bpp simd (mmxext/ssse3) for idct_idct_4x4.
Ronald S. Bultje [Tue, 6 Oct 2015 15:03:45 +0000 (11:03 -0400)]
vp9: add 10bpp simd (mmxext/ssse3) for idct_idct_4x4.

8 years agovp9: add 10/12bpp mmxext-optimized iwht_iwht_4x4 function.
Ronald S. Bultje [Tue, 6 Oct 2015 15:01:48 +0000 (11:01 -0400)]
vp9: add 10/12bpp mmxext-optimized iwht_iwht_4x4 function.

8 years agox86: dct-test: add more idcts
Christophe Gisquet [Mon, 12 Oct 2015 17:37:50 +0000 (19:37 +0200)]
x86: dct-test: add more idcts

In particular for 10 and 12 bits.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/dct-test: Print failure notice below the failed *dct
Michael Niedermayer [Mon, 12 Oct 2015 21:40:34 +0000 (23:40 +0200)]
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>
8 years agox86: simple_idct: 12bits versions
Christophe Gisquet [Mon, 12 Oct 2015 17:37:49 +0000 (19:37 +0200)]
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>
8 years agoavcodec: Do not lock during init if there is no init function
Derek Buitenhuis [Mon, 12 Oct 2015 14:32:28 +0000 (10:32 -0400)]
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>
8 years agoavformat: Do not use AVFMT_RAWPICTURE
Luca Barbato [Mon, 12 Oct 2015 14:06:07 +0000 (16:06 +0200)]
avformat: Do not use AVFMT_RAWPICTURE

There are no formats supporting it anymore and it is deprecated.
Update the documentation accordingly.

8 years agox86: simple_idct(_put): 10bits versions
Christophe Gisquet [Mon, 12 Oct 2015 17:37:47 +0000 (19:37 +0200)]
x86: simple_idct(_put): 10bits versions

Modeled from the prores version. Clips to [0;1023] and is bitexact.
Bitexactness requires to add offsets in different places compared to
prores or C, and makes the function approximately 2% slower.

For 16 frames of a DNxHD 4:2:2 10bits test sequence:

C:    60861 decicycles in idct, 1048205 runs,    371 skips
sse2: 27567 decicycles in idct, 1048216 runs,    360 skips
avx:  26272 decicycles in idct, 1048171 runs,    405 skips

The add version is not implemented, so the corresponding dsp
function is set to NULL to make it clear in a code executing it.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agox86: simple_idct10_template: fix overflow in pass
Christophe Gisquet [Mon, 12 Oct 2015 17:37:46 +0000 (19:37 +0200)]
x86: simple_idct10_template: fix overflow in pass

When the input of a pass has 15 or 16 bits of precision (in particular
the column pass), the addition of a bias to W4 may lead to overflows
in the input to pmaddwd.

This requires postponing the adding of the bias to after the first
butterfly. To do so, the fact that m15, unused although zeroed, is
exploited. In case the pass is safe, an address can be directly used,
and the number of xmm regs can be decreased. Otherwise, the 32bits bias
is loaded into it.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavconv: Add loop option.
Alexandra Hájková [Fri, 9 Oct 2015 20:11:56 +0000 (22:11 +0200)]
avconv: Add loop option.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoavfilter/af_sidechaincompress: replace FFABS with fabs
Ganesh Ajjanagadde [Tue, 13 Oct 2015 07:37:18 +0000 (09:37 +0200)]
avfilter/af_sidechaincompress: replace FFABS with fabs

8 years agoavfilter/af_astats: replace FFABS with fabs
Ganesh Ajjanagadde [Tue, 13 Oct 2015 07:34:39 +0000 (09:34 +0200)]
avfilter/af_astats: replace FFABS with fabs

8 years agoavfilter/af_agate: replace FFABS with fabs
Ganesh Ajjanagadde [Tue, 13 Oct 2015 07:31:16 +0000 (09:31 +0200)]
avfilter/af_agate: replace FFABS with fabs

8 years agofate: add 10bits YUV4:2:2 dnxhd test
Christophe Gisquet [Mon, 12 Oct 2015 17:37:43 +0000 (19:37 +0200)]
fate: add 10bits YUV4:2:2 dnxhd test

It was useful to (accidentally?) spot an overflow in the column pass
of the x86 simple_idct10 implementation.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/simple_idct10: improve precision
Christophe Gisquet [Mon, 12 Oct 2015 17:37:45 +0000 (19:37 +0200)]
avcodec/simple_idct10: improve precision

omse goes from 0.03060703 (which fails for dct-test) to 0.01663750.
This also actually improve the error of decoding the sample generated
by fate-vsynth3-dnxhd1080i-10bit using simple_idct10 to FAANI, which
goes (when resampled to yuv422p) from:
stddev:    0.06 PSNR: 72.28 MAXDIFF:    1
to identical.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agox86: prores: templatize 10 bits simple_idct
Christophe Gisquet [Mon, 12 Oct 2015 17:37:44 +0000 (19:37 +0200)]
x86: prores: templatize 10 bits simple_idct

This should be reused for a generic simple_idct10 function.
Requires a bit of trickery to declare common constants in C.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoaacenc: shorten name of ff_aac_adjust_common_prediction
Rostislav Pehlivanov [Mon, 12 Oct 2015 22:33:07 +0000 (23:33 +0100)]
aacenc: shorten name of ff_aac_adjust_common_prediction

To keep it similar to the other functions which are all named *_pred.

8 years agoaacenc: increase size of s->planar_samples[] from 6 to 8
Rostislav Pehlivanov [Mon, 12 Oct 2015 22:25:45 +0000 (23:25 +0100)]
aacenc: increase size of s->planar_samples[] from 6 to 8

Left out of last commit which added support for eight channel audio.

8 years agompegvideo: dnxhdenc: permute 10bits content
Christophe Gisquet [Mon, 12 Oct 2015 17:37:42 +0000 (19:37 +0200)]
mpegvideo: dnxhdenc: permute 10bits content

Dequant or encoding were trying to reverse a scan that hadn't been
applied...

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/mips/aaccoder_mips: Disable ff_aac_coder_init_mips() to prevent build failure
Michael Niedermayer [Mon, 12 Oct 2015 16:45:31 +0000 (18:45 +0200)]
avcodec/mips/aaccoder_mips: Disable ff_aac_coder_init_mips() to prevent build failure

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/webvttdec: Don't stop parsing on comments
Ricardo Constantino [Sun, 11 Oct 2015 16:11:02 +0000 (17:11 +0100)]
avformat/webvttdec: Don't stop parsing on comments

Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
8 years agofate/subtitles: Add a new test for WebVTT
Ricardo Constantino [Sun, 11 Oct 2015 16:11:03 +0000 (17:11 +0100)]
fate/subtitles: Add a new test for WebVTT

Includes escapes that should now be supported and a few features not yet
fully supported, like comments, regions, classes, ruby, and lang.

All were tested with https://quuz.org/webvtt/ for validation, except
regions because the validator doesn't support them yet, and I couldn't
find any other way to validate WebVTT.

Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
8 years agoavcodec/webvttdec: Deal with WebVTT escapes
Ricardo Constantino [Sun, 11 Oct 2015 16:11:01 +0000 (17:11 +0100)]
avcodec/webvttdec: Deal with WebVTT escapes

Bare ampersand characters are still accepted, even though out-of-spec.
Also fixes adjacent tags not being parsed.

Fixes trac #4915

Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
8 years agodoc/filters: s/nb_inputs/inputs for stack filters
Lou Logan [Mon, 12 Oct 2015 18:09:22 +0000 (10:09 -0800)]
doc/filters: s/nb_inputs/inputs for stack filters

Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavcodec: Don't lock on init for codecs without an init function
Derek Buitenhuis [Mon, 12 Oct 2015 18:25:51 +0000 (15:25 -0300)]
avcodec: Don't lock on init for codecs without an init function

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
8 years agofate: increase fuzz on fate-aac-tns-encode test
Rostislav Pehlivanov [Mon, 12 Oct 2015 16:15:30 +0000 (17:15 +0100)]
fate: increase fuzz on fate-aac-tns-encode test

Fails on SunOS and old GCC (<=4.6 is ancient) versions.

8 years agoaacenc_utils: fit find_form_factor() below 80 chars per line
Rostislav Pehlivanov [Mon, 12 Oct 2015 16:14:50 +0000 (17:14 +0100)]
aacenc_utils: fit find_form_factor() below 80 chars per line

8 years agoaacenc: add support for changing options based on a profile
Rostislav Pehlivanov [Mon, 12 Oct 2015 15:50:10 +0000 (16:50 +0100)]
aacenc: add support for changing options based on a profile

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.

8 years agoavfilter/drawtext: allow to format pts with strftime
Alex Agranovsky [Sat, 10 Oct 2015 18:52:34 +0000 (14:52 -0400)]
avfilter/drawtext: allow to format pts with strftime

Signed-off-by: Alex Agranovsky <alex@sighthound.com>