1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

20193 Commits

Author SHA1 Message Date
Jake Sebastian-Jones
9469370fb3 h264: Use AVERROR return codes instead of -1
And report why it fails.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-05 11:40:30 +02:00
Luca Barbato
4fee11ab05 png: Be more informative regarding signature errors
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-02 14:31:09 +02:00
Anton Khirnov
14e5580246 opusdec: properly handle mismatching configurations in multichannel streams
The substreams can have different resampling delays, so an additional
level of buffering is needed to synchronize them.

Bug-Id: 876
2015-08-02 08:43:51 +02:00
Henrik Gramner
ebaf571aca x86: dct: Disable dct32_float_sse on x86-64
There is an SSE2 implementation so the SSE version is never used. The "SSE"
version also happens to contain SSE2 instructions on x86-64.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-08-02 08:41:45 +02:00
Luca Barbato
979cb55103 hevc: Split the sei parsing in 3 functions 2015-08-01 15:45:50 +02:00
Luca Barbato
043f46f574 hevc: Use switch instead of if-nests in decode_nal_sei_message
Makes simpler to add support for more SEI types.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-01 15:34:45 +02:00
Luca Barbato
2cd841c077 hevc: Use a proper enum for the SEI values
And use the correct value for decoded_picture_hash.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-01 15:23:05 +02:00
David Holm
80ea661128 avcodec: h264: Extract decoder methods
Extract two methods from decode_registered_user_data in order to improve
code readability. Also make the constant holding the allocation size a
64-bit unsigned integer so that the size comparison against INT_MAX makes
sense.

Bug-Id: CID1312090

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-01 14:29:53 +02:00
Martin Storsjö
d75b55635a dxva2/d3d11va: Set _WIN32_WINNT to 0x0602 instead of 0x0600
If _WIN32_WINNT is unset, we force it to a new enough value to
make sure the necessary definitions are visible.

When targeting Windows Phone or Windows RT, _WIN32_WINNT should
be at least 0x0602 - otherwise the windows headers themselves
can cause errors (which technically are bugs in the headers).

Raising this value here shouldn't hurt; the alternative would
be to not touch it at all if WINAPI_FAMILY is set to phone/app,
or to force setting it to 0x0602 in configure if unset (for phone/app).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-07-28 19:37:47 +03:00
John Högberg
b7040e67ec h264: fix AVDISCARD_NONKEY for some interlaced content
When skip_frame is set to _NONKEY the decoder skips everything except intra
slices, which breaks frames that consist of an intra field together with any
other field type; half the frame becomes garbage. This patch fixes the issue by
letting non-intra slices through if they're part of a keyframe.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-27 18:11:00 +02:00
Anton Khirnov
db21dde3f7 qsvdec_mpeg2: drop an incorrect comment
It got copypasted from the h264 decoder, but it does not apply to mpeg2.
2015-07-27 18:09:30 +02:00
Vittorio Giovara
aaf937ee35 hap: Add utility functions file
Missing from the push of 3ee217853a.
2015-07-27 16:21:14 +01:00
Tom Butterworth
3ee217853a Support the Hap chunked frame format
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 16:00:22 +01:00
Tom Butterworth
43dd004747 hap: Move some per-stream setup into decoder init rather than per-frame
This change will reject frames with a texture type which does not match
the stream description.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:53:03 +01:00
Vittorio Giovara
b94ec30428 lavc: Update version and APIchanges
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:26:57 +01:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Vittorio Giovara
7c6eb0a1b7 lavc: AV-prefix all codec flags
Convert doxygen to multiline and express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Vittorio Giovara
4b6b1082a7 lavc: Deprecate avctx.me_method
This option is extremely codec specific and only a few codecs employ it.
Move it to codec private options instead: mpegenc family supports only 3
values, xavs and x264 use 5, and xvid has a different metric entirely.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:56 +01:00
Vittorio Giovara
03eb557414 wmv2enc: Check memory allocation 2015-07-27 14:44:07 +01:00
Vittorio Giovara
a67b67944a ac3enc_template: Use the correct context field
For audio encoders, delay has no effect, use the appropriate one,
initial_padding (see 2df0c32).
2015-07-27 14:44:07 +01:00
Anton Khirnov
f3bd3810d2 qsvdec_*: add missing CODEC_CAP_DR1 2015-07-27 07:44:34 +02:00
Steve Lhomme
9b4b96c0de force WINAPI_FAMILY to WINAPI_FAMILY_DESKTOP_APP to be able to use dxva.h
The struct definitions in dxva.h, which are necessary in order to
actually use d3d11va, are hidden when WINAPI_FAMILY targets Windows Phone
or WindowsRT.

Building with WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP is disallowed
when targeting ARM. ("Compiling Desktop applications for the ARM
platform is not supported.") So we set _CRT_BUILD_DESKTOP_APP to 0
to tell the runtime not to detect some issues with this mismatching.

The same tweaks to detect if the API is available is done in dxva2_internal.h
when compiling each DXVA2/D3D11VA decoders.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-07-26 20:18:03 +03:00
Anton Khirnov
41d47ea85f lavc: add Intel libmfx-based HEVC decoder. 2015-07-25 17:37:01 +02:00
Anton Khirnov
bf52f77391 lavc: add Intel libmfx-based MPEG2 decoder. 2015-07-25 17:36:59 +02:00
Anton Khirnov
f89f78c1c5 lavc: add a HEVC mp4->annex B bitstream filter 2015-07-25 17:26:53 +02:00
Anton Khirnov
96dca089b1 qsvdec: move qsv_process_data() from qsvdec_h264 to the common code
It will be shared with the upcoming mpeg2 and hevc decoders.
2015-07-25 17:24:25 +02:00
Anton Khirnov
fa85fcf2b7 qsvenc_hevc: fix enum declaration
Declare a named enum, not a variable with anonymous enum type.
2015-07-25 17:24:03 +02:00
Anton Khirnov
22522d9c2c qsvdec: fix a memleak of async_fifo
init() is called whenever format changes, so current code would leak the
fifo in this case.
2015-07-25 17:23:46 +02:00
Anton Khirnov
aa9d15d89b qsvdec: avoid an infinite loop with no consumed data and no output
This is triggerable with the HEVC decoder. It is unclear yet whether the
bug is in the calling code or the MSDK, but it seems better to check for
this in any case.
2015-07-25 17:23:29 +02:00
Martin Storsjö
44f7df0c98 dds: Write the palette in the native endian form
This fixes the palette on big endian, broken (or, differing from
little endian) since 57214b2f7.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-07-23 19:07:43 +03:00
Tom Butterworth
11f3d5c69b hap: Name enums, remove unused struct member 2015-07-23 13:35:16 +01:00
Tom Butterworth
083cbc930d snappy: Refactor so ff_snappy_uncompress() uses an existing buffer
Some uses of Snappy require uncompressing to positions within
an existing buffer. Also adds a function to get the uncompressed
length of Snappy data.
2015-07-23 13:35:16 +01:00
Tom Butterworth
ae5a8dca67 hap: Fix slice size computation
A bug was introduced in 977105407c whereby when
frame height wasn't divisible by the number of threads, pixels would be omitted
from the bottom rows during decode.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-23 10:46:19 +02:00
Tom Butterworth
ebe8b5d947 dds: Fix the slice size computation
A bug was introduced in 6b2b26e7af whereby when
frame height wasn't divisible by the number of threads, pixels would be omitted
from the bottom rows during decode.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-23 10:45:40 +02:00
Vittorio Giovara
21c90d86d2 mpegvideo: Add missing include 2015-07-22 13:35:44 +01:00
Michael Niedermayer
d08d8b61aa dds: Fix 32bpp bitmaps decoding
Found-By: ami_stuff
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-22 13:35:44 +01:00
Vittorio Giovara
57214b2f7f dds: Fix palette decoding
Red and blue channels were decoded in the wrong order.

Found-By: ami_stuff
2015-07-22 13:35:44 +01:00
Vittorio Giovara
ea4d46e729 dds: Fix enum declaration
Drop the global variables with anonymous enum type.
2015-07-22 13:35:43 +01:00
Anton Khirnov
ecee1148af qsvenc_hevc: use the correct HW plugin UID 2015-07-22 12:11:46 +02:00
Luca Barbato
6b2b26e7af dds: Decode using optimal slices sizes
Enjoy some cache locality and use less threads.
About the same speedup provided to HAP.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-21 12:14:25 +02:00
Luca Barbato
977105407c hap: Decode using optimal slices sizes
Enjoy some cache locality and use less threads.
About 5x speedup (from 60ms to 12ms to decode a 4k frame).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-21 12:14:25 +02:00
Janne Grunau
9ed6f9a17c arm: use a local label instead of the function symbol in ff_prefetch_arm
Avoids a relocation which might end out of range for thumb2.

Reported-By: Ludovic Fauvet <etix@videolan.org>
Bug-Id: https://bugs.webkit.org/show_bug.cgi?id=137022
CC: libav-stable@libav.org
2015-07-20 23:10:29 +02:00
Janne Grunau
f56d8d8dd7 h264: aarch64: intra prediction optimisations 2015-07-20 23:10:29 +02:00
Vittorio Giovara
40cf1bbacc Deprecate avctx.coded_frame
The rationale is that coded_frame was only used to communicate key_frame,
pict_type and quality to the caller, as well as a few other random fields,
in a non predictable, let alone consistent way.

There was agreement that there was no use case for coded_frame, as it is
a full-sized AVFrame container used for just 2-3 int-sized properties,
which shouldn't even belong into the AVCodecContext in the first place.

The appropriate AVPacket flag can be used instead of key_frame, while
quality is exported with the new AVPacketSideData quality factor.
There is no replacement for the other fields as they were unreliable,
mishandled or just not used at all.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:50 +01:00
Vittorio Giovara
5d3addb937 Add a quality factor packet side data
This is necessary to preserve the quality information currently exported
with coded_frame. Add the new side data to every encoder that needs it,
and use it in avconv.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:47 +01:00
Vittorio Giovara
d6604b29ef Gather all coded_frame allocations and free functions to a single place
Allocating coded_frame is what most encoders do anyway, so it makes
sense to always allocate and free it in a single place. Moreover a lot
of encoders freed the frame with av_freep() instead of the correct API
av_frame_free().

This bring uniformity to encoder behaviour and prevents applications
from erroneusly accessing this field when not allocated. Additionally
this helps isolating encoders that export information with coded_frame,
and heavily simplifies its deprecation.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 14:16:15 +01:00
Vittorio Giovara
91f9b6579a flashsvenc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara
75c1ed2e4c ffv1enc: Use input frame to set SAR and interlacing 2015-07-20 14:13:42 +01:00
Vittorio Giovara
10a9149de2 ffv1enc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00