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

33812 Commits

Author SHA1 Message Date
Ronald S. Bultje
ce78729033 vp9: don't keep a stack pointer if we don't need it.
This saves one register in a few cases on 32bit builds with unaligned
stack (e.g. MSVC), making the code slightly easier to maintain.

(Can someone please test this on 32bit+msvc and confirm make fate-vp9
and tests/checkasm/checkasm still work after this patch?)
2015-10-07 08:55:19 -04:00
Ganesh Ajjanagadde
b3b6665c60 avcodec/libx264: silence -Waddress
This patch moves the pointer validity check outside the macro,
and silences the -Waddress observed with GCC 5.2.

Note that this changes the error message slightly, from:
"bad option..." to "Error parsing option...".

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-07 08:55:18 -04:00
Michael Niedermayer
a852db796e avcodec/pngenc: Check that there is at least 1 frame
Fixes null pointer dereference
Fixes CID1322330

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-07 04:50:16 +02:00
Michael Niedermayer
e96ecaf053 avcodec/pngenc: Initialize fctl_chunk to 0
The structure is copied around and that triggers warnings if it is uninitialized
Fixes CID1322360

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-07 02:49:34 +02:00
James Almer
72254b19b8 x86/alacdsp: add simd optimized functions
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-06 20:22:00 -03:00
Ronald S. Bultje
cb912b4521 vp9: fix msvc build by using 6 GPRs on 32bit if stack!=aligned. 2015-10-05 16:51:05 -04:00
Jeremy James
6f1ccca4ae dnxhd: add better support for CIDs 1270 to 1274
These are DNxHR profiles with the following properties:
- Variable size in a profile (property added in a previous commit),
  requiring variable-sized macroblock table;
- Variable bitdepth, up to 12 bits.
- Better validation of buffer sizes and positions

Signed-off-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05 13:08:20 +02:00
Christophe Gisquet
66db504f03 dnxhd: add CID 1270
This a 4:4:4 10 bits profile, where image size is not fixed by the
profile, and which strays a bit outside the old frame header parsing
code.

Fixes ticket #4581 (DNxHR is not stricly supported, but that sequence is).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05 12:58:40 +02:00
Jeremy James
118a3cd2c5 dnxhd: add decoder support for DNxHR
Signed-off-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05 12:44:10 +02:00
Christophe Gisquet
1f4ff53aea dnxhddec: Introduce DNXHD_VARIABLE
Currently not used, but will be used to indicate that a CIDEntry field
is not set, because it is variable, and that checks should be adapted.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05 12:44:00 +02:00
Christophe Gisquet
52256860d6 dnxhdenc: do not select 4:4:4 profiles
The encoder can only deal with 4:2:2.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05 12:27:15 +02:00
Christophe Gisquet
4e7cba1d8a dnxhd: profile flags
Move the 'interlaced' flag to this element (arbitrarily set to 16bits).
This should allow better detection/selection of profiles.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05 12:26:54 +02:00
Christophe Gisquet
9139a7e84f dnxhddec: cleanup frame header parsing
Rely more on the actual syntax from the specs (also seen in the
encoder code).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05 12:26:30 +02:00
Michael Niedermayer
c0152ebb9e avcodec/mmaldec: Use av_assert0() instead of assert()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05 12:04:40 +02:00
Hendrik Leppkes
329a0e419e Merge commit '39f01e346cab464ef6c0d4ec58cc13b7123e60d8'
* commit '39f01e346cab464ef6c0d4ec58cc13b7123e60d8':
  mmaldec: be more tolerant against MMAL not returning decoded output

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05 11:34:11 +02:00
Hendrik Leppkes
827d4b7942 Merge commit '65db4899fa8790049bec3af16ecdb75dd81051fd'
* commit '65db4899fa8790049bec3af16ecdb75dd81051fd':
  mmaldec: refactor to have more context per MMAL input buffer

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05 11:34:04 +02:00
Hendrik Leppkes
cae02106b7 Merge commit 'abe9adfb31566c415fd830a8d4977c79512d4385'
* commit 'abe9adfb31566c415fd830a8d4977c79512d4385':
  rangecoder: Use AV_RB16 instead of bytestream_get_be16

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05 11:30:53 +02:00
Hendrik Leppkes
78d9658a4d Merge commit '4628443ca3534060888dd0015b229337eac13fd2'
* commit '4628443ca3534060888dd0015b229337eac13fd2':
  h263: Drop uninitialized variable use from log message

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05 11:27:07 +02:00
Hendrik Leppkes
fbd71bba85 Merge commit '1da2a20763ae9ca579d5fd20763065871ddf6311'
* commit '1da2a20763ae9ca579d5fd20763065871ddf6311':
  dvbsubdec: Fix function return type

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05 11:25:40 +02:00
Hendrik Leppkes
d0186a4ec4 Merge commit 'cab63a8b594cdc365bb2581a12b3ac8e6dd480b2'
* commit 'cab63a8b594cdc365bb2581a12b3ac8e6dd480b2':
  dv: Mark internal frame reference as const

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05 11:21:23 +02:00
Hendrik Leppkes
0cd8170dd2 Merge commit 'bb198c4997d5036f3bf91de51e44f807115677d0'
* commit 'bb198c4997d5036f3bf91de51e44f807115677d0':
  d3d11va: make av_d3d11va_alloc_context() available at all times

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05 11:18:31 +02:00
Hendrik Leppkes
ac830e9b48 Merge commit 'f3202871598f59b570b31b01cfeb64b8fedbd700'
* commit 'f3202871598f59b570b31b01cfeb64b8fedbd700':
  d3d11va: check for malloc failure

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05 11:18:08 +02:00
Michael Niedermayer
46f3015f35 avcodec/tta: Un-break build without threads
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-04 23:07:44 +02:00
wm4
39f01e346c mmaldec: be more tolerant against MMAL not returning decoded output
In some situations, MMAL won't return a decoded frame for certain input
frames. This can happen if a frame fails to decode, or if a packet does
not actually contain a complete frame. In these situations, we would
deadlock (or actually timeout) waiting for an expected output frame,
which is not ideal. On the other hand, there are situations where we
definitely have to block to avoid deadlocks. (This mess is a
consequence of trying to map MMAL's asynchronous and flexible
dataflow to libavcodec, which is more static and rigid.)

Solve this by doing a blocking wait only if the amount of buffered data
is too big. The whole purpose of the blocking wait is to avoid excessive
buffering of input data, so we can skip it if it appears to be low. The
consequence is that libavcodec can gracefully return no frame to the
API user.

We want to track the number of full packets to make our heuristic work.
But MMAL buffers are fixed-size, requiring splitting large packets. This
is why the previous commit is needed. We use the ..._FRAME_END flag to
remember packet boundaries, but MMAL does not preserve these buffer
flags when returning buffers to the user.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-04 19:34:04 +02:00
wm4
65db4899fa mmaldec: refactor to have more context per MMAL input buffer
The next commit needs 1 bit of additional information per MMAL buffer
sent to the MMAL input port. This information will be needed when the
buffer is recycled (i.e. returned by the input port's callback).
Normally, we could use MMAL_BUFFER_HEADER_FLAG_USER0, but that is
unexpectedly not preserved.

Do this by storing a pointer to FFBufferEntry in the MMAL buffer's
user data, instead of an AVBufferRef. This also changes the lifetime
of FFBufferEntry.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-04 19:34:04 +02:00
James Almer
b70566d6ca avcodec/alacdec: split off decorrelate_stereo and append_extra_bits as alacdsp
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-04 14:10:05 -03:00
Ganesh Ajjanagadde
2cbaa078d1 avcodec: use HAVE_THREADS header guards to silence -Wunused-function
When compiled with --disable-pthreads, e.g
http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7,
a bunch of -Wunused-functions are reported due to missing header guards
around threading related functions.
This patch should silence such warnings.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-04 12:47:34 -04:00
Derek Buitenhuis
eae58428bd avcodec: Do not lock during open for codecs marked as having threadsafe init
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-04 13:21:16 +02:00
Vittorio Giovara
abe9adfb31 rangecoder: Use AV_RB16 instead of bytestream_get_be16
Silence an incompatible-pointer-types-discards-qualifiers warning from clang.
rangecoder.c:58:34: warning: passing
      'uint8_t **' (aka 'unsigned char **') to parameter of type
      'const uint8_t **' (aka 'const unsigned char **') discards qualifiers in
      nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
2015-10-04 13:09:08 +02:00
Vittorio Giovara
b8b13acd70 hevc: Simplify logical check
The intended meaning is "if this block is the first block in a slice then
its left boundary is a slice boundary". Silence a logical-not-parentheses
warning from gcc.
2015-10-04 13:08:58 +02:00
Vittorio Giovara
4628443ca3 h263: Drop uninitialized variable use from log message 2015-10-04 13:07:12 +02:00
Vittorio Giovara
1da2a20763 dvbsubdec: Fix function return type 2015-10-04 13:07:12 +02:00
Vittorio Giovara
10aa6f9db4 h264: Use the correct argument context in debug log 2015-10-04 13:07:12 +02:00
Vittorio Giovara
cab63a8b59 dv: Mark internal frame reference as const
Silence a warning due to frame assignment in dvenc. All uses of the
reference in dvdec are read only, except the ones in the main decoding
function, so use the frame pointer directly there.
2015-10-04 13:06:34 +02:00
Vittorio Giovara
4c160fa239 dcadec: Always initialize return variable
Silence an uninitialized warning from clang.
2015-10-04 13:06:27 +02:00
DeHackEd
e06114fed3 libx264: copy A53 closed captions from source
Assumes 'GA94' format (ATSC standard)

Signed-off-by: DHE <git@dehacked.net>
Tested-by: Anshul <anshul.ffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 23:39:01 +02:00
Christophe Gisquet
f827a17005 blockdsp: reindent after parameter removal
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 23:34:56 +02:00
Ganesh Ajjanagadde
c4c389aa14 avcodec/apedec: fix bug introduced in commit d3e5fbb140
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 23:04:23 +02:00
Ronald S. Bultje
061b67fb50 vp9: 10/12bpp SIMD (sse2/ssse3/avx) for directional intra prediction. 2015-10-03 14:42:39 -04:00
Ronald S. Bultje
26ece7a511 vp9: 16bpp tm/dc/h/v intra pred simd (mostly sse2) functions. 2015-10-03 14:42:39 -04:00
Ronald S. Bultje
db7786e8ff vp9: sse2/ssse3/avx 16bpp loopfilter x86 simd. 2015-10-03 14:42:39 -04:00
Carl Eugen Hoyos
7c94cfa262 lavc/options_table: Add option flags to the truncated flag.
Also add a short description for the help output.
2015-10-03 16:34:03 +02:00
Ganesh Ajjanagadde
0493e42eb2 avcodec/x86/hpeldsp_rnd_template: silence -Wunused-function on --disable-mmx
This silences some of the -Wunused-function warnings when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.
Header guards are too brittle and ugly for this case.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 14:24:41 +02:00
Anton Khirnov
bb198c4997 d3d11va: make av_d3d11va_alloc_context() available at all times
The public API should not depend on the build configuration.
2015-10-03 14:09:23 +02:00
Anton Khirnov
f320287159 d3d11va: check for malloc failure 2015-10-03 14:08:13 +02:00
Hendrik Leppkes
6b849211bc Merge commit 'e54d7e4e8ef7d778e2ddc5a60bf7307ed55d6333'
* commit 'e54d7e4e8ef7d778e2ddc5a60bf7307ed55d6333':
  dnxhddata: Deduplicate cid 1256 chroma table

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 12:49:22 +02:00
Hendrik Leppkes
cda503a1b9 Merge commit '380146924ecad2e05e9dcc5c3c2e1b5ba47c51e8'
* commit '380146924ecad2e05e9dcc5c3c2e1b5ba47c51e8':
  x264: Add option to force IDR frames

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 12:46:01 +02:00
Hendrik Leppkes
a11741c293 Merge commit 'd0a3e89d41b05f9ed0e7401c352b60ed4f4d1ed5'
* commit 'd0a3e89d41b05f9ed0e7401c352b60ed4f4d1ed5':
  dcadec: make a number of samples per subband per subsubframe a named constant

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 12:36:42 +02:00
Hendrik Leppkes
4d2160c99a Merge commit '9a3202a98b2e095b54dd784c3e01a09a676fc3fa'
* commit '9a3202a98b2e095b54dd784c3e01a09a676fc3fa':
  Screenpresso SPV1 decoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 12:22:41 +02:00
Michael Niedermayer
85c92789b6 avcodec/h264_ps: Fix copying oversized pps&sps data
Fixes: https://trac.ffmpeg.org/attachment/ticket/685/movie.264

In the available testcase the actual PPS only uses a few bits
while there are 7kbyte of apparently random data after it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 11:55:23 +02:00