1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-08 00:45:34 +02:00
Commit Graph

36480 Commits

Author SHA1 Message Date
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
Michael Niedermayer
7d196f2a5a avcodec/qtrle: Check side data size before use
Fixes out of array read

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-31 00:19:02 +01:00
Philip Langdale
21b68cdbae avcodec/cuvid: Don't claim to decode h.263 (it doesn't)
Turns out cuvid doesn't support h.263.
2016-10-30 15:47:37 -07:00
Andreas Cadhalpun
5540d6c134 interplayacm: validate number of channels
The number of channels is used as divisor in decode_frame, so it must
not be zero to avoid SIGFPE crashes.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-30 22:38:23 +01:00
Andreas Cadhalpun
14e4e26559 interplayacm: check for too large b
This fixes out-of-bounds reads.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-30 22:38:03 +01:00
Michael Niedermayer
2d99101d09 avcodec/kmvc: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-30 15:38:44 +01:00
Michael Niedermayer
a2b8dde659 avcodec/idcinvideo: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-30 15:38:44 +01:00
Michael Niedermayer
121be31060 avcodec/cinepak: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-30 14:15:00 +01:00
Michael Niedermayer
042faa847f avcodec/8bps: Check side data size before use
Fixes out of array read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-30 14:15:00 +01:00
Andreas Cadhalpun
1e660fe88d doc: fix spelling errors
Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-29 20:43:15 +02:00
Philip Langdale
7c27da686c crystalhd: Reorder mspeg4 decoder after software decoders
This avoids it getting picked by default, which is generally
undesirable and can break test runs.
2016-10-28 19:57:36 -07:00
Andreas Cadhalpun
940b8908b9 apng: use side data to pass extradata to muxer
This fixes creating apng files, which is broken since commit
5ef1959080.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-28 01:53:52 +02:00
James Almer
bf709098c9 avcodec: remove missing incompatible_libav_abi references
Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-26 17:36:12 -03:00
Michael Niedermayer
1609935b6c Bump minor versions after 3.2 branchpoint to seperate release
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Michael Niedermayer
3f3025205f Bump minor versions for 3.2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Michael Niedermayer
c92f55847a avcodec/dvdsubdec: Fix off by 1 error
Fixes out of array read

Found-by: Thomas Garnier using libFuzzer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 19:50:53 +02:00
Michael Niedermayer
25ab1a65f3 avcodec/dvdsubdec: Fix buf_size check
Fixes out of array access

Found-by: Thomas Garnier using libFuzzer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 18:46:10 +02:00
Carl Eugen Hoyos
134233972e lavc/utvideoenc: Set bits_per_coded_sample for rgba.
Allows to write correct value for biBitCount into BITMAPINFOHEADER.
Before, ff_put_bmp_header() always wrote "24" as biBitCount
for utvideo because bits_per_coded_sample was never set by the
encoder.
2016-10-25 13:44:08 +02:00
Michael Niedermayer
85d23e5cbc avcodec/interplayvideo: Check side data size before use
Fixes out of array read

Found-by: Thomas Garnier using libFuzzer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-25 04:46:02 +02:00