Anton Khirnov
89aebc5bcc
lavc: align the linesize to 32 when AVX is enabled
2016-08-03 10:56:53 +02:00
Christophe Gisquet
3c504bc359
x86: deduplicate some constants
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 10:56:52 +02:00
Anton Khirnov
d3e4d406b0
h264dec: reset nb_slice_ctx_queued for hwaccel decoding
...
Fixes hwaccel decoding of files with multiple slices.
Found-By: Mark Thompson <sw@jkqxz.net>
2016-08-03 10:56:52 +02:00
Diego Biurrun
3ccec334b8
sbrdsp: Move a misplaced #endif directive to the right spot
2016-08-03 08:26:40 +02:00
Diego Biurrun
e723dce6f8
dvbsubdec: Use NULL instead of 0 as pointer value
2016-08-03 08:26:40 +02:00
Martin Storsjö
9806b9ab5c
Revert "Don't use expressions with side effects in macro parameters"
...
This reverts commit 25bacd0a0c32ae682e6f411b1ac9020aeaabca72.
Since 230b1c070, the bytewise AV_W*() macros only expand their
argument once, so revert to the more readable version of these.
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-08-02 21:18:12 +03:00
Martin Storsjö
25bacd0a0c
Don't use expressions with side effects in macro parameters
...
AV_WB32 can be implemented as a macro that expands its parameters
multiple times (in case AV_HAVE_FAST_UNALIGNED isn't set and the
compiler doesn't support GCC attributes); make sure not to read
multiple times from the source in this case.
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-31 22:50:51 +03:00
Martin Storsjö
7ebdffc353
dxv: Check to make sure we don't overrun buffers on corrupt inputs
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-31 22:50:47 +03:00
Anton Khirnov
e328178da9
qsvdec: only access hwaccel_context is the pixel format is QSV
...
We do not strictly specify that hwaccel_context must be cleared if no
hwaccel is used.
Reported-By: wm4 <nfxjfg@googlemail.com>
2016-07-31 08:19:45 +02:00
Anton Khirnov
5ebef79abe
Fix instances of broken indentation found by gcc 6
2016-07-31 08:19:27 +02:00
Luca Barbato
8495d84f01
ac3dec: Add some inline hints
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Luca Barbato
3db51bf671
ac3dec: Simplify skipping
...
skip_bits_long() can skip up to 32-bit ranges.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Luca Barbato
f0ccc65bc9
ac3dec: Split coupling-specific code from decode_audio_block()
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Luca Barbato
a5ebe5d121
ac3dec: Split spx-specific code from decode_audio_block()
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Anton Khirnov
a115eb9e75
mimic: do not release the newly obsolete reference at the end of decoding
...
The reference frames are used in update_thread_context(), so modifying
them after finish_setup() is a race. The frame in question will be
released during the next decode call.
CC: libav-stable@libav.org
2016-07-29 15:59:48 +02:00
Diego Biurrun
48b80f8393
hpeldsp: Explain why put_no_rnd_pixels_tab is larger than necessary
2016-07-25 19:38:18 +02:00
Luca Barbato
b183abfb5b
vpx: Support color range
...
The range field has been introduced in version 1.6.0
2016-07-23 08:27:29 +02:00
Anton Khirnov
8e07c22e50
qsvenc: print warnings from encode/init
2016-07-22 19:08:13 +02:00
Anton Khirnov
0956fd4606
qsvenc: do not re-execute encoding on all positive status codes
...
It should only be done for DEVICE_BUSY/IN_EXECUTION
2016-07-22 19:08:13 +02:00
Anton Khirnov
95414eb2dc
qsv: print more complete error messages
...
Include the libmfx error code and its description
2016-07-22 19:08:13 +02:00
Anton Khirnov
d9ec3c6014
qsvenc: take only the allocated dimensions from the frames context
...
Other parameters, like the display size, should still be taken from the
codec context.
2016-07-22 19:08:13 +02:00
Anton Khirnov
37a9015ee8
qsvenc: add support for p010
2016-07-22 19:08:13 +02:00
Anton Khirnov
21962261c7
qsv: handle the semi-packed formats in map_fourcc as well
...
This will allow using this function for encoding as well, where the
input format is already the semi-packed version.
2016-07-22 19:08:13 +02:00
Anton Khirnov
f65285aba0
lavc: set sw_pix_fmt for hwaccel encoding
2016-07-22 19:08:13 +02:00
Anton Khirnov
d59641abfd
lavc: initialize AVCodecContext.sw_pix_fmt properly
...
Currently it's memset to 0, which is YUV420P. It should be initialized
to none.
2016-07-22 19:08:13 +02:00
Vittorio Giovara
a1f6a2dfda
ratecontrol: Reorder functions to avoid forward declarations
2016-07-20 19:03:31 +02:00
Vittorio Giovara
d639dcdae0
ratecontrol: Move Xvid-related functions to the place they are actually used
...
This will simplify the de-MpegEncContextualization.
2016-07-20 18:59:36 +02:00
Vittorio Giovara
44972e227d
ratecontrol: Move mpegenc-only function where it is used
2016-07-20 18:59:36 +02:00
Vittorio Giovara
b4bb959383
ratecontrol: Drop commented out cruft
2016-07-20 18:59:35 +02:00
Diego Biurrun
d06dfaa5cb
x86: huffyuv: Use EXTERNAL_SSSE3_FAST convenience macro where appropriate
2016-07-20 18:43:28 +02:00
Diego Biurrun
4efab89332
x86: Use *_FAST/*_SLOW CPU feature detection macros where appropriate
2016-07-20 18:43:28 +02:00
Diego Biurrun
0a39c9ac0b
x86: hpeldsp: Don't check for bitexact flag when initializing VP3-specific code
...
That code is only ever initialized with that flag set.
2016-07-20 18:37:45 +02:00
Diego Biurrun
95c1df929b
x86: hpeldsp: Drop unused function parameters
2016-07-20 18:33:26 +02:00
Diego Biurrun
c3e83ad3b7
x86: hpeldsp: Use EXTERNAL_SSE2_FAST where appropriate
2016-07-20 18:33:26 +02:00
Diego Biurrun
1dfc3cf89d
x86: hpeldsp: Split off VP3-specific bits into a separate file
2016-07-20 18:33:25 +02:00
Anton Khirnov
e344e65109
h264dec: do not call finish_setup() if we have not started a frame
...
Found-By: Jan Ruge <jan.s.ruge@gmail.com>
Bug-Id: 952
2016-07-20 16:36:10 +02:00
Anton Khirnov
76f7e70aa0
h264dec: handle zero-sized NAL units in get_last_needed_nal()
...
The current code will ignore the init_get_bits() failure and do an
invalid read from the uninitialized GetBitContext.
Found-By: Jan Ruge <jan.s.ruge@gmail.com>
Bug-Id: 952
2016-07-20 16:35:55 +02:00
Anton Khirnov
1f7b4f9abc
h264dec: make sure not to call finish_setup() more than once per frame
...
It does not break anything currently, but should not be done anyway.
2016-07-20 16:35:49 +02:00
Hendrik Leppkes
1ecb63cd1c
hevc: set profile based on the profile compatibility flags if needed
...
This fixes retrieving a valid profile for many of the FATE conformance samples,
allowing them to be properly decoded by the HWAccel after adding a profile check.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-07-20 16:33:09 +02:00
James Almer
fca3c3b619
hevc: Add AVX2 DC IDCT
...
Originally written by Pierre Edouard Lepere <pierre-edouard.lepere@insa-rennes.fr>.
Integrated to Libav by Josh de Kock <josh@itanimul.li>.
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Mickaël Raulet
cc16da75c2
hevc: Add coefficient limiting to speed up IDCT
...
Integrated to libav by Josh de Kock <josh@itanimul.li>.
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Mickaël Raulet
a92fd8a062
hevc: Add DC IDCT
...
Integrated to Libav by Josh de Kock <josh@itanimul.li>.
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Mickaël Raulet
4f247de3b7
hevcdsp_template: Templatize IDCT
...
Integrated to Libav by Josh de Kock <josh@itanimul.li>.
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Alexandra Hájková
1bd890ad17
hevc: Separate adding residual to prediction from IDCT
...
Based on patch 250430bf28118cf843df887e8c8b345f1c60c82d
by Mickaël Raulet <mraulet@insa-rennes.fr>, integrated
to Libav by Josh de Kock <josh@itanimul.li>.
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2016-07-18 15:27:13 +02:00
Anton Khirnov
33f6690eb4
hevc: offer DXVA2 for 10bit 420
2016-07-15 15:35:44 +02:00
Anton Khirnov
4a9bab3db0
h264: fix decoding multiple fields per packet with slice threads
...
Since we only know whether a NAL unit corresponds to a new field after
parsing the slice header, this requires reorganizing the calls to slice
parsing, per-slice/field/frame init and actual decoding.
In the previous code, the function for slice header decoding also
immediately started a new field/frame as necessary, so any slices
already queued for decoding would no longer be decodable.
After this patch, we first parse the slice header, and if we determine
that a new field needs to be started we decode all the queued slices.
2016-07-15 15:33:54 +02:00
Anton Khirnov
f450cc7bc5
h264: eliminate decode_postinit()
...
This function's purpose is not very well defined. Currently it does two
(only marginally related) things: selecting the next output frame and
calling ff_thread_finish_setup() for frame threading. The first of those
more properly belongs under field_start(), while the second can be
called directly from decode_nal_units().
2016-07-15 15:33:28 +02:00
Martin Storsjö
7a76371437
libopenh264enc: Simplify init by setting FF_CODEC_CAP_INIT_CLEANUP
...
Also set FF_CODEC_CAP_INIT_THREADSAFE while adding internal capabilities.
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:36:23 +03:00
Martin Storsjö
2d097c16b8
libopenh264enc: Return a more sensible error code in some init failure paths
...
Previously they returned the default AVERROR_UNKNOWN.
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:36:22 +03:00
Martin Storsjö
36b380dcd5
libopenh264dec: Simplify the init thanks to FF_CODEC_CAP_INIT_CLEANUP being set
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:36:21 +03:00