Mark Thompson
3daaa44173
hevc: Add names for reserved NAL unit types
...
While not yet used, these NAL units do already have some defined
semantics and are referred to elsewhere.
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
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
Anton Khirnov
fa936a307f
hevc_parse: rename into h2645_parse
...
This code will be shared with h264.
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
Hendrik Leppkes
8c399bd5ce
dxva2_hevc: properly signal the num_delta_pocs from the SPS RPS
...
ucNumDeltaPocsOfRefRpsIdx needs to contain the flat value from the SPS RPS,
and not the final computed value from the slice header RPS, as this calculation
is done internally by the driver again.
Sample-Id: http://trailers.divx.com/hevc/Sintel_4k_27qp_24fps_1aud_9subs.mkvi
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
9 years ago
Anton Khirnov
e7078e842d
hevcdsp: add x86 SIMD for MC
9 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.
9 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.
9 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.
9 years ago
Anton Khirnov
66acb76bb0
lavc: add Intel libmfx-based HEVC encoder
10 years ago
Anton Khirnov
69ab9f53f9
hevc: split bitstream unescaping to a separate file
...
It will be useful in the QSV HEVC encoder.
10 years ago
Anton Khirnov
fd124d8357
hevc_ps: split the code for parsing the SPS and exporting it into the context
...
This will be useful in the later commits, where we want to parse an SPS
without having a whole decoding context.
10 years ago
Anton Khirnov
c929659bdd
hevc: make the crop sizes unsigned
10 years ago
Hendrik Leppkes
e72e8c5a1d
hevc: add hwaccel hooks
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
4b95e95dba
hevc: store the short term rps flag and size in the context
...
For future use by hardware accelerators.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
36779a8405
hevc: store the escaped/raw bitstream in HEVCNAL
...
Hardware Accelerators require access to the escaped bitstream.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Anton Khirnov
2c6a7f9348
hevc: do not store rqt_root_cbf in the context
...
It does not need to be accessed outside of hls_coding_unit().
10 years ago
Anton Khirnov
920bca3e23
hevc: do not store pcm_flag in the context
...
It does not need to be accessed outside of hls_coding_unit().
10 years ago
Christophe Gisquet
cf6090dc62
hevc: use intreadwrite
...
When dealing with MVs, both components may be processed at a time.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Anton Khirnov
70211539a3
hevc: deobfuscate slice/tile boundary handling for DBF
...
Use named constants instead of magic numbers, avoid using variables with
inverse meaning from what their name implies.
10 years ago
Anton Khirnov
e76f2d1197
hevc: eliminate the last element from TransformTree
...
Replace it by passing an additional parameter to transform_unit()
10 years ago
Anton Khirnov
4aa80808bc
hevc: eliminate unnecessary cbf_c{b,r} arrays
...
They are replaced by passing additional parameters to the transform
functions.
10 years ago
Anton Khirnov
0daa255463
hevc: do not store the transform inter_split flag in the context
...
It does not need to be preserved.
10 years ago
Anton Khirnov
e36a2f4c52
hevc: eliminate an unnecessary array
...
We do not need to store the value of the split flag.
10 years ago
Vittorio Giovara
0569a7e0bd
hevc: parse display orientation SEI message
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago
Gildas Cocherel
a0e1c3517a
hevc: remove unused array min_cb_addr_zs
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Diego Biurrun
c67b449beb
dsputil: Split bswap*_buf() off into a separate context
11 years ago
Anton Khirnov
a1c2b48018
hevc: templatize intra_pred
11 years ago
Vittorio Giovara
4d33873c29
hevc: make pps/sps ids unsigned where necessary
...
Fixes integer overflow and out of array accesses.
Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind
11 years ago
Anton Khirnov
b25e84b739
hevc: check that the VCL NAL types are the same for all slice segments of a frame
...
Fixes possible invalid memory access for mismatching skipped/non-skipped
slice segments.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Sample-Id: 00001533-google
11 years ago
Luca Barbato
838740e642
hevc: Prevent some integer overflows
...
get_ue_golomb_long() returns an unsigned.
Sample-Id: 00001541-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Luca Barbato
b37e796082
hevc: Use uint64 to check for tile dimensions
...
And use unsigned datatypes.
Otherwise it would overflow.
Sample-Id: 00001315-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Michael Niedermayer
d5c15ebeaf
hevc: Fix modulo operations
...
Keep qp fields within the range.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Guillaume Martres
e588615d93
hevc: fix decoding of one PU wide files
...
For those the block size may be larger than the source linesize (if the
edges are not allocated).
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Guillaume Martres
7398e0516f
hevc: move DSP declarations from hevc.h into hevcdsp.h
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Mickaël Raulet
5c3fa74b94
hevc: support luma bit depth != chroma bit depth for PCM coding units
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Gildas Cocherel
2d18aaa14b
hevc: refactor Profile Tier Level
...
Also store a few PTL flags which were skipped before
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Gildas Cocherel
33452aede6
hevc: store the VPS list as an AVBufferRef, just like the others *PS
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Vittorio Giovara
acb77dff6a
hevc: parse frame packing arrangement SEI messages and save relevant stereo3d information
11 years ago
Guillaume Martres
064698d381
Add HEVC decoder
...
Initially written by Guillaume Martres <smarter@ubuntu.com> as a GSoC
project. Further contributions by the OpenHEVC project and other
developers, namely:
Mickaël Raulet <mraulet@insa-rennes.fr>
Seppo Tomperi <seppo.tomperi@vtt.fi>
Gildas Cocherel <gildas.cocherel@laposte.net>
Khaled Jerbi <khaled_jerbi@yahoo.fr>
Wassim Hamidouche <wassim.hamidouche@insa-rennes.fr>
Vittorio Giovara <vittorio.giovara@gmail.com>
Jan Ekström <jeebjp@gmail.com>
Anton Khirnov <anton@khirnov.net>
Martin Storsjö <martin@martin.st>
Luca Barbato <lu_zero@gentoo.org>
Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>
Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diego Biurrun <diego@biurrun.de>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago