1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-07 11:13:41 +02:00
Commit Graph

85463 Commits

Author SHA1 Message Date
Ronald S. Bultje
1269cd5b6f pthread_frame: call update_context_from_user() after acquiring lock.
Otherwise the thread may still be in the middle of decoding a previous
frame, which would effectively trigger a race condition on any field
concurrently read and written.

In practice, this fixes tsan warnings like the following:

WARNING: ThreadSanitizer: data race (pid=17380)
  Write of size 4 at 0x7d64000160fc by main thread:
    #0 update_context_from_user src/libavcodec/pthread_frame.c:335 (ffmpeg+0x000000dca515)
[..]
  Previous read of size 4 at 0x7d64000160fc by thread T2 (mutexes: write M1821):
    #0 ff_thread_report_progress src/libavcodec/pthread_frame.c:565 (ffmpeg+0x000000dcb08a)
2017-04-03 09:48:53 -04:00
Ronald S. Bultje
76d8c77430 ffmpeg: make transcode_init_done atomic.
Should fix tsan warnings in fate-fifo-muxer-h264/wav:

WARNING: ThreadSanitizer: data race (pid=26552)
  Write of size 4 at 0x000001e0d7c0 by main thread:
    #0 transcode_init src/ffmpeg.c:3761 (ffmpeg+0x00000050ca1c)
[..]
  Previous read of size 4 at 0x000001e0d7c0 by thread T1:
    #0 decode_interrupt_cb src/ffmpeg.c:460 (ffmpeg+0x0000004fde19)
2017-04-03 09:38:10 -04:00
Ronald S. Bultje
467a053810 codec_desc: mark some lossless audio codecs as intraonly.
Fixes tsan warnings in several audio codecs (flac, alac, wavpack, tta
and tak) that look like this:

WARNING: ThreadSanitizer: data race (pid=14340)
  Read of size 4 at 0x7d64000169d8 by main thread (mutexes: write M1335):
    #0 update_context_from_thread src/libavcodec/pthread_frame.c:284 (ffmpeg+0x000000dc795f)
[..]
  Previous write of size 4 at 0x7d64000169d8 by thread T1 (mutexes: write M1333):
    #0 wavpack_decode_block src/libavcodec/wavpack.c:1012 (ffmpeg+0x00000112b175)
2017-04-03 09:36:32 -04:00
Ronald S. Bultje
e72690b18d h264: don't sync pic_id between threads.
This is how the ref list manager links bitstream IDs to H264Picture/Ref
objects, and is local to the producer thread. There is no need for the
consumer thread to know the bitstream IDs of its references in their
respective producer threads.

In practice, this fixes tsan warnings when running fate-h264:

WARNING: ThreadSanitizer: data race (pid=19295)
  Read of size 4 at 0x7dbc0000e614 by main thread (mutexes: write M1914):
    #0 ff_h264_ref_picture src/libavcodec/h264_picture.c:112 (ffmpeg+0x0000013b3709)
[..]
  Previous write of size 4 at 0x7dbc0000e614 by thread T2 (mutexes: write M1917):
    #0 build_def_list src/libavcodec/h264_refs.c:91 (ffmpeg+0x0000013b46cf)
2017-04-03 09:27:04 -04:00
Martin Vignali
4db2bfa63c fate : add test for exr with offset table set to 0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-03 03:02:50 +02:00
Martin Vignali
8163314967 libavcodec/exr : fix scanline offset table recreation on big endian
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-03 03:02:50 +02:00
Jun Zhao
08087f5462 lavc/vaapi_encode: fix p_per_i calculate issue.
now gop_size <= (max_b_frames + 1) * p_per_i + 1 (IDR frame),
so celing p_per_i = (gop_size - 1 + max_b_frames) / (max_b_frames + 1)

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Leilei <leilei.shang@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-04-02 23:28:54 +01:00
Mark Thompson
3cbf717425 Changelog: fix position of VAAPI MPEG-2/VP8 encode entry
This was merged in the wrong place.
2017-04-02 23:18:42 +01:00
James Almer
7ab9d3f341 Changelog: add missing entry for VP8 QSV decoder 2017-04-02 18:39:01 -03:00
James Almer
50e5949566 Changelog: add 3.3 2017-04-02 18:38:36 -03:00
Diego Biurrun
f8e29a3716 build: Add missing object dependency for extract_extradata bitstream filter
Cherry-picked from libav commit cfee5e1a0f

Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-02 16:09:23 -03:00
Michael Niedermayer
22b0daa1b3 Bump versions for master after 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-02 19:54:12 +02:00
Michael Niedermayer
e1cc7f83df Bump minor for 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-02 19:49:45 +02:00
James Almer
7942907878 compat/atomics: fix atomic_fetch_xor 2017-04-02 00:57:17 -03:00
James Almer
cbd2502939 avcodec/extract_extradata_bsf: make sure all parameter set NAL units were found for h264/hevc
Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-01 17:59:06 -03:00
Michael Niedermayer
23ae3cc822 avformat/oggparsedaala: Do not leave an invalid value in gpshift
Fixes: undefined behavior
Fixes: 702974

Found-by: Thomas Guilbert <tguilbert@google.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-01 22:09:23 +02:00
Michael Niedermayer
679a315424 avformat/oggparsedaala: Check duration for AV_NOPTS_VALUE
This avoids an integer overflow
the solution matches oggparsevorbis.c and 45581ed15d

Fixes: 700242

Found-by: Thomas Guilbert <tguilbert@google.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-01 22:09:23 +02:00
James Almer
5f23d8b405 fate: add bitexact sws_flags to hevc-extradata-reload
Makes the test output consistent across all targets.

Reviewed-by: nevcairiel
Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-01 13:39:49 -03:00
Hendrik Leppkes
5c612c5ff8 Merge commit 'e18ba2dfd2d19aedc8afccf011d5fd0833352423'
* commit 'e18ba2dfd2d19aedc8afccf011d5fd0833352423':
  hwcontext_dxva2: make sure the sw frame format is the right one during transfer

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2017-04-01 18:53:40 +02:00
Hendrik Leppkes
0f9ce9c5fc Merge commit '5a1d605ceae448b476a525f7368ec452000d1f26'
* commit '5a1d605ceae448b476a525f7368ec452000d1f26':
  hwcontext_dxva2: split transfer_data() into upload/download functions

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2017-04-01 18:53:36 +02:00
Hendrik Leppkes
fbfa72916c Merge commit '9d7026574bbbe67d004a1c32911da75375692967'
* commit '9d7026574bbbe67d004a1c32911da75375692967':
  hwcontext_dxva2: fix handling of the mapping flags

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2017-04-01 18:53:32 +02:00
Hendrik Leppkes
d91e7aac12 Merge commit '0d3176e32f351d18d6174d8b05796829a75a4c6b'
* commit '0d3176e32f351d18d6174d8b05796829a75a4c6b':
  hwcontext_dxva2: do not assume the destination format during mapping is always the right one

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2017-04-01 18:53:27 +02:00
Paul B Mahol
358d4524cc avcodec/dnxhdenc: fix indentation issue
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-04-01 18:51:18 +02:00
Paul B Mahol
f078bc4c5e avcodec/dnxhdenc: DNxHR 444 and HQX support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-04-01 18:46:40 +02:00
Clément Bœsch
507a85b93c Merge commit 'adb0e941c329a4778ade6dd0a326274472992f54'
* commit 'adb0e941c329a4778ade6dd0a326274472992f54':
  avpacket: Mark src pointer as constant

See 5bb3f88255

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 18:23:21 +02:00
Clément Bœsch
a3fc5f535a doc/libav-merge: document hlsenc encryption state 2017-04-01 18:21:34 +02:00
Clément Bœsch
edc43c571d Merge commit '0a4b9d0ccd10b3c39105f99bd320f696f69a75a2'
* commit '0a4b9d0ccd10b3c39105f99bd320f696f69a75a2':
  hlsenc: Add encryption support

This commit is a noop, see 907ac20aa2

Note that this commit differs from our encryption support in various
ways so it may need some adjustments in the future.

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 18:20:10 +02:00
Dzung Hoang
68e3c9a3b6 avcodec/exr: add support for scanline file where offsets are set to zero 2017-04-01 17:57:59 +02:00
Mark Thompson
75afad774b vf_deinterlace_vaapi: Mark as hwframe-aware
Commits ade370a4 and e3fb74f7 were reordered while merging, so this
change got lost.
2017-04-01 15:32:17 +01:00
Clément Bœsch
e66563aede Merge commit 'd860a3cc0a12360a92b9ffd179a0c34413beaf88'
* commit 'd860a3cc0a12360a92b9ffd179a0c34413beaf88':
  crypto: Add encryption support

See 00d4013d9f

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 15:45:32 +02:00
Clément Bœsch
c7173e5098 Merge commit '76167140a91c081a0cf9d0abcaa4da18d1bacadb'
* commit '76167140a91c081a0cf9d0abcaa4da18d1bacadb':
  qsvdec: Drop stray extra braces around initializer

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 15:15:19 +02:00
Clément Bœsch
a032c5224d Merge commit '715b8243460836fb7dd15bf7e41668e773beb276'
* commit '715b8243460836fb7dd15bf7e41668e773beb276':
  qsv: Drop some unused variables

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 15:14:31 +02:00
Takayuki 'January June' Suwa
e3d8963c3c avcodec/dsddec: correct for DSD silence bit-ordering
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-01 12:51:00 +02:00
Clément Bœsch
6200bf89a8 Merge commit 'bb265b764a055f2dc576b9aec62460d9580868f4'
* commit 'bb265b764a055f2dc576b9aec62460d9580868f4':
  examples/transcode_aac: Drop pointless return value const qualifier

This commit is a noop, the function doesn't exist in FFmpeg anymore
since e181e2909b.

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 12:46:09 +02:00
Clément Bœsch
e181e2909b doc/examples/transcode_aac: replace local get_error_text with av_err2str 2017-04-01 12:45:33 +02:00
Clément Bœsch
147c5ff11c Merge commit 'bfe92dfe60f601b3f20a918ffcc0acdf40a5955c'
* commit 'bfe92dfe60f601b3f20a918ffcc0acdf40a5955c':
  Ignore all generated example binaries

This commit is a noop, the .gitignore was updated during the merges of
these examples.

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 12:43:04 +02:00
Clément Bœsch
2b1a6b1ae3 Merge commit 'bf8646274b3ea2d9a193edfdbd70a3bb5c6dd74f'
* commit 'bf8646274b3ea2d9a193edfdbd70a3bb5c6dd74f':
  doc: Add note about recent regression in AviSynth+

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 12:41:42 +02:00
Clément Bœsch
f047da4ebe Merge commit '3cc3463f306f425f76bd962755df1132eeac6dfa'
* commit '3cc3463f306f425f76bd962755df1132eeac6dfa':
  avisynth: Support pix_fmts added to AviSynth+

This commit is mostly a noop, see
92916e8542.

Cosmetics and a small fix are merged.

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 12:16:45 +02:00
Clément Bœsch
2738b4cee0 Merge commit 'aaae59700f7fc10fd80cb93b38c5d109900872d9'
* commit 'aaae59700f7fc10fd80cb93b38c5d109900872d9':
  avisynth: Simplify the pix_fmt check for the newer AviSynth API

This commit is a noop, see 0ed5c3ce81

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 12:11:24 +02:00
Clément Bœsch
fb1a2cbae1 Merge commit 'bcefafa226dcda23d4d9af9601d19389cb918a5b'
* commit 'bcefafa226dcda23d4d9af9601d19389cb918a5b':
  avisynth: Fix setting stream timebase

This commit is a noop, see 8009a1f1fd

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 12:09:50 +02:00
Clément Bœsch
e83a1c5b7c Merge commit '481ff3cf018811ba3235f1c236e970f32a6300b9'
* commit '481ff3cf018811ba3235f1c236e970f32a6300b9':
  fate: Add h264 and hevc extradata reload tests

Only the HEVC part is merged, see 00c8079816

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 12:07:50 +02:00
Clément Bœsch
1ef8da77a5 Merge commit 'd5d62ce6d643de704e7bd62a2375e6391c0ffb9a'
* commit 'd5d62ce6d643de704e7bd62a2375e6391c0ffb9a':
  mov: Fix identity matrix boolean logic

This commit is a noop, see 7010ebdf1f

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 11:59:47 +02:00
Clément Bœsch
edfa7ac8ec Merge commit '81d7f0bbca837afda1f7e60d3ae52ab1360ab44b'
* commit '81d7f0bbca837afda1f7e60d3ae52ab1360ab44b':
  checkasm: vp9dsp: Benchmark the dc-only version of idct_idct separately

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 11:54:29 +02:00
Clément Bœsch
cdcdb7d32d Merge commit 'e7ae8f7a715843a5089d18e033afb3ee19ab3057'
* commit 'e7ae8f7a715843a5089d18e033afb3ee19ab3057':
  aarch64: vp9: loop filter: replace 'orr; cbn?z' with 'adds; b.{eq,ne};

This commit is a noop, see e7ae8f7a71

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 11:36:38 +02:00
Clément Bœsch
33b80adaab Merge commit 'd7595de0b25e7064fd9e06dea5d0425536cef6dc'
* commit 'd7595de0b25e7064fd9e06dea5d0425536cef6dc':
  aarch64: vp9: use alternative returns in the core loop filter function

This commit is a noop, see 62ea07d797

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 11:32:53 +02:00
Clément Bœsch
c1476219ca Merge commit 'e17567a831dede1f24e3a1a4c305a93012d7a8ce'
* commit 'e17567a831dede1f24e3a1a4c305a93012d7a8ce':
  libilbc: support for latest git of libilbc

This commit is a noop, see 59af5383c1

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 11:30:55 +02:00
Clément Bœsch
ab04d9bf63 Merge commit 'ffe89e1edb0281ff65d1bda88253784e9283b717'
* commit 'ffe89e1edb0281ff65d1bda88253784e9283b717':
  configure: Move mjpeg_vaapi_decoder dependency declarations to the right place

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 11:29:34 +02:00
Clément Bœsch
52e6fb9c59 Merge commit 'f7407f56cbf820a147bd77d728ac9a72c587cc56'
* commit 'f7407f56cbf820a147bd77d728ac9a72c587cc56':
  golomb: Replace __PRETTY_FUNCTION__ with __func__ for tracing

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 11:26:23 +02:00
Clément Bœsch
6516c62ec0 Merge commit 'fbd1f7639d0142c391bec85d1d840c835210843f'
* commit 'fbd1f7639d0142c391bec85d1d840c835210843f':
  af_asyncts: Use llabs instead of labs for 64-bit variable

This commit is a noop, see a8fe8d6b4a

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 11:25:37 +02:00
Clément Bœsch
e06b8b07d5 Merge commit 'e0b164576f7467b7b1127c18175e215dc1df011f'
* commit 'e0b164576f7467b7b1127c18175e215dc1df011f':
  qsv: Add VP8 decoder

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-01 11:21:02 +02:00