1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-12 19:18:44 +02:00
Commit Graph

34898 Commits

Author SHA1 Message Date
Michael Niedermayer
e5655a32bc avcodec/h264_cabac: Check decode_cabac_mb_mvd() for failure
Fixes harmless integer overflow
Fixes Ticket5150

No speedloss measured, actually its slightly faster, but please benchmark & double check this

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-14 21:09:07 +01:00
Timothy Gu
bcc223523e x86/vc1dsp: Port vc1_*_hor_16b_shift2 to NASM format
Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
2016-02-14 11:11:02 -08:00
Mark Reid
8395b6eeaa libavcodec/dnxhd_parser: add parser and probe support raw 444 and dnxhr formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-14 19:17:36 +01:00
Carl Eugen Hoyos
4c44972f99 avcodec: Fix a typo. 2016-02-14 16:14:08 +01:00
Andreas Cadhalpun
5edd1f62ca avcodec: only warn about hwaccel with frame threads
VLC uses hwaccel with frame threads and it works fine, but returning
an error here made it fail.

This regression was introduced in commit 31741ae.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>

Warning message text by nevcairiel

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-14 12:53:55 +01:00
Neil Birkbeck
3b0974d3ef lavc/hevc Parse SEI_TYPE_MASTERING_DISPLAY_INFO and propagate content into the AVMasteringDisplayMetadata side data.
Add support for parsing SEI_TYPE_MASTERING_DISPLAY_INFO and propagate contents into
the AVMasteringDisplayMetadata side data. Primaries are ordered in RGB order and
the values are converted to rationals ([0,1] for CEI 1931 Chroma coords,
and cd/m^2 for luma).

Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-14 00:36:05 +01:00
Ronald S. Bultje
5307adadeb vp9: only call ff_get_format on stream format changes.
In practice, this means we don't call it N times for N-threaded decoding.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 19:49:34 +01:00
Rostislav Pehlivanov
0fe0e213c0 aacenc: temporarily disable Mid/Side coding with multichannel files
Results in dropping out in channels, usually on EIGHT_SHORT windows.
Will be reenabled once the cause has been investigated and a fix has
been made.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-13 12:23:22 +00:00
Michael Niedermayer
588e2e3387 avcodec/h264: Fix memleak of a53_caption
Fixes Ticket5111

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 02:06:22 +01:00
Mats Peterson
4e5db87174 avcodec/rawdec: Print stride and packet size at debug level
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 01:22:38 +01:00
Mats Peterson
efcea77996 avcodec/rawdec: Fix nut pal8 test
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 01:21:12 +01:00
Mats Peterson
bbb45773b0 avcodec/rawdec: Initialize default mono palette only for bits_per_coded_sample == 1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-13 00:58:29 +01:00
Rostislav Pehlivanov
f0a8212436 aacenc: make a better estimate for the audio bitrate if not provided
Takes into account whether there's pairing and if there's an LFE channel.
An SCE has more bits than CPE/2 since IS and M/S save quite a lot of bits
when channels are paired. And most of the SCEs we have are in surround
layouts which map it to the center channel, which usually carries all of
the dialogue and compression artifacts there are easily audiable.

Also refactors the init function a little bit and labels some parts of it.

Fixes bug #5233

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-12 18:42:24 +00:00
James Almer
0abdf7030e avcodec/vc2enc_dwt: add missing header
Fixes make checkheaders

Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-12 02:06:05 -03:00
Michael Niedermayer
6973846618 avcodec/h264_slice: Fix dequant table init with field pictures
Fixes regression of Ticket4389

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-12 04:37:35 +01:00
Michael Niedermayer
873158fd76 avcodec/h264_slice: assert relation between current_slice ans slice_ctx
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-12 04:37:35 +01:00
Michael Niedermayer
6c6f2e49e4 avcodec/h264_slice: remove duplicate unconditional picture_structure setting code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-12 04:37:35 +01:00
Kieran Kunhya
1e2fd57fc0 avcodec/cfhd: Fix errors with valid files. 2016-02-12 01:00:20 +00:00
Michael Niedermayer
bbc4d069d0 avcodec/cfhd: Check the number of tag/value pairs
Fixes potentially long loop
Fixes: CID1351382/11

Reviewed-by: Kieran Kunhya <kieran@kunhya.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-12 01:52:44 +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
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
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
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
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
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
Michael Bradshaw
1c40bccc09 lavc/dirac_dwt: fix building without asm
clang needs HAVE_MMX to be first in order to avoid an undefined
reference error.
2016-02-06 01:14:19 +01:00
Henrik Gramner
aa751573fe avcodec/h264: Fix segfault in 4:2:2 chroma deblock with 32-bit msvc
Using rNm and x86inc's stack allocation with a negative value at the same
time isn't supported, and caused the original stack pointer to be clobbered
when using a compiler that doesn't support stack alignment.
2016-02-05 22:01:38 +01:00
James Darnley
7042a55c55 avcodec/h264: mmxext 4:2:2 chroma deblock/loop filter
2.6 times faster (366 vs. 142 cycles)
2016-02-05 17:26:04 +01:00
Mats Peterson
9556446623 lavc/rawdec: Use 16-byte line alignment for B1W0 and B0W1 video in nut
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-05 15:40:49 +01:00
James Almer
16af350ac5 avcodec/dcadsp: replace intptr_t with ptrdiff_t
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-02-05 11:17:04 -03:00
Hendrik Leppkes
a969a914f5 dca_parser: ensure frame duration matches the actual sample rate
The parser only parses the core, and thus has a duration relative
to the core sample rate only, not the actual stream sample rate.

FATE references changed due to now correct timestamps.
2016-02-04 12:16:19 +01:00
Michael Niedermayer
37db3e8931 avcodec/libutvideoenc: Add NULL termintor to options
Fixes segfaults

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-04 02:17:57 +01:00
Derek Buitenhuis
c4ef6c883b mjpegenc: Remove duplicate initializer
This was causing c99conv to crash.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-03 22:14:27 +00:00
Derek Buitenhuis
0ea716f70b libutvideo: Unbreak
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-03 19:27:24 +00:00
Rostislav Pehlivanov
f021030365 diradec: split tables away to a separate diractab file
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-03 17:19:33 +00:00
Rostislav Pehlivanov
3bbe7862ec diracdec: move the MAX_DWT_LEVELS macro to dirac.h
Used by the VC-2 encoder.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-03 17:19:30 +00:00
Derek Buitenhuis
730d2aabac Merge commit '0e9c4fe254073b209970df3e3cb84531bc388e99'
* commit '0e9c4fe254073b209970df3e3cb84531bc388e99':
  lavc: Move pre_me to codec private options

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-03 16:54:20 +00:00
Derek Buitenhuis
43c0298208 Merge commit '5b6f42da98c26a8aee8d2c2edfcbd0633ad1c607'
* commit '5b6f42da98c26a8aee8d2c2edfcbd0633ad1c607':
  lavc: Move me_penalty_compensation to codec private options

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-03 16:53:13 +00:00
Derek Buitenhuis
f3af379b5c Merge commit '2862b63783b5556f7f3fb2d097629bc6879f833a'
* commit '2862b63783b5556f7f3fb2d097629bc6879f833a':
  lavc: Move prediction_method to codec private options

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-03 16:49:19 +00:00