5 years agoavformat/m4vdec: Detect raw mpeg4video with unidentified non mpeg headers with a...
Michael Niedermayer [Sat, 18 Feb 2017 02:31:14 +0000 (03:31 +0100)]
avformat/m4vdec: Detect raw mpeg4video with unidentified non mpeg headers with a very low score

Fixes Ticket 6018

This fixes a regression, and allows playback of files containing mpeg4video that are otherwise
not supported

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/hlsenc: set default http method to PUT when method is null
Steven Liu [Sat, 18 Feb 2017 01:42:51 +0000 (09:42 +0800)]
avformat/hlsenc: set default http method to PUT when method is null

When the http method is not set, the method will use POST for ts,
PUT for m3u8, it is not unify, now set it unify.
This ticket id: #5315

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoopusenc: initialize the emphasis coefficients on init
Rostislav Pehlivanov [Sat, 18 Feb 2017 01:11:58 +0000 (01:11 +0000)]
opusenc: initialize the emphasis coefficients on init

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agolavf/riff: Support decoding files with broken mediasubtype base guid.
Thierry Foucu [Thu, 16 Feb 2017 13:03:38 +0000 (14:03 +0100)]
lavf/riff: Support decoding files with broken mediasubtype base guid.

Fixes ticket #6100.

5 years agoavcodec/opus: Check count of ambisonic channels
Michael Niedermayer [Fri, 17 Feb 2017 10:18:30 +0000 (11:18 +0100)]
avcodec/opus: Check count of ambisonic channels

specifies the maximum as 227

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolibopus: decode ambisonics with non-diegetic sources
Felicia [Mon, 6 Feb 2017 23:49:36 +0000 (15:49 -0800)]
libopus: decode ambisonics with non-diegetic sources

Channel mapping 2 additionally supports a non-diegetic stereo track
appended to the end of a full-order ambisonics signal, such that the
total channel count is either
  (n + 1) ^ 2, or
  (n + 1) ^ 2 + 2
where n is the ambisonics order

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/fmvc: fix decoding of odd size videos
Paul B Mahol [Fri, 17 Feb 2017 09:46:52 +0000 (10:46 +0100)]
avcodec/fmvc: fix decoding of odd size videos

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agolavc/avpacket: Initialize a variable in error path.
Carl Eugen Hoyos [Thu, 16 Feb 2017 23:46:14 +0000 (00:46 +0100)]
lavc/avpacket: Initialize a variable in error path.

Fixes ticket #6153.

Tested-by: Tyson Smith
5 years agowmaprodec: fix leaking fdsp on init failure
Andreas Cadhalpun [Wed, 15 Feb 2017 23:54:31 +0000 (00:54 +0100)]
wmaprodec: fix leaking fdsp on init failure

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
5 years agompegaudiodec_template: fix leaking fdsp for mp3on4float
Andreas Cadhalpun [Wed, 15 Feb 2017 23:37:51 +0000 (00:37 +0100)]
mpegaudiodec_template: fix leaking fdsp for mp3on4float

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
5 years agovaapi_vp8: Use VP8_MAX_QUANT instead of magic number
Mark Thompson [Thu, 16 Feb 2017 20:40:55 +0000 (20:40 +0000)]
vaapi_vp8: Use VP8_MAX_QUANT instead of magic number

5 years agodoc: correct order of options for channelmap filter
Mulvya [Thu, 16 Feb 2017 18:57:32 +0000 (00:27 +0530)]
doc: correct order of options for channelmap filter

Signed-off-by: Mulvya <mulvya@gmail.com>
5 years agoChangelog: add entry for the native Opus encoder
Rostislav Pehlivanov [Thu, 16 Feb 2017 16:28:10 +0000 (16:28 +0000)]
Changelog: add entry for the native Opus encoder

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoavcodec/opusenc: Add () protecting macro arguments
Michael Niedermayer [Thu, 16 Feb 2017 12:24:11 +0000 (13:24 +0100)]
avcodec/opusenc: Add () protecting macro arguments

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/error_resilience: Fix "assignment from incompatible pointer type" warning
Michael Niedermayer [Thu, 16 Feb 2017 11:28:42 +0000 (12:28 +0100)]
avcodec/error_resilience: Fix "assignment from incompatible pointer type" warning

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavc/vda_h264_dec.c Fix NULL pointer dereference
Pavel Koshevoy [Fri, 10 Feb 2017 03:20:14 +0000 (20:20 -0700)]
lavc/vda_h264_dec.c Fix NULL pointer dereference

ps.sps_list entries may be NULL, so check before dereferencing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoswr/aarch64: add missing ret to ff_resample_common_apply_filter_x8_float_neon
Matthieu Bouron [Thu, 16 Feb 2017 10:50:58 +0000 (11:50 +0100)]
swr/aarch64: add missing ret to ff_resample_common_apply_filter_x8_float_neon

5 years agoconfigure: add missing mdct15 dependency
James Almer [Thu, 16 Feb 2017 04:17:06 +0000 (01:17 -0300)]
configure: add missing mdct15 dependency

5 years agoconfigure: remove unnecessary opus encoder dependency
James Almer [Thu, 16 Feb 2017 04:15:59 +0000 (01:15 -0300)]
configure: remove unnecessary opus encoder dependency

audiodsp is not used by the encoder.

5 years agoopusenc: fix coarse energy quantization with 2 bits left
Rostislav Pehlivanov [Wed, 15 Feb 2017 22:51:37 +0000 (22:51 +0000)]
opusenc: fix coarse energy quantization with 2 bits left

Fixes CID1400584

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoopus_pvq: fix uninitialized variable usage
Rostislav Pehlivanov [Wed, 15 Feb 2017 21:11:41 +0000 (21:11 +0000)]
opus_pvq: fix uninitialized variable usage

Fixes CID1400586

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agodoc: correct table end for metadata filter
Mulvya [Wed, 15 Feb 2017 19:02:27 +0000 (00:32 +0530)]
doc: correct table end for metadata filter

Signed-off-by: Mulvya <mulvya@gmail.com>
5 years agoadpcm: fix clipping for yamaha
Paul B Mahol [Wed, 15 Feb 2017 11:36:24 +0000 (12:36 +0100)]
adpcm: fix clipping for yamaha

According to specification max value allowed is 0x6000.
Fixes #5862.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/h264_sei: Check actual presence of SEI picture timing instead of implying it
Michael Niedermayer [Tue, 14 Feb 2017 22:45:01 +0000 (23:45 +0100)]
avcodec/h264_sei: Check actual presence of SEI picture timing instead of implying it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/dashenc: Only use temporary files when outputting to file protocol
Thomas Stephens [Tue, 7 Feb 2017 20:20:32 +0000 (14:20 -0600)]
avformat/dashenc: Only use temporary files when outputting to file protocol

Skips using temporary files when outputting to a protocol other than
"file", which enables dash to output content over network
protocols. The logic has been copied from the HLS format.

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/hevc_parser: export framerate, remove one dependency on the decoder
Michael Niedermayer [Tue, 14 Feb 2017 15:33:53 +0000 (16:33 +0100)]
avcodec/hevc_parser: export framerate, remove one dependency on the decoder

Fixes Ticket6090

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoHTTP: improve performance by reducing forward seeks
Joel Cunningham [Mon, 30 Jan 2017 16:00:44 +0000 (10:00 -0600)]
HTTP: improve performance by reducing forward seeks

This commit optimizes HTTP performance by reducing forward seeks, instead
favoring a read-ahead and discard on the current connection (referred to
as a short seek) for seeks that are within a TCP window's worth of data.
This improves performance because with TCP flow control, a window's worth
of data will be in the local socket buffer already or in-flight from the
sender once congestion control on the sender is fully utilizing the window.

Note: this approach doesn't attempt to differentiate from a newly opened
connection which may not be fully utilizing the window due to congestion
control vs one that is. The receiver can't get at this information, so we
assume worst case; that full window is in use (we did advertise it after all)
and that data could be in-flight

The previous behavior of closing the connection, then opening a new
with a new HTTP range value results in a massive amounts of discarded
and re-sent data when large TCP windows are used.  This has been observed
on MacOS/iOS which starts with an initial window of 256KB and grows up to
1MB depending on the bandwidth-product delay.

When seeking within a window's worth of data and we close the connection,
then open a new one within the same window's worth of data, we discard
from the current offset till the end of the window.  Then on the new
connection the server ends up re-sending the previous data from new
offset till the end of old window.

Example (assumes full window utilization):

TCP window size: 64KB
Position: 32KB
Forward seek position: 40KB

      *                      (Next window)
32KB |--------------| 96KB |---------------| 160KB
  40KB |---------------| 104KB

Re-sent amount: 96KB - 40KB = 56KB

For a real world test example, I have MP4 file of ~25MB, which ffplay
only reads ~16MB and performs 177 seeks. With current ffmpeg, this results
in 177 HTTP GETs and ~73MB worth of TCP data communication.  With this
patch, ffmpeg issues 4 HTTP GETs and 3 seeks for a total of ~22MB of TCP data

To support this feature, the short seek logic in avio_seek() has been
extended to call a function to get the short seek threshold value.  This
callback has been plumbed to the URLProtocol structure, which now has
infrastructure in HTTP and TCP to get the underlying receiver window size
via SO_RCVBUF.  If the underlying URL and protocol don't support returning
a short seek threshold, the default s->short_seek_threshold is used

This feature has been tested on Windows 7 and MacOS/iOS.  Windows support
is slightly complicated by the fact that when TCP window auto-tuning is
enabled, SO_RCVBUF doesn't report the real window size, but it does if
SO_RCVBUF was manually set (disabling auto-tuning). So we can only use
this optimization on Windows in the later case

Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/cuvid: add format mismatch debug logs
Timo Rothenpieler [Thu, 9 Feb 2017 21:19:59 +0000 (22:19 +0100)]
avcodec/cuvid: add format mismatch debug logs

5 years agoavcodec/cuvid: set width and height before calling get_format
Timo Rothenpieler [Tue, 14 Feb 2017 10:47:08 +0000 (11:47 +0100)]
avcodec/cuvid: set width and height before calling get_format

The external hw_frames_ctx is initialized in that callback, and needs
that information to be accurate.

5 years agoavcodec/cuvid: update hw_frames_ctx reference after get_format call
Timo Rothenpieler [Thu, 9 Feb 2017 21:29:47 +0000 (22:29 +0100)]
avcodec/cuvid: update hw_frames_ctx reference after get_format call

5 years agoavcodec/nvenc: push cuda context before encoding a frame
Timo Rothenpieler [Mon, 13 Feb 2017 21:59:46 +0000 (22:59 +0100)]
avcodec/nvenc: push cuda context before encoding a frame

Thanks to Miroslav Slugeň for figuring out what was going on here.

5 years agoMAINTAINERS: add myself as mdct/opus maintainer
Rostislav Pehlivanov [Sat, 11 Feb 2017 21:49:04 +0000 (21:49 +0000)]
MAINTAINERS: add myself as mdct/opus maintainer

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agodoc/encoders: add documentation for the Opus encoder
Rostislav Pehlivanov [Tue, 14 Feb 2017 06:14:15 +0000 (06:14 +0000)]
doc/encoders: add documentation for the Opus encoder

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoopus: add a native Opus encoder
Rostislav Pehlivanov [Sat, 11 Feb 2017 00:25:08 +0000 (00:25 +0000)]
opus: add a native Opus encoder

This marks the first time anyone has written an Opus encoder without
using any libopus code. The aim of the encoder is to prove how far
the format can go by writing the craziest encoder for it.

Right now the encoder's basic, it only supports CBR encoding, however
internally every single feature the CELT layer has is implemented
(except the pitch pre-filter which needs to work well with the rest of
whatever gets implemented). Psychoacoustic and rate control systems are
under development.

The encoder takes in frames of 120 samples and depending on the value of
opus_delay the plan is to use the extra buffered frames as lookahead.
Right now the encoder will pick the nearest largest legal frame size and
won't use the lookahead, but that'll change once there's a
psychoacoustic system.

Even though its a pretty basic encoder its already outperforming
any other native encoder FFmpeg has by a huge amount.

The PVQ search algorithm is faster and more accurate than libopus's
algorithm so the encoder's performance is close to that of libopus
at zero complexity (libopus has more SIMD).
The algorithm might be ported to libopus or other codecs using PVQ in
the future.

The encoder still has a few minor bugs, like desyncs at ultra low
bitrates (below 9kbps with 20ms frames).

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoopus_celt: rename structures to better names and reorganize them
Rostislav Pehlivanov [Sat, 11 Feb 2017 00:25:07 +0000 (00:25 +0000)]
opus_celt: rename structures to better names and reorganize them

This is meant to be applied on top of my previous patch which
split PVQ into celt_pvq.c and made opus_celt.h

Essentially nothing has been changed other than renaming CeltFrame
to CeltBlock (CeltFrame had absolutely nothing at all to do with
a frame) and CeltContext to CeltFrame.
3 variables have been put in CeltFrame as they make more sense
there rather than being passed around as arguments.
The coefficients have been moved to the CeltBlock structure
(why the hell were they in CeltContext and not in CeltFrame??).

Now the encoder would be able to use the exact context the decoder
uses (plus a couple of extra fields in there).

FATE passes, no slowdowns, etc.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoopus_celt: move quantization and band decoding to opus_pvq.c
Rostislav Pehlivanov [Sat, 11 Feb 2017 00:25:06 +0000 (00:25 +0000)]
opus_celt: move quantization and band decoding to opus_pvq.c

A huge amount can be reused by the encoder, as the only thing
which needs to be done would be to add a 10 line celt_icwrsi,
a wrapper around it (celt_alg_quant) and templating the
ff_celt_decode_band to replace entropy decoding functions
with entropy encoding.

There is no performance loss but in fact a performance gain of
around 6% which is caused by the compiler being able to optimize
the decoding more efficiently.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoimdct15: rename to mdct15 and add a forward transform
Rostislav Pehlivanov [Wed, 1 Feb 2017 03:13:06 +0000 (03:13 +0000)]
imdct15: rename to mdct15 and add a forward transform

Handles strides (needed for Opus transients), does pre-reindexing and folding
without needing a copy.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoopus_rc: add entropy encoding functions
Rostislav Pehlivanov [Wed, 1 Feb 2017 03:13:05 +0000 (03:13 +0000)]
opus_rc: add entropy encoding functions

Mostly used the RFC document, the decoding functions and
the reference encoder's implmenentation as a reference.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoavformat/http: Check for truncated buffers in http_connect()
Michael Niedermayer [Mon, 13 Feb 2017 11:47:49 +0000 (12:47 +0100)]
avformat/http: Check for truncated buffers in http_connect()

Reported-by: SleepProgger <security@gnutp.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodoc/ffmpeg: document trailing "?" in map option
Lou Logan [Tue, 14 Feb 2017 00:26:43 +0000 (15:26 -0900)]
doc/ffmpeg: document trailing "?" in map option

This feature was added in 2375a85c36c4941042e6ee58a31d6560bde91d37.

Signed-off-by: Lou Logan <lou@lrcd.com>
5 years agolavc: Add device context field to AVCodecContext
Mark Thompson [Thu, 9 Feb 2017 00:23:36 +0000 (00:23 +0000)]
lavc: Add device context field to AVCodecContext

For use by codec implementations which can allocate frames internally.

5 years agoavfilter/vf_lut: make it possible to clip pixel values that are out of valid range
Paul B Mahol [Mon, 13 Feb 2017 21:49:41 +0000 (22:49 +0100)]
avfilter/vf_lut: make it possible to clip pixel values that are out of valid range

Previous behavior was not useful at all as such pixels where all mapped to 0.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/vf_lut: do not always explicitly clip pixels
Paul B Mahol [Mon, 13 Feb 2017 20:52:51 +0000 (21:52 +0100)]
avfilter/vf_lut: do not always explicitly clip pixels

Old behaviour was not useful at all. New behaviour only emulate
old behaviour with default options.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agodoc/protocols: add option usage description
Lou Logan [Mon, 13 Feb 2017 21:23:03 +0000 (12:23 -0900)]
doc/protocols: add option usage description

Fixes ticket #6148.

Signed-off-by: Lou Logan <lou@lrcd.com>
5 years agoaac_latm: Align inband PCE to the start of the payload
Alex Converse [Thu, 9 Feb 2017 16:58:47 +0000 (08:58 -0800)]
aac_latm: Align inband PCE to the start of the payload

A strict reading of the spec seems to imply that it should be aligned to
the start of the element instance tag, but that would break all of the
samples with PCEs.

It seems like a well formed LATM stream should have its PCE in the ASC
rather than inband.

Fixes ticket 4544

5 years agoaacsbr: Associate SBR data with AAC elements on init
Alex Converse [Thu, 9 Feb 2017 16:28:30 +0000 (08:28 -0800)]
aacsbr: Associate SBR data with AAC elements on init

Quiets some log spam on pure upsampling mode.

Fixes ticket 5163.

5 years agoaac_latm: Copy whole AudioSpecificConfig when it is sized.
Alex Converse [Thu, 9 Feb 2017 16:57:33 +0000 (08:57 -0800)]
aac_latm: Copy whole AudioSpecificConfig when it is sized.

This preserves sync extensions.

5 years agoaac_latm: Allow unaligned AudioSpecificConfig
Alex Converse [Thu, 9 Feb 2017 16:22:20 +0000 (08:22 -0800)]
aac_latm: Allow unaligned AudioSpecificConfig

Fixes ticket 4730

5 years agoavcodec/nvenc: set frame buffer format for mapped frames
Timo Rothenpieler [Fri, 10 Feb 2017 14:00:21 +0000 (15:00 +0100)]
avcodec/nvenc: set frame buffer format for mapped frames

5 years agohwcontext_dxva2: support D3D9Ex
wm4 [Fri, 10 Feb 2017 11:17:24 +0000 (12:17 +0100)]
hwcontext_dxva2: support D3D9Ex

D3D9Ex uses different driver paths. This helps with "headless"
configurations when no user logs in. Plain D3D9 device creation will
fail if no user is logged in, while it works with D3D9Ex.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Merges Libav commit c2f97f0508708.

5 years agoAVFrame: add an opaque_ref field
wm4 [Thu, 2 Feb 2017 10:27:54 +0000 (11:27 +0100)]
AVFrame: add an opaque_ref field

This is an extended version of the AVFrame.opaque field, which can be
used to attach arbitrary user information to an AVFrame.

The usefulness of the opaque field is rather limited, because it can
store only up to 32 bits of information (or 64 bit on 64 bit systems).
It's not possible to set this field to a memory allocation, because
there is no way to deallocate it correctly.

The opaque_ref field circumvents this by letting the user set an
AVBuffer, which makes the user data refcounted.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Merges Libav commit 04f3bd349651.

5 years agoavformat/hlsenc: fix stream level metadata handling
Bela Bodecs [Sun, 12 Feb 2017 23:33:48 +0000 (07:33 +0800)]
avformat/hlsenc: fix stream level metadata handling

hls-encoder currenlty does not provide stream level metadata to mpegts
muxer. This patch fixes track #3848 bug.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agolavc/libzvbi: remove deprecated API usage
Josh de Kock [Sat, 11 Feb 2017 23:23:24 +0000 (23:23 +0000)]
lavc/libzvbi: remove deprecated API usage

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Josh de Kock <josh@itanimul.li>
5 years agodoc/muxers: Fix typo, causing warnings during build
Michael Niedermayer [Sun, 12 Feb 2017 19:40:47 +0000 (20:40 +0100)]
doc/muxers: Fix typo, causing warnings during build

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agomovenc: add support for track names in ISML manifests
Jan Ekström [Fri, 10 Feb 2017 23:21:14 +0000 (01:21 +0200)]
movenc: add support for track names in ISML manifests

This enables having multiple tracks of the same type which would
be treated as different things by the media server (as opposed to
different bit rate versions of the same track). According to the
smooth streaming specification, just setting the systemLanguage
tag is not enough to note that a track with the same attributes
differs from another one.

Reviewed-by: Martin
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavf/mpegts: Make a pointer cast explicit.
Carl Eugen Hoyos [Sat, 11 Feb 2017 15:53:34 +0000 (16:53 +0100)]
lavf/mpegts: Make a pointer cast explicit.

Silences an "assignment discards ‘const’ qualifier" warning.

Reviewed-by: Marton Balint
5 years agoavcodec/iff: support for byterun1 ACBM compression
Paul B Mahol [Sun, 12 Feb 2017 12:26:28 +0000 (13:26 +0100)]
avcodec/iff: support for byterun1 ACBM compression

This is apparently same as no compression.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agodoc/general: mention Newtek SpeedHQ decoder
Paul B Mahol [Sat, 11 Feb 2017 21:25:04 +0000 (22:25 +0100)]
doc/general: mention Newtek SpeedHQ decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec: add FM Screen Capture Codec decoder
Paul B Mahol [Mon, 6 Feb 2017 08:17:29 +0000 (09:17 +0100)]
avcodec: add FM Screen Capture Codec decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavformat/flic: fix handling of EOF case
Paul B Mahol [Sat, 11 Feb 2017 19:07:39 +0000 (20:07 +0100)]
avformat/flic: fix handling of EOF case

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/flicvideo: add support for 24bit flic files
Paul B Mahol [Sat, 11 Feb 2017 18:56:42 +0000 (19:56 +0100)]
avcodec/flicvideo: add support for 24bit flic files

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/flicvideo: fix some indentation issues
Paul B Mahol [Sat, 11 Feb 2017 17:31:05 +0000 (18:31 +0100)]
avcodec/flicvideo: fix some indentation issues

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agolavf/omadec: Fix packet duration for Atrac 3 lossless.
Carl Eugen Hoyos [Sat, 11 Feb 2017 17:53:18 +0000 (18:53 +0100)]
lavf/omadec: Fix packet duration for Atrac 3 lossless.

5 years agolavfi/minterpolate: Remove an unused variable.
Carl Eugen Hoyos [Sat, 11 Feb 2017 15:38:56 +0000 (16:38 +0100)]
lavfi/minterpolate: Remove an unused variable.

5 years agolavc/atrac3: Constify a pointer declaration.
Carl Eugen Hoyos [Sat, 11 Feb 2017 15:35:22 +0000 (16:35 +0100)]
lavc/atrac3: Constify a pointer declaration.

Silences an "assignment discards ‘const’ qualifier" warning.

5 years agolavf/rtpdec_mpeg4: Constify a function parameter.
Carl Eugen Hoyos [Sat, 11 Feb 2017 15:18:28 +0000 (16:18 +0100)]
lavf/rtpdec_mpeg4: Constify a function parameter.

Silences an "assignment discards ‘const’ qualifier" warning.

5 years agolavf/omadec: Remove an unsed variable.
Carl Eugen Hoyos [Sat, 11 Feb 2017 12:17:20 +0000 (13:17 +0100)]
lavf/omadec: Remove an unsed variable.

5 years agoavcodec: add ATRAC Advanced Lossless decoders
Paul B Mahol [Wed, 25 Jan 2017 12:33:52 +0000 (13:33 +0100)]
avcodec: add ATRAC Advanced Lossless decoders

Only lossy part is decoded for now.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavformat/hlsenc: deprecate hls_wrap option
Steven Liu [Sat, 11 Feb 2017 04:32:31 +0000 (12:32 +0800)]
avformat/hlsenc: deprecate hls_wrap option

When user use the hls_wrap, there have many problem:
1. some platform refersh the old but usefull segment
2. CDN(Content Delivery Network) Deliver HLS not friendly

The hls_wrap is used to wrap segments for use little space,
now user can use hls_list_size and hls_flags delete_segments
instead it.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agofate: add WavPack muxer test
James Almer [Fri, 10 Feb 2017 22:47:54 +0000 (19:47 -0300)]
fate: add WavPack muxer test

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agodoc: Add muxers/demuxers list option
Mulvya [Fri, 10 Feb 2017 11:40:14 +0000 (17:10 +0530)]
doc: Add muxers/demuxers list option

Signed-off-by: Mulvya <mulvya@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/apetag: bump micro version
James Almer [Sat, 11 Feb 2017 00:03:24 +0000 (21:03 -0300)]
avformat/apetag: bump micro version

In case parsers care about the version that started writing
correct flags.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/apetag: reorder some code to improve readability
James Almer [Fri, 10 Feb 2017 19:01:37 +0000 (16:01 -0300)]
avformat/apetag: reorder some code to improve readability

This way it's clear the size field accounts for the footer length plus every
tag entry, but not the header.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/apetag: account for header size if present when returning the start position
James Almer [Fri, 10 Feb 2017 04:24:27 +0000 (01:24 -0300)]
avformat/apetag: account for header size if present when returning the start position

The size field in the header/footer accounts for the entire APE tag
structure except the 32 bytes from header, for compatibility with

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/apetag: fix flag value to signal footer presence
James Almer [Fri, 10 Feb 2017 03:53:39 +0000 (00:53 -0300)]
avformat/apetag: fix flag value to signal footer presence

According to the spec[1], a value of 0 means the footer is present and a value
of 1 means it's absent, the exact opposite of header presence flag where 1
means present and 0 absent.
The reason for this is compatibility with APEv1 tags, where there's no header,
footer presence was mandatory for all files, and the flags field was a zeroed
reserved field.

[1] http://wiki.hydrogenaud.io/index.php?title=Ape_Tags_Flags

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/qdmc: silence gcc 6.2.0 warning
Paul B Mahol [Fri, 10 Feb 2017 16:02:56 +0000 (17:02 +0100)]
avcodec/qdmc: silence gcc 6.2.0 warning

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agolavf/movenc: Remove two unused variables.
Carl Eugen Hoyos [Fri, 10 Feb 2017 11:40:43 +0000 (12:40 +0100)]
lavf/movenc: Remove two unused variables.

5 years agolavc/mjpegenc_common: Remove an unused variable.
Carl Eugen Hoyos [Fri, 10 Feb 2017 11:34:36 +0000 (12:34 +0100)]
lavc/mjpegenc_common: Remove an unused variable.

5 years agolavf/mov.c: Avoid heap allocation wraps in mov_read_{senc,saiz}()
Matt Wolenetz [Wed, 14 Dec 2016 23:27:49 +0000 (15:27 -0800)]
lavf/mov.c: Avoid heap allocation wraps in mov_read_{senc,saiz}()

Core of patch is from paul@paulmehta.com
Reference https://crbug.com/643952 (senc,saiz portions)

Signed-off-by: Matt Wolenetz <wolenetz@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavf/mov.c: Avoid OOB in mov_read_udta_string()
Matt Wolenetz [Wed, 8 Feb 2017 23:40:46 +0000 (15:40 -0800)]
lavf/mov.c: Avoid OOB in mov_read_udta_string()

Core of patch is from paul@paulmehta.com
Reference https://crbug.com/643952 (udta_string portion)

Signed-off-by: Matt Wolenetz <wolenetz@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mjpegenc: Simplify by moving assert into ff_mjpeg_encode_huffman_close()
Michael Niedermayer [Thu, 9 Feb 2017 23:18:34 +0000 (00:18 +0100)]
avcodec/mjpegenc: Simplify by moving assert into ff_mjpeg_encode_huffman_close()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mjpegenc: Bypass the 2 pass encoding when optimal tables are not requested
Michael Niedermayer [Thu, 9 Feb 2017 22:24:15 +0000 (23:24 +0100)]
avcodec/mjpegenc: Bypass the 2 pass encoding when optimal tables are not requested

This limits the bugs, speedloss and extra memory allocation to the case when
optimal tables are needed.
Fixes regressions with slice multi-threading

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mjpegenc: Revert some differences in ff_mjpeg_encode_mb() relative to pre...
Michael Niedermayer [Thu, 9 Feb 2017 22:07:11 +0000 (23:07 +0100)]
avcodec/mjpegenc: Revert some differences in ff_mjpeg_encode_mb() relative to pre optimal huffman

The changes are not needed anymore and the return code was never used

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mjpegenc_huffman: remove unneeded header include
Michael Niedermayer [Thu, 9 Feb 2017 22:03:57 +0000 (23:03 +0100)]
avcodec/mjpegenc_huffman: remove unneeded header include

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/tests/mjpegenc_huffman: Remove static in main() table
Michael Niedermayer [Thu, 9 Feb 2017 21:56:19 +0000 (22:56 +0100)]
avcodec/tests/mjpegenc_huffman: Remove static in main() table

Avoids false positives when greping for non constant statics

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mjpegenc: Drop i_tex misuse, set itex/header bits correctly, fix 2pass encoding
Michael Niedermayer [Thu, 9 Feb 2017 21:10:43 +0000 (22:10 +0100)]
avcodec/mjpegenc: Drop i_tex misuse, set itex/header bits correctly, fix 2pass encoding

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mjpegenc: Remove non functional huffman reallocation and error handling
Michael Niedermayer [Thu, 9 Feb 2017 20:11:51 +0000 (21:11 +0100)]
avcodec/mjpegenc: Remove non functional huffman reallocation and error handling

If this is wanted iam not against it but it must be designed to work with all cases
like slice threads, and a single growing buffer does not work very well with slices.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agotests/mjpegenc_huffman: align static tables
Rostislav Pehlivanov [Thu, 9 Feb 2017 03:08:50 +0000 (03:08 +0000)]
tests/mjpegenc_huffman: align static tables

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agomjpegenc: use s->avctx as a context for av_log rather than NULL
Rostislav Pehlivanov [Thu, 9 Feb 2017 03:01:58 +0000 (03:01 +0000)]
mjpegenc: use s->avctx as a context for av_log rather than NULL

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agotests/mjpegenc_huffman: replace assert() with av_assert0()
Rostislav Pehlivanov [Thu, 9 Feb 2017 02:59:22 +0000 (02:59 +0000)]
tests/mjpegenc_huffman: replace assert() with av_assert0()

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agomjpegenc_common: add missing ff_ prefix to init_uni_ac_vlc
Rostislav Pehlivanov [Thu, 9 Feb 2017 02:56:13 +0000 (02:56 +0000)]
mjpegenc_common: add missing ff_ prefix to init_uni_ac_vlc

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoffplay: change keyboard volume control to logarithmic
Marton Balint [Sun, 5 Feb 2017 00:16:29 +0000 (01:16 +0100)]
ffplay: change keyboard volume control to logarithmic

The command line parameter remains linear.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agovaapi_encode: Add VP8 support
Mark Thompson [Tue, 29 Nov 2016 20:38:29 +0000 (20:38 +0000)]
vaapi_encode: Add VP8 support

Fixes ticket #6116.

(cherry picked from commit ca62236a89f47bd871eaf69d8d9e837c93c55a6c)

5 years agovaapi_encode: Pass framerate parameters to driver
Mark Thompson [Tue, 29 Nov 2016 22:12:46 +0000 (22:12 +0000)]
vaapi_encode: Pass framerate parameters to driver

Only do this when building for a recent VAAPI version - initial
driver implementations were confused about the interpretation of the
framerate field, but hopefully this will be consistent everywhere
once 0.40.0 is released.

(cherry picked from commit ff35aa8ca4069bf1543adeec4c28e51e4a012eee)

5 years agovaapi_h264: Enable VBR mode
Mark Thompson [Sun, 29 Jan 2017 14:12:20 +0000 (14:12 +0000)]
vaapi_h264: Enable VBR mode

Default to using VBR when a target bitrate is set, unless the max rate
is also set and matches the target.  Changes to the Intel driver mean
that min_qp is also respected in this case, so set a codec default to
unset the value rather than using the current default inherited from
the MPEG-4 part 2 encoder.

(cherry picked from commit eddfb57210298a0a94472794485400a3a6c76196)

5 years agovaapi_encode: Support VBR mode
Mark Thompson [Sun, 29 Jan 2017 14:11:03 +0000 (14:11 +0000)]
vaapi_encode: Support VBR mode

This includes a backward-compatibility hack to choose CBR anyway on
old drivers which have no CBR support, so that existing programs will
continue to work their options now map to VBR.

(cherry picked from commit f033ba470fbab1ff6838666d4d86411effa97b27)

5 years agovaapi_encode: Add MPEG-2 support
Mark Thompson [Mon, 9 Jan 2017 19:17:37 +0000 (19:17 +0000)]
vaapi_encode: Add MPEG-2 support

(cherry picked from commit ca6ae3b77a7e6600e517723b90e57527a47809de)

5 years agovaapi_h264: Scale log2_max_pic_order_cnt_lsb with max_b_frames
Mark Thompson [Wed, 4 Jan 2017 23:05:10 +0000 (23:05 +0000)]
vaapi_h264: Scale log2_max_pic_order_cnt_lsb with max_b_frames

Before this change, it was possible to overflow pic_order_cnt_lsb and
generate a stream with invalid POC numbering.  This makes sure that
the field is large enough that a single IDR B* P sequence uses fewer
than half the available POC lsb values.

(cherry picked from commit 89725a8512721fffd190021ded2d3f5b42e20e2a)

5 years agovaapi_encode: Support forcing IDR frames via AVFrame.pict_type
Mark Thompson [Mon, 12 Dec 2016 21:25:28 +0000 (21:25 +0000)]
vaapi_encode: Support forcing IDR frames via AVFrame.pict_type

(cherry picked from commit a3c3a5eac20a51d402c332cdf5220fff40a7943f)

5 years agovaapi_encode: Fix GOP sizing
Mark Thompson [Wed, 4 Jan 2017 23:17:23 +0000 (23:17 +0000)]
vaapi_encode: Fix GOP sizing

This change makes the configured GOP size be respected exactly -
previously the value could be exceeded slightly due to flaws in the
frame type selection logic.

(cherry picked from commit 37fab0661a760b2a9d727939d72e629acee1a6ef)