ffmpeg.git
2 years agofate-opus: run and test inactive samples
Rostislav Pehlivanov [Tue, 5 Dec 2017 02:03:15 +0000 (02:03 +0000)]
fate-opus: run and test inactive samples

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agox86/vf_hflip: use xor to zero initialize registers
James Almer [Thu, 7 Dec 2017 22:28:19 +0000 (19:28 -0300)]
x86/vf_hflip: use xor to zero initialize registers

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agox86/vf_hflip: don't load the width argument twice
James Almer [Thu, 7 Dec 2017 21:09:00 +0000 (18:09 -0300)]
x86/vf_hflip: don't load the width argument twice

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agolavc/libx265: mark disposable frames
John Stebbins [Wed, 6 Dec 2017 00:36:58 +0000 (16:36 -0800)]
lavc/libx265: mark disposable frames

Used by movenc to fill sdtp box

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/libx265 - Add named option to set profile
Gyan Doshi [Tue, 5 Dec 2017 07:47:53 +0000 (13:17 +0530)]
avcodec/libx265 - Add named option to set profile

Adds call to x265_param_apply_profile after x265_param_parse.
Added as private option since HEVC profiles other than
Main, Main 10 and MSP in AVCodecContext are consolidated in a single
constant.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Lou Logan <lou@lrcd.com>
2 years agoavcodec/diracdsp: Fix integer overflow in PUT_SIGNED_RECT_CLAMPED()
Michael Niedermayer [Sat, 2 Dec 2017 20:53:22 +0000 (21:53 +0100)]
avcodec/diracdsp: Fix integer overflow in PUT_SIGNED_RECT_CLAMPED()

Fixes: runtime error: signed integer overflow: 2147483646 + 2048 cannot be represented in type 'int'
Fixes: 4479/clusterfuzz-testcase-minimized-6529894147162112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/dirac_dwt: Fix integer overflows in COMPOSE_DAUB97*
Michael Niedermayer [Sat, 2 Dec 2017 20:48:04 +0000 (21:48 +0100)]
avcodec/dirac_dwt: Fix integer overflows in COMPOSE_DAUB97*

Fixes: 4478/clusterfuzz-testcase-minimized-4752113767809024
Fixes: runtime error: signed integer overflow: -2147483626 + -319489 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/mux: stop delaying writing the header
James Almer [Sun, 26 Nov 2017 19:47:26 +0000 (16:47 -0300)]
avformat/mux: stop delaying writing the header

Every bitstream filter behaves as intended now, so there's no need to
wait for the first packet of every stream.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/extract_extradata_bsf: Fix leak discovered via fuzzing
Nikolas Bowe [Tue, 5 Dec 2017 23:11:26 +0000 (15:11 -0800)]
avcodec/extract_extradata_bsf: Fix leak discovered via fuzzing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter: add setrange filter
Paul B Mahol [Sun, 3 Dec 2017 10:59:58 +0000 (11:59 +0100)]
avfilter: add setrange filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agotests/fate/mov: Fix fate-mov-invalid-elst-entry-count failure on ARM
Michael Niedermayer [Wed, 6 Dec 2017 00:03:28 +0000 (01:03 +0100)]
tests/fate/mov: Fix fate-mov-invalid-elst-entry-count failure on ARM

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agofate/hevc: add skip_loop_filter test
sfan5 [Tue, 5 Dec 2017 11:47:47 +0000 (12:47 +0100)]
fate/hevc: add skip_loop_filter test

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agodoc/developer: revise mailing list section
Jim DeLaHunt [Mon, 4 Dec 2017 07:09:02 +0000 (23:09 -0800)]
doc/developer: revise mailing list section

The Developer Documentation had instructions to
subscribe to the ffmpeg-cvslog email list. But that is
no longer accurate. For the purposes in this section --
review of patches, discussion of development issues --
ffmpeg_devel is the appropriate email list. Some developers
may want to monitor ffmpeg-cvslog, but it is not mandatory.

This is v3 of this doc, based on discussion in thread
<https://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/220528.html>
and in response to docs Maintainer comments in
<https://ffmpeg.org/pipermail/ffmpeg-devel/2017-December/221596.html>.

1. In doc/developer.texi, add a new section about
ffmpeg-devel, based on existing text from ffmpeg-cvslog
section regarding discussion of patches and of
development issues. Reflect wording from discussion at
<https://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/221199.html>
but with copy-editing to make wording more concise.

2. In doc/developer.texi, rewrite the ffmpeg-cvslog section
to match the current usage of ffmpeg-cvslog. Some
developers choose to follow this list, but it is not
mandatory.

There are a lot of improvements possible to the
Developer Documentation page, beyond this refactoring.
However, making those improvements is a much bigger
and more difficult task.  This change is "low hanging
fruit".

Signed-off-by: Jim DeLaHunt <from.ffmpeg-dev@jdlh.com>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2 years agovaapi_h265: Add named options for setting profile and level
Mark Thompson [Wed, 29 Nov 2017 21:31:53 +0000 (21:31 +0000)]
vaapi_h265: Add named options for setting profile and level

Also fixes the default, which previously contained a nonsense value.

2 years agovaapi_h264: Add named options for setting profile and level
Mark Thompson [Wed, 29 Nov 2017 21:31:11 +0000 (21:31 +0000)]
vaapi_h264: Add named options for setting profile and level

2 years agorkmpp: Add hardware config information
Mark Thompson [Fri, 1 Dec 2017 22:01:41 +0000 (22:01 +0000)]
rkmpp: Add hardware config information

This is not strictly required here because the rkmpp decoder does not
call ff_get_format(), but it may be helpful metadata for users.

2 years agoavfilter/vf_convolution: add 7x7 filter
Paul B Mahol [Mon, 4 Dec 2017 20:32:29 +0000 (21:32 +0100)]
avfilter/vf_convolution: add 7x7 filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agox86/vf_threshold: make threshold8 functions work on x86_32
James Almer [Mon, 4 Dec 2017 18:04:43 +0000 (15:04 -0300)]
x86/vf_threshold: make threshold8 functions work on x86_32

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agofate/checkasm: add missing target for vf_threshold test
James Almer [Mon, 4 Dec 2017 18:39:19 +0000 (15:39 -0300)]
fate/checkasm: add missing target for vf_threshold test

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agocheckasm/vf_threshold: fix mixed code and declarations
James Almer [Mon, 4 Dec 2017 18:26:34 +0000 (15:26 -0300)]
checkasm/vf_threshold: fix mixed code and declarations

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agolibavcodec/hevc_filter: support for all skip_loop_filter levels.
sfan5 [Thu, 30 Nov 2017 22:58:02 +0000 (23:58 +0100)]
libavcodec/hevc_filter: support for all skip_loop_filter levels.

Continues where commit 52c75d486ed5f75cbb79e5dbd07b7aef24f3071f left off.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/hlsenc: fix compiling error when disable-network
Steven Liu [Mon, 4 Dec 2017 15:52:17 +0000 (23:52 +0800)]
avformat/hlsenc: fix compiling error when disable-network

2 years agoavfilter/x86/vf_hflip.asm: fix building on x32
Paul B Mahol [Mon, 4 Dec 2017 14:08:43 +0000 (15:08 +0100)]
avfilter/x86/vf_hflip.asm: fix building on x32

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agofate-opus: update tests to use new decoder outputs
Rostislav Pehlivanov [Mon, 4 Dec 2017 10:50:23 +0000 (10:50 +0000)]
fate-opus: update tests to use new decoder outputs

Can't overwrite old ones.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoopus_pvq: do not compile encoding/decoding code if the encoder/decoder is disabled
Rostislav Pehlivanov [Mon, 4 Dec 2017 08:57:45 +0000 (08:57 +0000)]
opus_pvq: do not compile encoding/decoding code if the encoder/decoder is disabled

This should save quite a bit of space if either has been disabled for size reasons.
Could just check if the encoding flag is set during runtime on every single location,
however the overhead of branch misses would somewhat decrease performance.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoopus_celt: deduplicate band quantization/dequantization function
Rostislav Pehlivanov [Mon, 4 Dec 2017 08:55:45 +0000 (08:55 +0000)]
opus_celt: deduplicate band quantization/dequantization function

No point in having the same code twice to do exactly the same thing.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavfilter: add hflip x86 SIMD
Paul B Mahol [Fri, 1 Dec 2017 19:56:45 +0000 (20:56 +0100)]
avfilter: add hflip x86 SIMD

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agofate-opus: update to match the changes from RFC8251
Rostislav Pehlivanov [Mon, 4 Dec 2017 07:26:33 +0000 (07:26 +0000)]
fate-opus: update to match the changes from RFC8251

Also change note to say that we compare against the officially decoded
samples rather than our own, this was changed long ago.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoopus: add an option to toggle intensity stereo phase inversion
Rostislav Pehlivanov [Mon, 4 Dec 2017 06:36:42 +0000 (06:36 +0000)]
opus: add an option to toggle intensity stereo phase inversion

Due to a somewhat high volume of complains, phase inversion has
been made optional with RFC8251. This allows for better bass
frequency response when partially downmixing to play on systems
with an LFE speaker.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoopus: Add Special Hybrid Folding (per RFC8251)
Andrew D'Addesio [Sat, 2 Dec 2017 17:46:58 +0000 (11:46 -0600)]
opus: Add Special Hybrid Folding (per RFC8251)

This decoder-side change, introduced in RFC 8251 (section 9), slightly
improves the decoded quality of 16kbps speech in Hybrid Mode.

Differences can be seen/heard in testvector05.bit, testvector06.bit,
and testvector12.bit in the RFC 6716/8251 testvectors found here:
https://people.xiph.org/~greg/opus_testvectors/

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
2 years agoopus_celt: Fix arithmetic overflow (per RFC8251)
Andrew D'Addesio [Sat, 2 Dec 2017 17:36:25 +0000 (11:36 -0600)]
opus_celt: Fix arithmetic overflow (per RFC8251)

As per Sec.8 of RFC8251:
    Cap on Band Energy
    NaN due to large log-energy value. Affects celt_denormalize().

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
2 years agoopus_silk: Fix arithmetic overflow (per RFC8251)
Andrew D'Addesio [Sat, 2 Dec 2017 17:36:25 +0000 (11:36 -0600)]
opus_silk: Fix arithmetic overflow (per RFC8251)

As per Sec.6 of RFC8251:
    Integer Wrap-Around in Inverse Gain Computation
    32-bit integer overflow in Levinson recursion. Affects
    silk_is_lpc_stable().

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
2 years agolibavutil: Add saturating subtraction functions
Andrew D'Addesio [Sat, 2 Dec 2017 17:36:24 +0000 (11:36 -0600)]
libavutil: Add saturating subtraction functions

Add av_sat_sub32 and av_sat_dsub32 as the subtraction analogues to
av_sat_add32/av_sat_dadd32.

Also clarify the formulas for dadd32/dsub32.

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
2 years agox86vf_threshold/: use the PBLENDVB macro
James Almer [Mon, 4 Dec 2017 05:20:52 +0000 (02:20 -0300)]
x86vf_threshold/: use the PBLENDVB macro

Fixes building with yasm

Tested-by: stevenliu
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/dashenc: add avpriv_io_move return value check
Steven Liu [Mon, 4 Dec 2017 04:06:26 +0000 (12:06 +0800)]
avformat/dashenc: add avpriv_io_move return value check

fix cid: 1424883

Suggested-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoavformat/hlsplaylist: add return value check of strftime
Steven Liu [Mon, 4 Dec 2017 04:05:04 +0000 (12:05 +0800)]
avformat/hlsplaylist: add return value check of strftime

fix CID: 1424884
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoavformat/hlsplaylist: add int type of API ff_hls_write_file_entry
Steven Liu [Mon, 4 Dec 2017 04:03:37 +0000 (12:03 +0800)]
avformat/hlsplaylist: add int type of API ff_hls_write_file_entry

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoavformat/hlsenc: fix baseurl missing last char
Robert Nagy [Mon, 4 Dec 2017 04:00:13 +0000 (12:00 +0800)]
avformat/hlsenc: fix baseurl missing last char

Reviewed-by: Steven Liu <lq@onvideo.cn>
2 years agolavf/mov: Fix missing newline.
Carl Eugen Hoyos [Mon, 4 Dec 2017 03:15:49 +0000 (04:15 +0100)]
lavf/mov: Fix missing newline.

2 years agoavformat/mxfdec: fix last packet timestamps
Marton Balint [Thu, 23 Nov 2017 21:47:22 +0000 (22:47 +0100)]
avformat/mxfdec: fix last packet timestamps

The current edit unit cannot be reliably determined for the last packet of a
video stream, because we can't query the start offset of the next edit unit
from the index. This caused missing timestamps for the last video packet.

Therefore from now on, we allow setting the PTS even if we are not sure of the
current edit unit if mxf_set_current_edit_unit returned a specific failure, and
the assumed current edit unit is the last.

Fixes last packet timestamp of:
ffprobe -fflags nofillin -show_packets tests/data/lavf/lavf.mxf -select_streams v

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavfilter/x86/vf_threshold : cosmetic indent
Martin Vignali [Sun, 3 Dec 2017 16:04:38 +0000 (17:04 +0100)]
avfilter/x86/vf_threshold : cosmetic indent

2 years agoavfilter/x86/vf_threshold : add avx2 version for threshold 8
Martin Vignali [Sun, 3 Dec 2017 16:02:44 +0000 (17:02 +0100)]
avfilter/x86/vf_threshold : add avx2 version for threshold 8

2 years agoavfilter/x86/vf_threshold : make macro for threshold8 in order to add avx2 version
Martin Vignali [Sun, 3 Dec 2017 15:58:09 +0000 (16:58 +0100)]
avfilter/x86/vf_threshold : make macro for threshold8 in order to add avx2 version

2 years agocheckasm/vf_threshold : add checkasm test for threshold8
Martin Vignali [Sun, 3 Dec 2017 15:56:25 +0000 (16:56 +0100)]
checkasm/vf_threshold : add checkasm test for threshold8

2 years agoavfilter/vf_threshold : move context func init in ff_threshold_init
Martin Vignali [Sun, 3 Dec 2017 15:55:37 +0000 (16:55 +0100)]
avfilter/vf_threshold : move context func init in ff_threshold_init

2 years agodoc: reorganize developer.texi chapter hierarchy
Jim DeLaHunt [Sun, 26 Nov 2017 08:31:11 +0000 (00:31 -0800)]
doc: reorganize developer.texi chapter hierarchy

Previously, the Developer Documentation <ffmpeg.org/developer.html>
contained a single chapter, "1. Developer Guide," with all content under
that single chapter. Thus the document structure was one level deeper
and more complicated than it needed to be.  It differed from similar
documents such as /faq.html, which have multiple chapters.

Eliminate the single chapter, and promote each section underneath to
chapter, and each subsection to section. Thus content and relative
structure remains the same, but the overall structure is simpler.
Anchors within the page remain the same.

Signed-off-by: Jim DeLaHunt <from.ffmpeg-dev@jdlh.com>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2 years agoavcodec/h264_parse: Treat escaped and unescaped decoding error equal in decode_extrad...
Michael Niedermayer [Sat, 25 Nov 2017 21:21:16 +0000 (22:21 +0100)]
avcodec/h264_parse: Treat escaped and unescaped decoding error equal in decode_extradata_ps_mp4()

Fixes: lorex.mp4
Fixes: ticket6762

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/vf_stack: always copy SAR from first input
Paul B Mahol [Sat, 2 Dec 2017 22:29:49 +0000 (23:29 +0100)]
avfilter/vf_stack: always copy SAR from first input

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agolavf/movenc: add sdtp (sample dependency) box
John Stebbins [Sun, 19 Nov 2017 20:46:30 +0000 (12:46 -0800)]
lavf/movenc: add sdtp (sample dependency) box

The sdtp is required by the AppleTV 4K in order to play 2160p60 video.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/oggdec: Respect AVERROR codes returned by ogg parsers.
Dale Curtis [Tue, 28 Nov 2017 21:40:20 +0000 (13:40 -0800)]
avformat/oggdec: Respect AVERROR codes returned by ogg parsers.

Fixes ticket #6804. All of the ogg header and packet parsers may
return standard AVERROR codes; these return values should not be
treated as success.

Additionally changes oggparsevorbis, to not give up too early
with certain types of poorly muxed files.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavutil/mem: Add DECLARE_ASM_ALIGNED macro for DJGPP architecture.
Thomas Köppe [Tue, 14 Nov 2017 18:26:49 +0000 (18:26 +0000)]
avutil/mem: Add DECLARE_ASM_ALIGNED macro for DJGPP architecture.

The macro was added in 43171a2a738f5114768d34a7278e56e5fde714bc, but I forgot to add it to the DJGPP architecture in that change.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/x86/bswapdsp : use macro for 128 bits constants loading in xmm or ymm
Martin Vignali [Sat, 2 Dec 2017 17:22:32 +0000 (18:22 +0100)]
avcodec/x86/bswapdsp : use macro for 128 bits constants loading in xmm or ymm

2 years agoavutil/x86util : add macro for loading a 128 bits constants in an xmm or in each...
Martin Vignali [Sat, 2 Dec 2017 17:22:14 +0000 (18:22 +0100)]
avutil/x86util : add macro for loading a 128 bits constants in an xmm or in each part of an ymm in order to simplify avx2 asm func

2 years agoavfilter/vf_threshold: add x86 SIMD
Paul B Mahol [Sun, 12 Nov 2017 18:11:51 +0000 (19:11 +0100)]
avfilter/vf_threshold: add x86 SIMD

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/jpeg2000: Only allocate Jpeg2000Pass for the encoder
Michael Niedermayer [Thu, 30 Nov 2017 20:51:56 +0000 (21:51 +0100)]
avcodec/jpeg2000: Only allocate Jpeg2000Pass for the encoder

Reduces memory needed.
Fixes: OOM
Fixes: 4427/clusterfuzz-testcase-minimized-5106919271301120

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/j2kenc: Fix out of array access in encode_cblk()
Michael Niedermayer [Thu, 30 Nov 2017 22:42:04 +0000 (23:42 +0100)]
avcodec/j2kenc: Fix out of array access in encode_cblk()

Fixes: 4427/clusterfuzz-testcase-minimized-5106919271301120

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/hevcdsp_template: Fix undefined shift in put_hevc_epel_bi_w_h()
Michael Niedermayer [Thu, 30 Nov 2017 20:27:37 +0000 (21:27 +0100)]
avcodec/hevcdsp_template: Fix undefined shift in put_hevc_epel_bi_w_h()

Fixes: runtime error: left shift of negative value -127
Fixes: 4397/clusterfuzz-testcase-minimized-4779061080489984

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoexamples/vaapi_encode: Fix leak on hwframe init failure
Mark Thompson [Fri, 1 Dec 2017 21:06:42 +0000 (21:06 +0000)]
examples/vaapi_encode: Fix leak on hwframe init failure

Fixes CID #1424882.

2 years agomediacodecdec: fix build by including hwaccel.h
Jan Ekström [Fri, 1 Dec 2017 20:21:54 +0000 (22:21 +0200)]
mediacodecdec: fix build by including hwaccel.h

Enables the decoder to utilize the type AVCodecHWConfigInternal.

2 years agocheckasm/utvideo : be more explicit to the WIDTH_PADDED define
Martin Vignali [Tue, 21 Nov 2017 21:01:42 +0000 (22:01 +0100)]
checkasm/utvideo : be more explicit to the WIDTH_PADDED define

2 years agoavfilter: add fillborders filter
Paul B Mahol [Sat, 18 Nov 2017 17:18:39 +0000 (18:18 +0100)]
avfilter: add fillborders filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/vorbis: Fix another 1 << 31 > int32_t::max() with 1u.
Dale Curtis [Thu, 30 Nov 2017 20:20:36 +0000 (12:20 -0800)]
avcodec/vorbis: Fix another 1 << 31 > int32_t::max() with 1u.

Didn't notice this one when 9648cc6d was landed.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/vf_tile: add init_padding option
Paul B Mahol [Fri, 17 Nov 2017 20:33:37 +0000 (21:33 +0100)]
avfilter/vf_tile: add init_padding option

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/h264_slice: use H264_SEI_FpaType enum constants
James Almer [Fri, 1 Dec 2017 04:17:44 +0000 (01:17 -0300)]
avcodec/h264_slice: use H264_SEI_FpaType enum constants

Cosmetic change.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/h264_sei: remove redundant prefix to H264SEIFramePacking fields
James Almer [Fri, 1 Dec 2017 04:09:43 +0000 (01:09 -0300)]
avcodec/h264_sei: remove redundant prefix to H264SEIFramePacking fields

Cosmetic change.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoconfigure: Fix dependencies of aac_at decoder.
Jacob Trimble [Thu, 30 Nov 2017 22:58:59 +0000 (14:58 -0800)]
configure: Fix dependencies of aac_at decoder.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agolavf/mov: fix huge alloc in mov_read_ctts
John Stebbins [Sun, 26 Nov 2017 15:32:30 +0000 (07:32 -0800)]
lavf/mov: fix huge alloc in mov_read_ctts

An invalid file may cause huge alloc.  Delay expansion of ctts entries
until the number of samples is known in mov_build_index.

Fixes: 23

Found-by: zhao dongzhuo, AD-lab of Venustech
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavfi/libvmaf: Rename local variable "main" as "master".
Carl Eugen Hoyos [Thu, 30 Nov 2017 13:13:15 +0000 (14:13 +0100)]
lavfi/libvmaf: Rename local variable "main" as "master".

Fixes the following warning:
libavfilter/vf_libvmaf.c:179:14: warning: 'main' is usually a function

Missed in 5d3e9357

2 years agoconfigure: select vp9_superframe_split_bsf when enabling vp9_decoder
James Almer [Thu, 30 Nov 2017 04:51:16 +0000 (01:51 -0300)]
configure: select vp9_superframe_split_bsf when enabling vp9_decoder

This is required since a5679933c1b8b6bef5c5c3eb7c70d06c695066cf

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/avc: support writting more than one sps/pps in ff_isom_write_avcc
James Almer [Sat, 25 Nov 2017 01:36:22 +0000 (22:36 -0300)]
avformat/avc: support writting more than one sps/pps in ff_isom_write_avcc

Addresses ticket #6864

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/avc: free buffer in ff_isom_write_avcc on failure
James Almer [Fri, 24 Nov 2017 23:26:08 +0000 (20:26 -0300)]
avformat/avc: free buffer in ff_isom_write_avcc on failure

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/avc: reindent after the last commit
James Almer [Fri, 24 Nov 2017 22:47:47 +0000 (19:47 -0300)]
avformat/avc: reindent after the last commit

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/avc: refactor ff_isom_write_avcc
James Almer [Fri, 24 Nov 2017 22:45:54 +0000 (19:45 -0300)]
avformat/avc: refactor ff_isom_write_avcc

This lets us remove one indentation level.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/avc: return an error in ff_isom_write_avcc if the buffer lenght is too small
James Almer [Fri, 24 Nov 2017 22:42:50 +0000 (19:42 -0300)]
avformat/avc: return an error in ff_isom_write_avcc if the buffer lenght is too small

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/dashenc: Option to generate hls playlist as well
Karthick J [Thu, 30 Nov 2017 02:55:51 +0000 (10:55 +0800)]
avformat/dashenc: Option to generate hls playlist as well

This is to take full advantage of Common Media Application Format(CMAF).
Now server can generate one content and serve both HLS and DASH players.

Reviewed-by: Steven Liu <lq@onvideo.cn>
2 years agoavformat/hlsenc: Refactored 'get_int_from_double' function to allow reuse
Karthick J [Thu, 30 Nov 2017 02:54:54 +0000 (10:54 +0800)]
avformat/hlsenc: Refactored 'get_int_from_double' function to allow reuse

2 years agoavcodec/dnxhddec: Do not overwrite colorspace if the container has set it.
Steven Robertson [Wed, 29 Nov 2017 00:49:46 +0000 (16:49 -0800)]
avcodec/dnxhddec: Do not overwrite colorspace if the container has set it.

The existing logic overrides container metadata even in cases where the
container metadata must be trusted (e.g. HDR). The original spec had no
provision for specifying color volume, so many files rely on the
assumption of Rec. 709.

An update to the spec included a 'clv' field for explicitly signaling
that the container should be trusted in an existing bitfield in the
frame header, but the default of 0 from old encoders forces Rec. 709,
which would break any HDR stream. Because there is no place in DNxHR for
specifying a transfer function, DNxHR HDR files must include
container-level color information.

This patch maintains the existing behavior of choosing the 709 over the
601 matrix when container-level information is missing, and allows
container-level information to win if present.

Signed-off-by: Steven Robertson <steven@strobe.cc>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoMerge commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa'
James Almer [Thu, 30 Nov 2017 00:06:49 +0000 (21:06 -0300)]
Merge commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa'

* commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa':
  stereo3d: Support view type for frame sequence type

Merged-by: James Almer <jamrial@gmail.com>
2 years agoMerge commit '45d7be7f930cf707ead07416e10e2d0e061e99ce'
James Almer [Thu, 30 Nov 2017 00:06:23 +0000 (21:06 -0300)]
Merge commit '45d7be7f930cf707ead07416e10e2d0e061e99ce'

* commit '45d7be7f930cf707ead07416e10e2d0e061e99ce':
  prores: Always assume limited range

This commit is a noop, see 755207dc53d6d18a4a9e07ffb0d3a10f75836f79

Merged-by: James Almer <jamrial@gmail.com>
2 years agoMerge commit 'b843b343d8a3210ae37a2342b1904a5bd1e5fc6e'
James Almer [Thu, 30 Nov 2017 00:04:33 +0000 (21:04 -0300)]
Merge commit 'b843b343d8a3210ae37a2342b1904a5bd1e5fc6e'

* commit 'b843b343d8a3210ae37a2342b1904a5bd1e5fc6e':
  qsvenc: cavlc option is only available for h264

Merged-by: James Almer <jamrial@gmail.com>
2 years agoexamples/hw_decode: Use hw-config information to find pixfmt
Mark Thompson [Tue, 28 Nov 2017 13:58:31 +0000 (13:58 +0000)]
examples/hw_decode: Use hw-config information to find pixfmt

This removes all remaining device-type specificity.

2 years agolavc/samidec: properly raise errors from sami_paragraph_to_ass()
Clément Bœsch [Wed, 29 Nov 2017 21:23:36 +0000 (22:23 +0100)]
lavc/samidec: properly raise errors from sami_paragraph_to_ass()

2 years agoavcodec/samidec: check av_strdup() return value
Pan Bian [Mon, 27 Nov 2017 06:56:32 +0000 (14:56 +0800)]
avcodec/samidec: check av_strdup() return value

In function sami_paragraph_to_ass(), the return value of av_strdup() is
not checked. To avoid potential NULL dereference, the return value
should be checked against NULL.

Signed-off-by: Pan Bian <bianpan2016@163.com>
2 years agoavcodec/amfenc: move config.h include where it's needed
James Almer [Wed, 29 Nov 2017 17:24:08 +0000 (14:24 -0300)]
avcodec/amfenc: move config.h include where it's needed

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agovp9_parser: don't split superframes into separate packets
wm4 [Wed, 29 Nov 2017 16:07:26 +0000 (17:07 +0100)]
vp9_parser: don't split superframes into separate packets

We did this for the sake of the decoder. With the vp9 change, it's not
necessary anymore.

2 years agovp9: use superframe split BSF
wm4 [Fri, 17 Nov 2017 13:15:22 +0000 (14:15 +0100)]
vp9: use superframe split BSF

webm usually has invisible superframes merged with normal frames.
(vpxenc muxes them in this form, which is evidence enough that this is
the standard webm packet format. It's rather unclear whether ffmpeg is
even allowed to remux them with split packets.)

The vp9 decoder needs them to be in separate packets for multithreading
to work. Add the BSF to the decoder, so the conversion happens
automatically.

This contains the important part of fa1749dd34c55fb9, which
was apparently skipped in commit d417e95af76. This restores Libav API
compatibility.

2 years agoavformat/hlsplaylist: add missing header includes
James Almer [Wed, 29 Nov 2017 16:09:23 +0000 (13:09 -0300)]
avformat/hlsplaylist: add missing header includes

Fixes checkheaders.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/hlsplaylist: fix header include guard
James Almer [Wed, 29 Nov 2017 16:02:37 +0000 (13:02 -0300)]
avformat/hlsplaylist: fix header include guard

Fixes fate-source

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/hlsenc: Modularized playlist creation to allow reuse
Karthick J [Wed, 29 Nov 2017 11:44:15 +0000 (19:44 +0800)]
avformat/hlsenc: Modularized playlist creation to allow reuse

2 years agoavcodec/nvenc: set correct error code
Pan Bian [Mon, 27 Nov 2017 01:52:50 +0000 (09:52 +0800)]
avcodec/nvenc: set correct error code

In function process_output_surface(), the return value is 0 on the path
that av_mallocz() returns a NULL pointer. 0 indicates success, which
deviates from the fact. Return "AVERROR(ENOMEM)" instead of "0".

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agolibavformat/hlsenc: Persistent HTTP connections supported as an option
Jeyapal, Karthick [Wed, 29 Nov 2017 06:33:07 +0000 (14:33 +0800)]
libavformat/hlsenc: Persistent HTTP connections supported as an option

2 years agolibavformat/http: Handled multiple_requests option during write
Jeyapal, Karthick [Wed, 29 Nov 2017 06:32:16 +0000 (14:32 +0800)]
libavformat/http: Handled multiple_requests option during write

2 years agolibavformat/avio: Utility function to return URLContext
Jeyapal, Karthick [Wed, 29 Nov 2017 06:31:34 +0000 (14:31 +0800)]
libavformat/avio: Utility function to return URLContext

2 years agoDon't manipulate duration when it's AV_NOPTS_VALUE.
Dale Curtis [Tue, 28 Nov 2017 22:26:55 +0000 (14:26 -0800)]
Don't manipulate duration when it's AV_NOPTS_VALUE.

This leads to signed integer overflow.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/oggparseopus: Free opus extradata before reallocating.
Dale Curtis [Tue, 28 Nov 2017 21:44:49 +0000 (13:44 -0800)]
avformat/oggparseopus: Free opus extradata before reallocating.

Otherwise ff_alloc_extradata() just leaks any existing allocated
memory.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibvpxenc,vp9: add corpus-complexity option
James Zern [Tue, 21 Nov 2017 01:32:23 +0000 (17:32 -0800)]
libvpxenc,vp9: add corpus-complexity option

Corpus VBR mode is a variant of standard VBR where the complexity
distribution midpoint is passed in rather than calculated for a specific
clip or chunk.

The valid range is [0, 10000]. 0 (default) uses standard VBR.

Signed-off-by: James Zern <jzern@google.com>
2 years agoffmpeg_opt: Constify hwaccel pointer.
Carl Eugen Hoyos [Mon, 27 Nov 2017 22:54:33 +0000 (23:54 +0100)]
ffmpeg_opt: Constify hwaccel pointer.

Fixes a warning:
fftools/ffmpeg_opt.c:804:29: warning: assignment discards ‘const’ qualifier from pointer target type

2 years agoAdd HW H.264 and HEVC encoding for AMD GPUs based on AMF SDK
Mikhail Mironov [Mon, 27 Nov 2017 02:36:06 +0000 (21:36 -0500)]
Add HW H.264 and HEVC encoding for AMD GPUs based on AMF SDK

Requires AMF headers for at least version 1.4.4.1.

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agoexamples: Add a VA-API encode example.
Jun Zhao [Mon, 6 Nov 2017 06:45:27 +0000 (14:45 +0800)]
examples: Add a VA-API encode example.

Supports only raw NV12 input.

Example use:
./vaapi_encode 1920 1080 test.yuv test.h264

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agoChangelog: add VAAPI VP8 decoder
Mark Thompson [Tue, 28 Nov 2017 21:37:38 +0000 (21:37 +0000)]
Changelog: add VAAPI VP8 decoder