Martin Storsjö
e788ca05a7
hevcdec: Use LOCAL_ALIGNED_* for declaring local variables with alignment
...
Not all compilers can do alignment larger than the normal stack alignment
for variables on the stack. In these cases, the LOCAL_ALIGNED_* macros
produce the workaround alignment wrapper consisting of a padded array
and a pointer variable.
This fixes the hevc fate tests on RVCT/ARMCC after adding IDCT assembly
that actually assumes/relies on this alignment.
Signed-off-by: Martin Storsjö <martin@martin.st>
8 years ago
Diego Biurrun
d4c2103bd3
golomb: Convert to the new bitstream reader
8 years ago
Derek Buitenhuis
00b775dda2
hevc: Mark as having threadsafe init
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years ago
Anton Khirnov
a02ae1c683
hevcdec: export cropping information instead of handling it internally
8 years ago
Steve Lhomme
2835e9a9fd
hevcdec: add P010 support for D3D11VA
...
Given it's the same API than DVXA2 I don't know why the same output was not
enabled for both.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years ago
Anton Khirnov
ea8b730d8e
hevcdec: add a VAAPI hwaccel
...
Partially based on a patch by Timo Rothenpieler <timo@rothenpieler.org>.
Additional scaling list handling fix by Jun Zhao <mypopydev@gmail.com>.
8 years ago
Anton Khirnov
373fd76b4d
hevcdec: do not set decoder-global SPS prematurely
...
It should only be set after the decoder state has been fully initialized
for using that SPS.
Fixes possible invalid reads on get_format() failure.
CC: libav-stable@libav.org
8 years ago
Anton Khirnov
86157e6db2
hevc: decouple calling get_format() from exporting the SPS parameters
...
This makes sure ff_get_format() does not get called unnecessarily from
update_thread_context().
8 years ago
Diego Biurrun
e4382a4ab4
hevc: Eliminate pointless variable indirection
8 years ago
Vittorio Giovara
47a795727f
hevc: Support extradata changes from multiple stsd
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years ago
Vittorio Giovara
2fe30b4743
hevc: Allow parsing external extradata buffers
8 years ago
Vittorio Giovara
5be2153111
hevc: Move hevc_decode_extradata before frame decoding
...
Avoids a forward-declaration in the following commit.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years ago
Anton Khirnov
59c90097a0
hevc: factor out a repeated condition
8 years ago
Anton Khirnov
0bfdcce4d4
hevc: move the SliceType enum to hevc.h
...
Those values are decoder-independent and are also use by the VA-API
encoder.
8 years ago
Anton Khirnov
f6e2f8a9ff
hevcdec: move parameter set parsing into a separate header
...
This code is independent from the decoder, so it makes more sense for it
to to have its own header.
8 years ago
Anton Khirnov
150c896a9e
hevcdec: split ff_hevc_diag_scan* declarations into a separate header
...
This will be useful in the following commits.
8 years ago
Anton Khirnov
c359d624d3
hevcdec: move decoder-independent declarations into a separate header
...
This way they can be reused by other code without including the whole
decoder-specific hevcdec.h
Also, add the HEVC_ prefix to them, since similarly named values exist
for H.264 as well and are sometimes used in the same code.
8 years ago
Anton Khirnov
4abe3b049d
hevc: rename hevc.[ch] to hevcdec.[ch]
...
This is more consistent with the rest of libav and frees up the hevc.h
name for decoder-independent shared declarations.
8 years ago
Diego Biurrun
ba479f3daa
hevc: Change type of array stride parameters to ptrdiff_t
...
ptrdiff_t is the correct type for array strides and similar.
8 years ago
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>
9 years ago
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>
9 years ago
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>
9 years ago
Alexandra Hájková
1bd890ad17
hevc: Separate adding residual to prediction from IDCT
...
Based on patch 250430bf28
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>
9 years ago
Anton Khirnov
33f6690eb4
hevc: offer DXVA2 for 10bit 420
9 years ago
Diego Biurrun
5afb94c817
Mark read-only tables as static
9 years ago
Anton Khirnov
b667252a41
h2645_parse: add support for parsing h264
9 years ago
Anton Khirnov
8229eff4b7
h2645_parse: add a function for uninitializing the packet
9 years ago
Anton Khirnov
fa936a307f
hevc_parse: rename into h2645_parse
...
This code will be shared with h264.
9 years ago
Philip Langdale
8d34a2f803
vdpau: Support for VDPAU accelerated HEVC decoding
...
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Philip Langdale
8958c5c64d
hevc: Track long and short term RPS size for VDPAU
...
Today, we track the short term RPS size for DXVA, but only if the
SliceHeader RPS is being used. Otherwise it's left uninitialized.
NVIDIA's VDPAU implementation requires that the size be accurately
tracked even if an SPS RPS is being used. In this case, it's really
counting the size of the RPS idx information, but you end up with
mangled output if the value is not accurate.
VDPAU also needs the size of the long term RPS.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Anton Khirnov
2c6811397b
lavc: add profiles to AVCodecDescriptor
...
The profiles are a property of the codec, so it makes sense to export
them through AVCodecDescriptors, not just the codec implementations.
9 years ago
Anton Khirnov
e7078e842d
hevcdsp: add x86 SIMD for MC
9 years ago
Anton Khirnov
a853388d2f
hevc: change the stride of the MC buffer to be in bytes instead of elements
...
Currently, the frame stride is passed in bytes, while the MC buffer size
is in int16_t elements, This can be confusing, so pass both strides in
bytes.
9 years ago
Anton Khirnov
688417399c
hevcdsp: split the pred functions by width
...
This should allow for more efficient SIMD.
9 years ago
Anton Khirnov
818bfe7f0a
hevcdsp: split the epel functions by width
...
This should allow for more efficient SIMD.
9 years ago
Anton Khirnov
1f821750f0
hevcdsp: split the qpel functions by width instead of by the subpixel fraction
...
This should allow for more efficient SIMD.
Keep the C versions as they are now, to allow the compiler to inline the
interpolation coefficients.
9 years ago
Anton Khirnov
a8956eca1f
cabac: Make CABAC states hardcoded
...
There is not much reason to generate such a small table at runtime.
Signed-off-by: Derek Buitenhuis <derekb@vimeo.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
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.
9 years ago
Vittorio Giovara
2268db2cd0
lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields
...
The new fields can be accessed directly and are more intelligible.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Anton Khirnov
d8ebb6157d
hevcdsp: fix a function name
...
put_weighted_pred_avg should be put_unweighted_pred_avg, there is no
weighting there.
10 years ago
Anton Khirnov
a1926a29fb
hevc: avoid invalid shifts of negative values
10 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Anton Khirnov
a062a55d37
hevc_parser: fix standalone build with the hevc decoder disabled
...
The parser depends on hevc_ps, which in turn needs some data tables.
Found-by: James Almer <jamrial@gmail.com>
10 years ago
Anton Khirnov
077b559433
hevc: handle a NULL sps in set_sps() properly
...
This can happen in update_thread_context(), when the previous frame was
corrupted.
10 years ago
Anton Khirnov
18156b53f9
hevc: do not pass an entire HEVCContext into export_stream_params()
...
It only needs the parameter sets.
10 years ago
Anton Khirnov
7f78155dc6
hevc: improve a comment
...
That loop does the actual full decoding, so 'parse' can be misleading.
10 years ago
Anton Khirnov
d82e1adc20
hevc: move splitting the packet into NALUs into a separate function
...
This function is independent of the decoding context, so we'll be able
to use it in the parser.
10 years ago
Anton Khirnov
ae05b48655
hevc: eliminate the second call to hls_nal_unit()
...
Also, make hls_nal_unit() work only on the provided NAL unit, without
requiring a whole decoding context.
This will allow splitting this code for reuse by the parser.
10 years ago
Anton Khirnov
d7bebe4805
hevc: skip invalid/ignored NALUs when splitting the packet
...
There is no need to wait until actually decoding the NALU. This will
allow to get rid of the second hls_nal_unit() call later.
10 years ago
Anton Khirnov
b11acd5732
hevc: remove HEVCContext usage from hevc_ps
...
Factor out the parameter sets into a separate struct and use it instead.
This will allow us to reuse this code in the parser.
10 years ago