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

43086 Commits

Author SHA1 Message Date
Katerina Barone-Adesi
1389b4c18d idct8x8: Fix undefined negative shifts
The original code left-shifts negative values, which is undefined
in the C99 specification (the one used during normal Libav compilation).
This change multiplies by (1 << shift), which is functionally equivalent,
but has defined behavior.

With this change, fate-idct8x8 compiled with --fsanitize=undefined works.

Bug-Id: 686
2016-03-05 08:26:36 -05:00
Vittorio Giovara
e10b7ef2fe vdpau: Add missing deprecation guards 2016-03-05 08:23:18 -05:00
Vittorio Giovara
d40cb726d2 mov: Trim dref absolute path
Samples produced by Omneon (Harmonic) store external references with
paths ending with 0s. Such movs cannot be loaded properly since every
0 is converted to '/', to keep the same parsing code for dref type 2
and type 18: this makes the external reference point to a non-existing
direactory, rather than to the actual referenced file.

Add a brief trimming loop that drops all ending 0s before trying to
parse the external reference path.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-03-05 08:23:18 -05:00
wm4
0b6e5d6b32 avconv: remove sub-frame warning
It's not practical to keep this with the new decode API.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-05 09:10:10 +01:00
wm4
2e2f8534eb lavc: factor apply_param_change() AV_EF_EXPLODE handling
Remove the duplicated code for handling failure of apply_param_change().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-05 09:04:03 +01:00
wm4
7a6cf27714 lavu: improve documentation of some AVFrame functions
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-05 09:03:28 +01:00
Anton Khirnov
84b5dcf275 asfenc: remove an unused variable 2016-03-05 08:45:01 +01:00
Anton Khirnov
ff3db937ef asfenc: fix some possible integer overflows
Store the file duration in the same timebase it arrives (i.e.
milliseconds) and only convert it to the file duration units (100ns)
when it's actually written, thus simplifying some calculations. Also,
store the duration as unsigned, since it cannot be negative.

CC: libav-stable@libav.org
Bug-ID: CVE-2016-2326
2016-03-05 08:43:04 +01:00
Anton Khirnov
1ceb07eb31 avformat_find_stream_info: move duration guessing after updating codec parameters
This bitrate might not be known otherwise.

Bug-Id: 926
2016-03-04 08:26:34 +01:00
Diego Biurrun
11843ededa fate: Add separate target for all indeo3 tests 2016-03-01 21:54:10 +01:00
Vittorio Giovara
b39ab8549a fate: Add test for indeo2 with delta frames
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-03-01 21:54:08 +01:00
Luca Barbato
f8c34f4b8d indeo2: Fix banding artefacts
Rename luma table to delta table and change how it is used.

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-03-01 13:50:24 +01:00
Luca Barbato
d4066a7024 indeo2data: K&R formatting cosmetics
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-03-01 13:46:00 +01:00
Diego Biurrun
1a094af638 fft: Split MDCT bits off from FFT 2016-03-01 10:18:28 +01:00
Mark Harris
4d13bcceb9 sdp: fix opus sprop-stereo fmtp syntax
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-01 08:56:36 +02:00
Diego Biurrun
f6ccee9bed fate: fft: Split DCT/FFT/MDCT/RDFT tests into separate targets 2016-02-26 22:44:30 +01:00
Diego Biurrun
4c297249ac rdft: arm: Split RDFT initialization into a separate file 2016-02-26 14:34:58 +01:00
Diego Biurrun
97aec6e75e fft: arm: Drop unnecessary #include, add missing ones 2016-02-26 14:34:58 +01:00
Diego Biurrun
73ff983e8d fft: x86: cosmetics: Drop silly comments, add comment, whitespace 2016-02-26 14:34:58 +01:00
Luca Barbato
ce9d7da765 qsv: Move down the implementation query
The plugin loaded may not match the general implementation capability
wise.
2016-02-26 10:28:42 +01:00
Anton Khirnov
dbb43b8b83 avpacket: properly reset data/size in av_packet_move_ref()
It currently just calls av_init_packet(), which does not touch those
fields.
2016-02-26 09:15:36 +01:00
Anton Khirnov
ba357e9869 avprobe: switch to codecpar 2016-02-26 09:15:29 +01:00
Anton Khirnov
567d6d5f9d avprobe: add local per-stream state
This will be useful in the following commits.
2016-02-26 09:15:20 +01:00
Anton Khirnov
c9478410c6 avprobe: add local per-file state
Do not pass just a bare AVFormatContext pointer around, wrap it in
struct. This will be useful in the following commits.
2016-02-26 09:15:06 +01:00
Anton Khirnov
c80344d010 mpegvideo_enc: use avcodec_free_context() instead of av_free() 2016-02-26 09:14:59 +01:00
Anton Khirnov
168a443d43 avprobe: print information from the codec descriptor
avprobe is not doing any decoding, so this is more correct than printing
information from a random codec implementation.
2016-02-26 09:14:49 +01:00
Anton Khirnov
e7188a1a84 avprobe: remove a pointless condition and a dead branch
AVStream.codec is always non-NULL
2016-02-26 09:14:38 +01:00
Anton Khirnov
dc4983d78a APIchanges: add missing hashes and dates
Also, remove a stray line (apparently fallout from conflict resolution).
2016-02-26 09:14:13 +01:00
Anton Khirnov
3e8fd93b6a lavf: add a missing bump and APIchanges for the codecpar switch 2016-02-26 09:14:13 +01:00
Vittorio Giovara
e66fa35392 vc1dec: Check group allocations separatedly
This avoids accessing NULL pointers in case of error.
2016-02-25 15:21:42 -05:00
Vittorio Giovara
01f0e6a0c9 vc1dec: Fix leak on error for array allocations
The deinit function in the 'error' section will correctly free
everything.
2016-02-25 15:20:53 -05:00
Vittorio Giovara
f91d94bdfc vc1dec: Properly call deinit function on error 2016-02-25 15:20:24 -05:00
Vittorio Giovara
35b1cd343c vc1dec: Drop commented out cruft 2016-02-25 15:19:36 -05:00
Vittorio Giovara
fa55addd23 img2: Drop av_ prefix for a static function
This prefix is reserved for public functions only.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-02-24 13:56:46 -05:00
Diego Biurrun
d6e49096c0 idct: Only build prores IDCT if ProRes decoder is enabled 2016-02-24 11:41:01 +01:00
Anton Khirnov
3c53627ac1 qsvdec: store the sync point in heap memory
The reasoning is the same as for the corresponding qsvenc patch.
2016-02-24 10:41:45 +01:00
Maxym Dmytrychenko
a1335149fd qsvenc: store the sync point in heap memory
The QSV runtime expects the sync point address passed to
MFXVideoENCODE_EncodeFrameAsync() to be valid until
MFXVideoCORE_SyncOperation().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-02-24 10:14:40 +01:00
Anton Khirnov
1138eb5509 vsrc_movie: convert to codecpar 2016-02-24 10:08:37 +01:00
Anton Khirnov
ac6d53589f examples/transcode_aac: convert to codecpar 2016-02-24 10:08:34 +01:00
Anton Khirnov
a9e1f2cc61 examples/qsvdec: convert to codecpar 2016-02-24 10:08:30 +01:00
Anton Khirnov
9897d9f4e0 examples/output: convert to codecpar 2016-02-24 10:08:24 +01:00
Anton Khirnov
c23152a903 avplay: convert do codecpar 2016-02-24 10:05:43 +01:00
Anton Khirnov
0705f5960c avplay: do not use AVStream.codec for decoding
AVStream.codec is now deprecated. Allocate a separate codec context
instead.
2016-02-24 10:05:31 +01:00
Anton Khirnov
15e84ed3f1 avconv: convert to codecpar
The switch is not yet complete because the parsers and the bistream
filters do not have a new AVCodecParam-based API yet.
2016-02-23 17:01:58 +01:00
Anton Khirnov
5b9cdf8cba avconv: switch opening decoders and encoders
Open decoders first, next encoders. This makes sure that that
subtitle_header is always set properly, without relying on
avformat_find_stream_info() setting it.
2016-02-23 17:01:58 +01:00
Anton Khirnov
9200514ad8 lavf: replace AVStream.codec with AVStream.codecpar
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.

In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.

There are multiple important problems with this approach:
    - the fields in AVCodecContext are in general one of
        * stream parameters
        * codec options
        * codec state
      However, it's not clear which ones are which. It is consequently
      unclear which fields are a demuxer allowed to set or a muxer allowed to
      read. This leads to erratic behaviour depending on whether decoding or
      encoding is being performed or not (and whether it uses the AVStream
      embedded codec context).
    - various synchronization issues arising from the fact that the same
      context is used by several different APIs (muxers/demuxers,
      parsers, bitstream filters and encoders/decoders) simultaneously, with
      there being no clear rules for who can modify what and the different
      processes being typically delayed with respect to each other.
    - avformat_find_stream_info() making it necessary to support opening
      and closing a single codec context multiple times, thus
      complicating the semantics of freeing various allocated objects in the
      codec context.

Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
2016-02-23 17:01:58 +01:00
Anton Khirnov
a8068346e4 lavc: add a variant of av_get_audio_frame_duration working with AVCodecParameters 2016-02-23 17:01:58 +01:00
Anton Khirnov
998e1b8f52 lavc: add codec parameters API
This API is intended to allow passing around codec parameters without
using full AVCodecContext (which also contains codec options and
encoder/decoder state).
2016-02-23 17:01:58 +01:00
Diego Biurrun
257b30af8e x86: hevc: Fix linking with both yasm and optimizations disabled
Some optimized functions reference optimized symbols, so the functions
must be explicitly disabled when those symbols are unavailable.
2016-02-23 11:47:54 +01:00
Diego Biurrun
cd846b4797 fate: Ignore errors from concatenating report files
Some files may be missing for valid reasons, e.g. on compile failure.
2016-02-23 11:45:37 +01:00