Commit Graph

78376 Commits

Author SHA1 Message Date
Timothy Gu
c8b1612af0 x86/vf_blend: Move multiplying to a macro
Reviewed-by: Paul B Mahol <onemda@gmail.com>
2016-02-10 11:25:11 -08:00
Paul B Mahol
5486d7fa91 avfilter/dualinput: use pts provided by framesync
This fixes stalled output pts when main stream ends.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-10 19:57:23 +01:00
Michael Niedermayer
a73b23e3df avformat/hlsenc: Fix filename and options
Regression since bc9a5965c8

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-10 19:14:53 +01:00
Rostislav Pehlivanov
5669aa2a8a vc2enc: use project-standard inclusion guards
This was first reported on the mailing list in an earlier revision of this
encoder but was forgotten from the final commit.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-10 18:02:35 +00:00
Rostislav Pehlivanov
135460383e avformat: add vc2 as an allowed rawenc Dirac extension
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-10 17:15:59 +00:00
Rostislav Pehlivanov
ec9e87c922 avcodec: add a native SMPTE VC-2 HQ encoder
This commit adds a new encoder capable of creating BBC/SMPTE Dirac/VC-2 HQ
profile files.

Dirac is a wavelet based codec created by the BBC a little more than 10
years ago. Since then, wavelets have mostly gone out of style as they
did not provide adequate encoding gains at lower bitrates. Dirac was a
fully featured video codec equipped with perceptual masking, support for
most popular pixel formats, interlacing, overlapped-block motion
compensation, and other features. It found new life after being stripped
of various features and standardized as the VC-2 codec by the SMPTE with
an extra profile, the HQ profile that this encoder supports, added.

The HQ profile was based off of the Low-Delay profile previously
existing in Dirac. The profile forbids DC prediction and arithmetic
coding to focus on high performance and low delay at higher bitrates.
The standard bitrates for this profile vary but generally 1:4
compression is expected (~525 Mbps vs the 2200 Mbps for uncompressed
1080p50). The codec only supports I-frames, hence the high bitrates.

The structure of this encoder is simple: do a DWT transform on the
entire image, split it into multiple slices (specified by the user) and
encode them in parallel. All of the slices are of the same size, making
rate control and threading very trivial. Although only in C, this encoder
is capable of 30 frames per second on an 4 core 8 threads Ivy Bridge.
A lookup table is used to encode most of the coefficients.

No code was used from the GSoC encoder from 2007 except for the 2
transform functions in diracenc_transforms.c. All other code was written
from scratch.

This encoder outperforms any other encoders in quality, usability and in
features. Other existing implementations do not support 4 level
transforms or 64x64 blocks (slices), which greatly increase compression.

As previously said, the codec is meant for broadcasting, hence support
for non-broadcasting image widths, heights, bit depths, aspect ratios,
etc. are limited by the "level". Although this codec supports a few
chroma subsamplings (420, 422, 444), signalling those is generally
outside the specifications of the level used (3) and the reference
decoder will outright refuse to read any image with such a flag
signalled (it only supports 1920x1080 yuv422p10). However, most
implementations will happily read files with alternate dimensions,
framerates and formats signalled.

Therefore, in order to encode files other than 1080p50 yuv422p10le, you
need to provide an "-strict -2" argument to the command line. The FFmpeg
decoder will happily read any files made with non-standard parameters,
dimensions and subsamplings, and so will other implementations. IMO this
should be "-strict -1", but I'll leave that up for discussion.

There are still plenty of stuff to implement, for instance 5 more
wavelet transforms are still in the specs and supported by the decoder.

The encoder can be lossless, given a high enough bitrate.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-10 17:15:59 +00:00
Rostislav Pehlivanov
4701be7198 options_table: update maximum bitrate limit
The type of the option has been changed but the limit was apparently forgotten.
Some video codes can handle bitrates of over ~2.2 Gbps (like VC-2).

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-10 17:15:59 +00:00
Michael Niedermayer
21b459e4bb avformat/segment: Fix header_filename handling
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-10 17:59:58 +01:00
Michael Niedermayer
23261e6001 sws/output: fix ordered dither threshold for mono output
This makes sure that white stays white and black black

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-10 17:22:26 +01:00
Derek Buitenhuis
bc9a5965c8 Merge commit '9f61abc8111c7c43f49ca012e957a108b9cc7610'
This also deprecates our old duplicated callbacks.

* commit '9f61abc8111c7c43f49ca012e957a108b9cc7610':
  lavf: allow custom IO for all files

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-10 14:42:41 +00:00
Michael Niedermayer
d94b11a721 ffmpeg_filter: Factor get_compliance_unofficial_pix_fmts() out
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-10 13:28:23 +01:00
Michael Niedermayer
82d2aa2b32 ffmpeg_filter: Add missing pixel formats to strict_std_compliance case for ljpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-10 13:28:23 +01:00
Michael Niedermayer
a82ff49bb8 ffmpeg_filter: Add YUV 444 to strict_std_compliance case for mjpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-10 13:28:23 +01:00
Paul B Mahol
408ea50ca6 avfilter/f_metadata: fix few logic errors
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-10 11:47:52 +01:00
Timothy Gu
5f1aad68c4 tests: Add test for proper header guard
Reviewed-by: Clément Bœsch <u@pkh.me>
2016-02-10 01:21:39 -08:00
Paul B Mahol
4ca8879d19 avfilter: add metadata filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-10 09:55:39 +01:00
Michael Niedermayer
674cc26f25 avfilter/vf_nnedi: Fix memleak
Fixes CID1351359

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-10 01:00:08 +01:00
Michael Niedermayer
331a33d74a nut: Add PAL8 support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-09 19:19:43 +01:00
Michael Niedermayer
43a6965569 avcodec/dirac: Fix memleak of dsh on error
Fixes CID1351360

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-09 14:59:36 +01:00
Thierry Foucu
020b75806f lavf/mov: Extend extracting XMP in mov files using UUID Box
The UUID is based on http://www.adobe.com/devnet/xmp.html

The patch is made according to XMP SPECIFICATION PART 3 - STORAGE IN
FILES See Table 8

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-09 01:31:15 +01:00
Timothy Gu
cb8646af24 configure: Enable GCC vectorization on ≥4.9 on x86
4.9 was released precisely nine years after the first GCC version with
autovectorizer (4.0) and six years after the first GCC version with
`-ftree-vectorize` default to enabled on `-O3` (4.3). We've given GCC
enough time to fix those bugs.

FATE passes here on a x86-64 machine with both GCC 4.9.2 and 5.3.1.

Some optimization hotspots benefit greatly from this change, especially
those without handwritten assembly. For instance, the main function in
vf_phase is now 1.6x faster (1.2x overall) on my machine.
2016-02-08 16:25:44 -08:00
Michael Niedermayer
8e46c7c1e7 avfilter/af_agate: fix memleak of out frame
Fixes CID1351358

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-08 22:51:32 +01:00
Timothy Gu
253209ac44 vf_blend: Add SSE2 optimization for multiply
5 times faster than C, 3 times overall.
2016-02-08 13:35:24 -08:00
Michael Niedermayer
a25c5dbb5e ffmpeg_opt: Fix memleaks in "manually set programs" loop
Fixes CID1351356, CID1351357

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-08 15:57:24 +01:00
Paul B Mahol
35d9441f7b avfilter/vf_swaprect: add timeline support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-08 15:43:09 +01:00
Michael Niedermayer
05924e1440 avfilter/af_anequalizer: Fix memleak of args
Fixes CID1351355

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-08 00:39:15 +01:00
Michael Niedermayer
e7786959cc avfilter/vaf_spectrumsynth: Move "break" up
Fixes CID1351347

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-07 23:03:33 +01:00
Paul B Mahol
6bdeac24e0 avfilter/af_aformat: remove deprecated syntax from options description
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-07 22:47:39 +01:00
James Almer
be22bd32fe x86/cpu: set avxslow cpuflag on btver2 CPUs
They are also slow when using 256 bit wide registers

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-07 16:39:21 -03:00
Paul B Mahol
ba618bde7f avfilter/vf_blend: add multiply128 mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-07 19:50:11 +01:00
Timothy Gu
0bcffc7924 diractab: Fix header guard name 2016-02-07 09:26:15 -08:00
Timothy Gu
59ebf32bca huffyuvencdsp: Undefine "i" macro after each use 2016-02-07 09:19:17 -08:00
Timothy Gu
32fed702b8 libvpxenc: Allow setting tune parameter 2016-02-07 09:12:46 -08:00
Timothy Gu
671761d713 diracdec: Pass DWTPlane to dwt init 2016-02-07 09:09:13 -08:00
Timothy Gu
e04912c0b6 diracdec: Split DWTPlane struct from Plane 2016-02-07 09:09:13 -08:00
Timothy Gu
58ded09bd1 dirac_dwt: Rename init2 to init
The functions are all private.
2016-02-07 09:09:13 -08:00
Timothy Gu
6cdde20beb dirac_dwt: Don't pass information in context as arguments 2016-02-07 09:09:13 -08:00
Clément Bœsch
6c0318c4ba lavfi/fieldmatch: fix fields copy when plane height is odd
Fixes Ticket 5187
2016-02-07 15:49:20 +01:00
Paul B Mahol
f5c3f85eb2 avfilter: add swaprect filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-07 12:51:43 +01:00
Michael Niedermayer
9ee4c89348 avcodec/utils: Add AV_PIX_FMT_GBRAP16?E to avcodec_align_dimensions2()
Found-by: kierank
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-07 01:13:36 +01:00
Michael Niedermayer
2272ab0e84 avformat/mp3enc: Assert that the header we assembled is valid
Silences: CID1351343

The header is calculated by the code above the changed hunk, it is
thus asserted that the header is always correct.

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-07 01:12:48 +01:00
Paul B Mahol
d12d48d0a8 avfilter: add streamselect and astreamselect filter
Signed-off-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-06 23:52:09 +01:00
Andreas Cadhalpun
14bf59c1d5 build: use intermediate lcov coverage file
Otherwise the 'lcov -q --remove' run fails with the following error:
lcov: ERROR: cannot write to coverage.info!

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-02-06 15:42:09 +01:00
Andreas Cadhalpun
bb7522ce67 build: fix lcov with src link
When out-of-tree builds now use a relative path, the '-b' option of lcov
is not needed, so just pass the current directory to it in this case.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-02-06 15:30:25 +01:00
Andreas Cadhalpun
e740c3fb90 configure: fall back to using full path if src is a directory
Or when building in-tree.
Also don't try to remove src on distclean in these cases.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-02-06 15:30:25 +01:00
Paul B Mahol
956fed377b cmdutils: realign for some additional filters with very long name
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-06 12:48:51 +01:00
James Almer
8ae7447941 x86/dcadec: add ff_lfe_fir0_float_{sse,sse2,avx,fma3}
Up to ~4 times faster on x86_64, ~8 times on x86_32 if compiling using x87 fp math.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-06 01:36:55 -03:00
James Almer
3e9b8ffc9b avcodec/dcadsp: rename lfe_fir_float functions
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-06 01:29:10 -03:00
Timothy Gu
9fd6ea933f dirac_dwt: Make x86 files/functions names consistent 2016-02-05 19:30:23 -08:00
Timothy Gu
17ab8f7e68 diracdsp: Make x86 files/functions names consistent 2016-02-05 19:29:43 -08:00