1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

37568 Commits

Author SHA1 Message Date
Clément Bœsch
733b13ad66 Merge commit 'e4128c08d786eb5513578e8c6063671ba03226ab'
* commit 'e4128c08d786eb5513578e8c6063671ba03226ab':
  Revert "hevc: x86: Refactor IDCT macro declarations"

So apparently this was technically correct be reverted due to
authorship. Reverted as well in FFmpeg for now...

See http://lists.libav.org/pipermail/libav-devel/2016-October/079560.html

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-23 12:03:25 +01:00
Clément Bœsch
4bb4fa28e3 Merge commit '5801f9ed245ca5ebb57b0b5183de7a24aaece133'
* commit '5801f9ed245ca5ebb57b0b5183de7a24aaece133':
  h264_intrapred: x86: Update comments left behind in 95c89da36e

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-23 11:58:01 +01:00
Clément Bœsch
9954d5b44e Merge commit 'd9dccc03890a976dba59d66ed3b5aceeaa33d14c'
* commit 'd9dccc03890a976dba59d66ed3b5aceeaa33d14c':
  hevc: x86: Refactor IDCT macro declarations

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-23 11:54:53 +01:00
Clément Bœsch
5f044d2372 Merge commit 'c19830aa2c19f9713b612f7e2fdb437df91ba266'
* commit 'c19830aa2c19f9713b612f7e2fdb437df91ba266':
  rscc: Support palette format

See 11777eb814

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-23 11:33:27 +01:00
Clément Bœsch
7b3a3e6276 Merge commit 'b8d5070db6313f985562865edcfd08a01c2d7503'
* commit 'b8d5070db6313f985562865edcfd08a01c2d7503':
  avcodec: Document AV_PKT_DATA_PALETTE side data type

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-23 11:27:41 +01:00
wm4
7e4ba776a2 lavc: vdpau: Add support for new hw_frames_ctx and hw_device_ctx API
This supports retrieving the device from a provided hw_frames_ctx, and
automatically creating a hw_frames_ctx if hw_device_ctx is set.

The old API is not deprecated yet. The user can still use
av_vdpau_bind_context() (with or without setting hw_frames_ctx), or use
the API before that by allocating and setting hwaccel_context manually.

Cherry-picked from Libav commit 1a7ddba5.
(Adds missing APIchanges entry to the Libav version.)

Reviewed-by: Mark Thompson <sw@jkqxz.net>
2017-03-23 09:36:42 +01:00
wm4
156bd8278f lavc: Add hwaccel_flags field to AVCodecContext
This "reuses" the flags introduced for the av_vdpau_bind_context() API
function, and makes them available to all hwaccels. This does not affect
the current vdpau API, as av_vdpau_bind_context() should obviously
override the AVCodecContext.hwaccel_flags flags for the sake of
compatibility.

Cherry-picked from Libav commit 16a163b5.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
2017-03-23 09:34:21 +01:00
James Almer
30cadfe071 avcodec/lossless_videodsp: use ptrdiff_t for length parameters
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-22 18:38:35 -03:00
Mark Thompson
9560766a61 vaapi_vp9: Mark as async-safe 2017-03-22 19:07:32 +00:00
Mark Thompson
14c1101518 vaapi_hevc: Mark as async-safe 2017-03-22 19:07:32 +00:00
Mark Thompson
81b7deab82 vaapi: Implement device-only setup
In this case, the user only supplies a device and the frame context
is allocated internally by lavc.

(cherry picked from commit 5dd9a4b88b)
2017-03-22 19:07:32 +00:00
Diego Biurrun
6ff3da4f6a Place attribute_deprecated in the right position for struct declarations
libavcodec/vaapi.h:58:1: warning: attribute 'deprecated' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes]

(cherry picked from commit ed6a891c36)
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-03-22 19:07:32 +00:00
Clément Bœsch
e28bd75f7c lavc/hevc: use atomics for wpp_err 2017-03-22 18:38:27 +01:00
Rostislav Pehlivanov
38d7cc22f7 mdct15: fix left shift of a negative value
Should fix Chromium issue 704064.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-03-22 17:21:34 +00:00
Clément Bœsch
cf1c8a379e lavc/bitstream_filter: remove unused atomic.h include 2017-03-22 18:17:44 +01:00
Clément Bœsch
cb763a9ba8 lavc/bitstream: remove unused atomic.h include 2017-03-22 18:16:58 +01:00
Clément Bœsch
82d6179a88 Merge commit '8385ba53f115401a67a4748c0d107769ebfb2941'
* commit '8385ba53f115401a67a4748c0d107769ebfb2941':
  mmaldec: convert to stdatomic

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-22 18:01:51 +01:00
Clément Bœsch
af607b7e07 lavc/huffyuvdsp: only transmit the pix_fmt instead of the whole avctx
Only the pixel format is required in that init function. This will also
simplify the incoming merge.
2017-03-22 16:22:20 +01:00
Clément Bœsch
c7904af057 lavc/huffyuvdsp: remove unused ppc init prototype 2017-03-22 16:15:42 +01:00
Clément Bœsch
c66bd8f3ff Merge commit 'b57e38f52cc3f31a27105c28887d57cd6812c3eb'
* commit 'b57e38f52cc3f31a27105c28887d57cd6812c3eb':
  ac3dsp: x86: Replace inline asm for in-decoder downmixing with standalone asm

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-22 12:49:29 +01:00
Clément Bœsch
9dc57688c8 lavc/mips: temporally disable ac3 downmix 2017-03-22 11:46:13 +01:00
Clément Bœsch
fd5e1d132b Merge commit 'a9ba59591ed509fb7e6decfde8da4cbfd4ddf4b8'
* commit 'a9ba59591ed509fb7e6decfde8da4cbfd4ddf4b8':
  ac3dsp: Add some special-case handling for the C downmix function

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-22 11:30:53 +01:00
Clément Bœsch
e39d4ff150 Merge commit '43717469f9daa402f6acb48997255827a56034e9'
* commit '43717469f9daa402f6acb48997255827a56034e9':
  ac3dsp: Reverse matrix in/out order in downmix()

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-22 11:29:46 +01:00
James Almer
aee046a895 x86/audiodsp: remove an unnecessary movss 2017-03-22 00:14:56 -03:00
Marton Balint
5154650413 avcodec/avcodec.h: clarify decoupled decode/encode API docs
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-03-22 00:43:06 +01:00
Michael Niedermayer
423375d4f0 avcodec/wavpack: Check shift
Fixes: runtime error: shift exponent 255 is too large for 32-bit type 'unsigned int'
Fixes: 894/clusterfuzz-testcase-4841537823309824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-21 20:54:27 +01:00
Michael Niedermayer
b15818642b avcodec/mpegaudiodec_template: Fix 2 runtime error: signed integer overflow
Fixes: 873/clusterfuzz-testcase-5714546230558720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-21 20:52:08 +01:00
James Almer
9a0fbb9ca9 Merge commit '2caa93b813adc5dbb7771dfe615da826a2947d18'
* commit '2caa93b813adc5dbb7771dfe615da826a2947d18':
  mpegaudiodsp: Change type of array stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
2017-03-21 16:04:22 -03:00
James Almer
a0478341f3 Merge commit '15b4f494fc6bddb8178fdb5aed18b420efc75e22'
* commit '15b4f494fc6bddb8178fdb5aed18b420efc75e22':
  mss*: Change type of array stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
2017-03-21 15:57:07 -03:00
James Almer
b16752f694 Merge commit 'a339e919cad1ab0125948f0dd9d49f6cb590db89'
* commit 'a339e919cad1ab0125948f0dd9d49f6cb590db89':
  ea: Change type of array stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
2017-03-21 15:55:44 -03:00
James Almer
1e18548826 Merge commit 'ba479f3daafc7e4359ec1212164569ebe59f0bb7'
* commit 'ba479f3daafc7e4359ec1212164569ebe59f0bb7':
  hevc: Change type of array stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
2017-03-21 15:49:09 -03:00
James Almer
a8474df944 Merge commit 'e4a94d8b36c48d95a7d412c40d7b558422ff659c'
* commit 'e4a94d8b36c48d95a7d412c40d7b558422ff659c':
  h264chroma: Change type of stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
2017-03-21 15:20:45 -03:00
James Almer
5a49097b42 Merge commit '2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428'
* commit '2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428':
  idct: Change type of array stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
2017-03-21 14:29:52 -03:00
Alex Converse
2c8a3aa985 aacsbr: Turnoff in the event of over read.
Aliased compressed AAC bytes are almost certainly not meaningful SBR
data. In the wild this causes harsh artifacts switching HE-AAC streams
that don't have SBR headers aligned with segment boundaries.

Turning off SBR falls back to a default set of upsampling parameters
that can function as a sort of error concealment. This is consistent
with how the decoder handles other sorts of errors.
2017-03-21 09:38:36 -07:00
Clément Bœsch
6d11b2f656 Merge commit 'b2939a75270bc7e971462648168aa3a2a48c1c8c'
* commit 'b2939a75270bc7e971462648168aa3a2a48c1c8c':
  blockdsp: Change type of array stride parameters to ptrdiff_t

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 15:19:17 +01:00
Clément Bœsch
6eb75e7d59 Merge commit '3281d823cdc7601c4900eb103958c05f59f65555'
* commit '3281d823cdc7601c4900eb103958c05f59f65555':
  intrax8: Change type of array stride parameters to ptrdiff_t

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 15:13:36 +01:00
Clément Bœsch
51b5672f49 Merge commit '92c5755a185086067fe49e7e64c23a8e7011be31'
* commit '92c5755a185086067fe49e7e64c23a8e7011be31':
  hpeldsp: arm: Update comments left behind in 25841dfe80

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 15:10:46 +01:00
Clément Bœsch
f54da138e9 Merge commit '009adfd4fbdd78a890a4a65d6f141c467bb027fa'
* commit '009adfd4fbdd78a890a4a65d6f141c467bb027fa':
  x86: fpel: Remove unnecessary sign extend

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 15:02:31 +01:00
Clément Bœsch
5dfe343d96 Merge commit '7bf8db4db61eb09fac00eb665d8ec58de8817da6'
* commit '7bf8db4db61eb09fac00eb665d8ec58de8817da6':
  tdsc: use the new decoding API

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 14:44:44 +01:00
Clément Bœsch
ad98af27f7 Merge commit 'de2ae3c1fae5a2eb539b9abd7bc2a9ca8c286ff0'
* commit 'de2ae3c1fae5a2eb539b9abd7bc2a9ca8c286ff0':
  lavc: add clobber tests for the new encoding/decoding API

The merge only re-order what we already have.

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 14:43:53 +01:00
Clément Bœsch
e6be531a30 Merge commit '68811a41c70f019bde6df2a4f289674228c48958'
* commit '68811a41c70f019bde6df2a4f289674228c48958':
  mpegvideo_enc: use the new encoding API for b_strategy=2

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 13:01:46 +01:00
Clément Bœsch
b2cb9191ea Merge commit 'f03f78bc1c99b1e29624418e2f7315b8a47981e9'
* commit 'f03f78bc1c99b1e29624418e2f7315b8a47981e9':
  mpegvideo_enc: handle encoding errors with b_strategy=2

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 12:57:02 +01:00
Clément Bœsch
70ca9b76e2 Merge commit '6f733ecab6faff2a16534f2ce7d2ffd41c07846b'
* commit '6f733ecab6faff2a16534f2ce7d2ffd41c07846b':
  mpegvideo_enc: add const to the AVCodec instance

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21 12:55:40 +01:00
Clément Bœsch
6476bb84bc lavc/hwaccel: fix header copyright
It was done on a whim because of the FATE header check and was actually
meant to be removed before pushing.

Also, nobody in review spotted it.

Reviewed-by: wm4
2017-03-21 12:38:20 +01:00
Diego Biurrun
b4da4307a9 avcodec/fmvc: small refactoring in decode_type1()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-21 11:46:43 +01:00
wm4
66963d4b8d avcodec: remove warning against using frame threading with hwaccels
libavcodec now automatically serializes decoding for hwaccels which
are not thread-safe. This means API users, which rely on the libavcodec
native software fallback mechanism, can now simply enable threading
without running into problems.
2017-03-21 06:17:43 +01:00
wm4
2e5c52896b pthread_frame: remove some dead code
Whatever it was supposed to do.
2017-03-21 06:17:43 +01:00
Anton Khirnov
e0cd598bc4 pthread_frame: do not run hwaccel decoding asynchronously unless it's safe
Certain hardware decoding APIs are not guaranteed to be thread-safe, so
having the user access decoded hardware surfaces while the decoder is
running in another thread can cause failures (this is mainly known to
happen with DXVA2).

For such hwaccels, only allow the decoding thread to run while the user
is inside a lavc decode call (avcodec_send_packet/receive_frame).

Merges Libav commit d4a91e65.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-21 06:17:28 +01:00
Anton Khirnov
14bb15bfd5 pthread_frame: ensure the threads don't run simultaneously with hwaccel
Merges Libav commit 8dfba25c.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-03-21 06:16:49 +01:00
Wan-Teh Chang
c358c62550 pthread_frame: use better memory orders for frame progress
This improves commit 59c7022740.

In ff_thread_report_progress(), the fast code path can load
progress[field] with the relaxed memory order, and the slow code path
can store progress[field] with the release memory order. These changes
are mainly intended to avoid confusion when one inspects the source code.
They are unlikely to have measurable performance improvement.

ff_thread_report_progress() and ff_thread_await_progress() form a pair.
ff_thread_await_progress() reads progress[field] with the acquire memory
order (in the fast code path). Therefore, one expects to see
ff_thread_report_progress() write progress[field] with the matching
release memory order.

In the fast code path in ff_thread_report_progress(), the atomic load of
progress[field] doesn't need the acquire memory order because the
calling thread is trying to make the data it just decoded visible to the
other threads, rather than trying to read the data decoded by other
threads.

In ff_thread_get_buffer(), initialize progress[0] and progress[1] using
atomic_init().

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Merges Libav commit 343e2833.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-03-21 06:16:49 +01:00