Hendrik Leppkes
b2e9b0f5d4
hevc: add hwaccel hooks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Hendrik Leppkes
06894f1a04
hevc: store the short term rps flag and size in the context
...
For future use by hardware accelerators.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Hendrik Leppkes
2af82a1ad9
hevc: store the escaped/raw bitstream in HEVCNAL
...
Hardware Accelerators require access to the escaped bitstream.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Hendrik Leppkes
7e850fa67e
Add DXVA2 HEVC HWAccel
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
b82722df9b
hevc: reindent after previous commit
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
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
Hendrik Leppkes
b0593a4bca
hevc: pass the full HEVCNAL struct to decode_nal_unit
...
This enables decode_nal_unit to access additional fields added in
subsequent commits.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Anton Khirnov
443b71928b
hevc: unref the current frame if frame_start() fails
...
Prevents DPB from filling up with damaged input.
10 years ago
Hendrik Leppkes
77140279d3
hevc: pass the full HEVCNAL struct to decode_nal_unit
...
This enables decode_nal_unit to access additional fields added in
subsequent commits.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e172f5e53a
avcodec/hevc: Fix handling of skipped_bytes() reallocation failures
...
Fixes CID1260704
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
99f8c9e4d1
avcodec/hevc: move qp_block_mask to where its used
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
8aa8d12554
avcodec/hevc: clear filter_slice_edges() on allocation
...
This avoids use of uninitialized memory
Fixes: asan_static-oob_17aa046_582_cov_212287884_DBLK_G_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
b799ec7e0b
avcodec/hevc: Print an error if luma_log2_weight_denom is out of range
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
b2bece5e9a
hevc: always clip luma_log2_weight_denom
...
Its value shall be between 0 and 7 according to the specifications.
CC: libav-stable@libav.org
Bug-Id: CID 1257502
10 years ago
Michael Niedermayer
ef23bd939d
avcodec/hevc: Silence "warning: ref0/1 may be used uninitialized in this function"
...
Also make code more robust by initializing the pointers to NULL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Luca Barbato
cd975d5658
hevc: Spin the mv_mpv_mode calls in a stand alone function
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Anton Khirnov
8b573ddda7
hevc: remove superfluous assignments and checks
10 years ago
Anton Khirnov
eac3ac1fe0
hevc: eliminate an unneeded intermediate variable
10 years ago
Anton Khirnov
eb335f3c5c
hevc: reduce variable scope
...
Also, collapse the array into a scalar, since only one value is needed
at a time.
10 years ago
Anton Khirnov
84c0ece5fd
hevc: further reduce code duplication in hls_prediction_unit()
10 years ago
Anton Khirnov
a7b365ae19
hevc: reduce code duplication in hls_prediction_unit()
10 years ago
Anton Khirnov
16c01fb434
hevc: remove an unused function parameter
10 years ago
Anton Khirnov
84b9463984
hevc: remove a redundant line
...
pred_mode is overwritten a few lines immediately below.
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
Vittorio Giovara
b1b1a7370e
display: fix order of operands
...
CC: libav-stable@libav.org
Bug-Id: CID 1238828 / CID 1238832
10 years ago
Changjiang Wei
6f2068e626
avcodec/hevc.c: for big negative mvy value, should wait line 0 of ref frame due to edge extending
...
Reviewed-by: Mickaël Raulet <mraulet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
7ea1b3472a
lavc: deprecate the use of AVCodecContext.time_base for decoding
...
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.
Add a new field, called 'framerate', to replace the use of time_base for
decoding.
10 years ago
Michael Niedermayer
df8394c693
avcodec/hevc: fix chroma transform_add size
...
Fixes accessing misaligned address
Fixes: signal_sigsegv_1feb99c_10_signal_sigsegv_2d1d35c_79_cov_691940146_EXT_A_ericsson_3.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
9a3653c9ec
hevc: reuse edge emu buffer for coefficients
...
Kind of hackish but...
Reviewed-by: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
f183febcda
hevc: remove CodingTree
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
3fe962940f
hevc: move intermediate bidir buffer
...
Other buffers are already there.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Mickaël Raulet
684d0a0b23
avcodec/hevc: fix dead code
...
fix CID 1231985
cherry picked from commit 745a35a777eaa5f77b8660b44098110a29916aae
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
dad7f15567
hevcdsp: remove more instances of compile-time-fixed parameters
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
d4f44b66d3
hevcdsp: remove compilation-time-fixed parameter
...
The dststride parameter is always MAX_PB_SIZE.
Reviewed-by: Mickaël Raulet <mraulet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Christophe Gisquet
d1b1c3bb5e
hevc: reorder loops
...
iterate over memory in a more continuous order
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Christophe Gisquet
5ec85c9750
hevc: do generic validation of bitstream
...
After finishing parsing VPS/SPS/PPS/slice header, check remaining bits,
and if an overconsumption occurred, report invalid data.
Liked-by: BBB
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Ronald S. Bultje
bfffce4d08
hevc: add missing comma in log message.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
7117547298
hevc: fix incorrect sao buffer size
...
It previously used the output, cropped size, causing overreads/writes.
Fixes ticket #3839 .
This issue was introduced by d249e682
, which is not part of any release
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
4d1ff2a489
hevc: calculate the dbf strength in hls_pcm_sample() only if dbf is enabled
10 years ago
Michael Niedermayer
3fa9692ae2
avcodec/hevc: move HEVCLocalContext declaration into loop
...
Found-by: CSA
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
243236a6f5
avcodec/hevc: fix "discards const qualifier from pointer target type" warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
772dfd5f6e
avcodec/hevc: add some const to cbf arrays
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Mickaël Raulet
42ffa226f9
hevc: clean up non relevant TODO
...
cherry picked from commit a2ef95f043d89d05482af19460c9e9afdadec685
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
a5c621aa85
hevc: rename variable in boundary strength to b more explicit
...
Signed-off-by: Mickaël Raulet <mraulet@insa-rennes.fr>
cherry picked from commit 348bebedc0012aae201419669fca1eb61ec93ca6
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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