1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-21 11:44:12 +02:00
Commit Graph

36499 Commits

Author SHA1 Message Date
Michael Niedermayer
2bc66d9e43 nut: add gray12 support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 01:18:43 +01:00
Andreas Cadhalpun
226d35c845 escape124: reject codebook size 0
It causes a cb_depth of 32, leading to assertion failures in get_bits.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-09 21:10:59 +01:00
Tom Butterworth
0a24587588 avcodec/hap: pass texture-compression destination as argument, not in context
This allows a subsequent change to compress directly into the output packet when possible.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
2016-11-08 17:05:27 +00:00
Rostislav Pehlivanov
317be31eaf opus: move the entropy decoding functions to opus_rc.c
The intention is to have both encoding and decoding functions
in opus_rc.c.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-11-08 14:18:59 +00:00
Rostislav Pehlivanov
0660a09dd1 opus: move all tables to a separate file
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-11-08 14:18:59 +00:00
Rostislav Pehlivanov
0cf6853804 aacenc: quit when the audio queue reaches 0 rather than keeping track of empty frames
The libopus encoder does the same thing and its better than
keeping track of when the empty flush frames appear.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-11-08 00:50:51 +00:00
Andreas Cadhalpun
5249706e9d mpegaudio_parser: don't return AVERROR_PATCHWELCOME
The API does not allow returning AVERROR codes.

It triggers an assert in av_parser_parse2.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 19:41:17 +01:00
Andreas Cadhalpun
0747754622 mpeg4audio: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Also check for errors from avpriv_mpeg4audio_get_config in
ff_mp4_read_dec_config_descr.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun
bb6a7b6f75 lzf: update pointer p after realloc
This fixes heap-use-after-free detected by AddressSanitizer.

Reviewed-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-05 18:56:26 +01:00
Matt Oliver
6ead033bca avcodec/nvenc.c: Use new safe dlopen code.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2016-11-05 18:09:03 +11:00
James Almer
51e329918d avcodec/rawdec: check for side data before checking its size
Fixes valgrind warnings about usage of uninitialized values.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-04 23:38:56 -03:00
Andreas Cadhalpun
db79dedb1a diracdec: check return code of get_buffer_with_edge
If it fails, buffers aren't allocated, causing NULL pointer dereferencing.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-04 20:35:23 +01:00
Andreas Cadhalpun
24d20496d2 diracdec: clear slice_params_num_buf on allocation failure
Otherwise it can be non-zero next time decode_lowdelay is called, causing
slice_params_buf not to be allocated, leading to a NULL pointer dereference.

The problem was introduced in commit
dcad4677d6.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-04 20:34:51 +01:00
Andreas Cadhalpun
8a4ea96448 diracdec: use correct buffer for slice_params_buf realloc
This fixes a double-free detected by AddressSanitizer.

The problem was introduced in commit
dcad4677d6.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-04 20:34:38 +01:00
Tom Butterworth
92280f86b4 avcodec/hap: consistent name for codec
"Vidvox Hap", not "Vidvox Hap encoder" or "Vidvox Hap decoder". Fixes
bad name in "ffmpeg -codecs", matches other codec naming.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-11-04 11:19:47 -08:00
Anton Khirnov
fb240a6276 qsvenc: do not re-execute encoding on all positive status codes
It should only be done for DEVICE_BUSY/IN_EXECUTION

(cherry picked from commit 0956fd4606)
Fixes ticket #5924.
2016-11-04 18:56:01 +00:00
Derek Buitenhuis
8a8902f221 libx265: Add option to force IDR frames
This is in the same the same vein as c981b1145a.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-04 02:45:51 +01:00
Michael Niedermayer
cee1f4c069 avcodec/ac3dec: Check expacc
this is somewhat a magic number, which can be understood from reading section
"7.1.2 Exponent Strategy" of the ac3 specification, in short:
Three exponents each represented as number 0-4 are grouped together and
base-5 encoded, so the maximal correct value is 25*4 + 5*4 + 4 = 124.

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-03 22:05:46 +01:00
Vittorio Giovara
067910ed13 hevc: Move hevc_decode_extradata before frame decoding
Avoids a forward-declaration in the following commit.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-03 16:28:04 +01:00
Andreas Cadhalpun
3932ccc472 ppc: pixblockdsp: do unaligned block accesses correctly again
This was broken by the following Libav commit:
4c387c7 ppc: dsputil: do unaligned block accesses correctly

The following tests fail due to this:
fate-checkasm
fate-vsynth1-dnxhd-2k-hr-hq fate-vsynth1-dnxhd-edge1-hr
fate-vsynth1-dnxhd-edge2-hr fate-vsynth1-dnxhd-edge3-hr
fate-vsynth1-dnxhd-hr-sq-mov fate-vsynth1-dnxhd-hr-hq-mov
fate-vsynth2-dnxhd-2k-hr-hq fate-vsynth2-dnxhd-edge1-hr
fate-vsynth2-dnxhd-edge2-hr fate-vsynth2-dnxhd-edge3-hr
fate-vsynth2-dnxhd-hr-sq-mov fate-vsynth2-dnxhd-hr-hq-mov
fate-vsynth3-dnxhd-2k-hr-hq fate-vsynth3-dnxhd-edge1-hr
fate-vsynth3-dnxhd-edge2-hr fate-vsynth3-dnxhd-edge3-hr
fate-vsynth3-dnxhd-hr-sq-mov fate-vsynth3-dnxhd-hr-hq-mov

Fixes trac ticket #5508.

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-03 01:23:36 +01:00
Philip Langdale
d0a9af851e crystalhd: Update high level description
We don't need to document the horrible hacks that we removed.
2016-11-02 13:47:57 -07:00
Philip Langdale
a07c07e7aa crystalhd: Simplify output frame handling
The old code had to retain a partial frame across two calls in
the case of separate interlaced fields. Now, we know that we'll
get both fields within the same receive_frame call, and so we
don't need to manage the frame as private state any more.
2016-11-02 13:47:57 -07:00
Philip Langdale
3019b4f648 crystalhd: Loop for a frame internally where possible.
It's not possible to return EAGAIN when we've passed input EOF and are
in draining mode. If do return EAGAIN, we're saying there's no way to
get any more output - which isn't true in many cases.

So let's handled these cases in an internal loop as best we can.
2016-11-02 13:47:57 -07:00
Philip Langdale
0eb836942f crystalhd: Keep NOPTS_VALUE so we know it's not there. 2016-11-02 13:47:57 -07:00
Philip Langdale
13dbf77b81 crystalhd: Remove h.264 parser
Now that we don't need to do ridiculous things to work out if a
frame is interlaced or not, we don't need an extra h.264 parser.
2016-11-02 13:47:57 -07:00
Philip Langdale
89ba55dc0d crystalhd: We don't need the track the last picture number anymore
This was needed to detect an interlaced failure case that doesn't
happen with the new decode api.
2016-11-02 13:47:57 -07:00
Philip Langdale
badce88fdf crystalhd: Remove trust_interlaced heuristic
It seems that without all the other 1:1 heuristics, we don't have
a fundamental problem trusting the interlaced flag on output
pictures. That's a relief.
2016-11-02 13:47:57 -07:00
Philip Langdale
6cc390dd5a crystalhd: Revert back to letting hardware handle packed b-frames
I'm not sure why, but the mpeg4_unpack_bframes bsf is not
interacting well with seeking. Looking at the code, it should be
ok, with possibly one warning shown, but I see it getting stuck
for an extended period of time after a seek where a packed frame
is cached to be shown later.

So, I gave up on that and went back to making the old hardware
based path work. Turns out that it wasn't broken except that some
samples have a 6 byte drop packet which I wasn't accounting for.

Now it works again and seeks are good.
2016-11-02 13:47:57 -07:00
Philip Langdale
b5d714f493 crystalhd: Switch to new decode API and remove the insanity
The new decode API allows for m:n decode patterns, which is what
you need to use this hardware in a sane way. There are so many
situations where 1:1 doesn't happen naturally that it's a miracle
I got it working as well as I did.

With this change, we can throw all of the crazy heuristics and
sleeps(!) out, and things work correctly.
2016-11-02 13:47:30 -07:00
Philip Langdale
234d3cbf46 crystalhd: Fix up the missing first sample
Why on earth the hardware returns garbage for the first sample of
a decoded picture is anyone's guess. The simplest reasonable way
to patch it up is to copy the first sample of the second line. This
should result in the correct chroma values (because the data was
original 4:2:0 upsampled to 4:2:2) even if the luma is isn't.
2016-11-02 13:43:59 -07:00
Vittorio Giovara
271afd632f lavc: Add hevc main10 profile to ffmpeg cli
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-02 12:27:13 +01:00
Michael Niedermayer
37138338ff avcodec/sunrast: Fix input buffer pointer check
Fixes: out of array read
Fixes: poc.dat

Found-by: Bingchang, Liu @VARAS of IIE
Tested-by: bc L <l.bing.chang.bc@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-02 12:06:22 +01:00
Carl Eugen Hoyos
5a51ca2da7 lavc/hapenc: Use the correct printf length modifier for size_t arguments.
Fixes the following warning:
libavcodec/hapenc.c:122:20: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat]

Based on a patch by Diego Biurrun.
2016-11-02 01:55:40 +01:00
Michael Niedermayer
7ddfa0be62 avcodec/dnxhdenc: Fix alignment of edge_buf*
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-01 21:02:26 +01:00
Andreas Cadhalpun
e0c6b32046 apngdec: use side data to pass extradata to the decoder
Fixes remuxing apng streams coming from the apng demuxer.
This is a regression since 940b8908b9.

Found-by: James Almer <jamrial@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-01 18:49:28 +01:00
Adriano Pallavicino
6089c44a2a Fix build warnings due to misleading indentation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-01 17:44:10 +01:00
Andreas Cadhalpun
60178e78f2 interplayacm: increase bitstream buffer size by AV_INPUT_BUFFER_PADDING_SIZE
This fixes out-of-bounds reads by the bitstream reader.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-01 00:39:06 +01:00
Michael Niedermayer
140f48b90f avcodec/smc: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-31 23:20:47 +01:00
Michael Niedermayer
979bca5134 avcodec/tscc: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-31 23:20:47 +01:00
Michael Niedermayer
e167610794 avcodec/rscc: Fix constant
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-31 23:20:31 +01:00
Kyle Schwarz
5d54293668 avcodec/qsv: remove MFX_EXTBUFF_CODING_OPTION3
4th generation Intel CPUs don't support MFX_EXTBUFF_CODING_OPTION3.

This patch fixes bug #5324.
2016-10-31 19:23:40 +00:00
Mark Thompson
4e7a7a96cf qsvdec: Avoid probing with qsv decoders
Set the AV_CODEC_CAP_AVOID_PROBING flag on all of the qsv decoders.
2016-10-31 19:23:40 +00:00
Mark Thompson
1f26a231bb qsv: Merge libav implementation
Merged as-at libav 398f015, and therefore includes outstanding
skipped merges 04b17ff and 130e1f1.

All features not in libav are preserved, and no options change.
2016-10-31 19:23:40 +00:00
Mark Thompson
309fe16a12 mpegvideo: Return correct coded frame sizes from parser 2016-10-31 19:23:40 +00:00
Mark Thompson
0c559f7893 hevc: Return stream format information from parser 2016-10-31 19:23:40 +00:00
Mark Thompson
4df6605da7 vc1: Return stream format information from parser 2016-10-31 19:23:40 +00:00
Michael Niedermayer
5f0bc0215a avcodec/rawdec: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-31 01:19:16 +01:00
Michael Niedermayer
0f64b6cd22 avcodec/rscc: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-31 01:11:03 +01:00
Michael Niedermayer
161ccdaa06 avcodec/msvideo1: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-31 01:08:45 +01:00
Michael Niedermayer
16793504df avcodec/qpeg: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-31 00:36:12 +01:00