Commit Graph

20185 Commits

Author SHA1 Message Date
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
Vittorio Giovara efc618aff9 qtrleenc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara f3b4a92241 libtheoraenc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara d6006dd9f0 libvpxenc: Do not entangle coded_frame
Keep coded_frame.key_frame a write-only variable.
2015-07-20 14:13:42 +01:00
Vittorio Giovara 7fc8d8a1b3 libxvid: Do not entangle coded_frame 2015-07-20 14:13:42 +01:00
Vittorio Giovara 56672aeaee svq1enc: Do not entangle coded_frame 2015-07-20 14:13:42 +01:00
Vittorio Giovara 05fb4c9aaf proresenc: Do not entangle coded_frame 2015-07-20 14:13:42 +01:00
Vittorio Giovara 91767360d8 a64multienc: Do not entangle coded_frame
This change (and the following ones of the same kind) is mainly to
simplify wrapping this section with an #if FF_API block later on.

No functional changes are applied, the fields of the context coded_frame
fields are directly initialized, instead of keeping a reference to the
coded_frame itself.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 14:12:48 +01:00
Vittorio Giovara 95e2317ed8 roqvideoenc: Drop unneeded initialization
Its fields are never initialized to begin with.
2015-07-20 13:57:25 +01:00