James Almer
1d53b8e907
avcodec/hevcdec: remove HEVCContext usage from ff_hevc_compute_poc()
...
Move it to hevc_ps as well. This is in preparation for a following patch.
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Clément Bœsch
549045254c
Fix all -Wformat warnings raised by DJGPP
8 years ago
Vittorio Giovara
ff9db5cfd1
lavc: Use a stricter check for the color properties values
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years ago
Carl Eugen Hoyos
0674d1938e
lavc/hevc_ps: Use correct pix_fmt for 10bit 4:0:0.
...
Fixes the second sample from ticket #5544 .
8 years ago
Carl Eugen Hoyos
08be65a075
lavc/hevc_ps: Fix an error message.
8 years ago
Carl Eugen Hoyos
edb8af6e92
lavc/hevc_ps: Use correct pix_fmt for 12bit 4:0:0.
...
Fixes part of ticket #5544 .
8 years ago
Diego Biurrun
67deba8a41
Use avpriv_report_missing_feature() where appropriate
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
Matthieu Bouron
bf011695fd
lavc/hevc: store VPS/SPS/PPS data
8 years ago
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>
9 years ago
Hendrik Leppkes
6eb1b40ad8
hevc: fix size condition in ptl parsing
...
When only one sublayer is present, no information is coded. Only when at least two
are present, all 8 sublayers are written.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years ago
Carl Eugen Hoyos
4405ff2cae
lavc/hevc_ps: Fix default display window offsets for yuv422 and yuv444.
9 years ago
Carl Eugen Hoyos
db4786f1cf
lavc/hevc_ps: Support GBR decoding.
9 years ago
Carl Eugen Hoyos
a6a52ef29a
lavc/hevc_ps: Fix offset for yuv422 and yuv444.
...
Fixes ticket #4980 .
Analyzed-by: kurosu and Hendrik
Reviewed-by: Ronald
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
Hendrik Leppkes
f85cc3bf12
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.
9 years ago
Michael Niedermayer
93f30f825c
avcodec/hevc_ps: Check chroma_format_idc
...
Fixes out of array access
Fixes: 24d05e8b84676799c735c9e27d97895e/asan_heap-oob_1b70f6a_2955_7c3652a7f370f9f3ef40642bc2c99bb2.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Hendrik Leppkes
5d324dae11
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
10 years ago
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>
10 years ago
Michael Niedermayer
f8e4d37983
avcodec/hevc_ps: Also print depth in failure path of map_pixel_format()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Luca Barbato
c88c5eef53
hevc: Split the struct setup from the pps parsing
10 years ago
Luca Barbato
32c8d89c03
hevc: Print the non-supported chroma_format_idc
...
And drop the spurious newline.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Luca Barbato
8e373fe048
hevc: Factor out the pixel format mapping from the sps parser
...
The function will grow larger as more formats are supported.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Anton Khirnov
b9f76d19d8
hevc_ps: make sure failing to decode an SPS always returns an error
...
Some of the goto err clauses do not set the error code. It seems better
to fall back on INVALIDDATA instead of adding it everywhere explicitly.
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
Michael Niedermayer
15893adbdb
avcodec/hevc_ps: Remove gotos from ff_hevc_parse_sps()
...
They are currently unnecessary
Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
1dacf26964
avcodec/hevc_ps: Do not return success on failures in ff_hevc_parse_sps()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
57078e4d25
avcodec/hevc_ps: Only discard overread VPS if a previous is available
...
Fixes Ticket4621
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
04da0d2586
avcodec/hevc_ps: Move log2_ctb_size checks up to prevent undefined shift operations
...
Fixes CID1292293
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
65e5032955
avcodec/hevc_ps: Explicitly check num_tile_* for negative values
...
This fixes nothing but maybe helps coverity which does not see that this is failing later
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
b195aa5d52
avcodec/hevc_ps: Check vps_num_hrd_parameters
...
Fix CID1239052 part2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
16c95b1073
avcodec/hevc_ps: More completely check vps_num_layer_sets
...
Fixes CID1239052 part1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
0e7444f6e4
avcodec/hevc: Remove current_sps
...
The variable should not be needed anymore
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
ba625dd8a1
avcodec: use av_mod_uintp2() where useful
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Anton Khirnov
df528b11ac
hevc: make sure no dangling pointers remain around on VPS/SPS change
10 years ago
Anton Khirnov
ce0bc09ee2
hevc: do not change the VPS if its contents are the same
...
This is the same as is done for SPS.
10 years ago
Michael Niedermayer
06c70d4537
avcodec/hevc_ps: Check cropping parameters more correctly
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
5127c00b97
hevc: zero the correct variables on invalid crop parameters
...
It's the output_window that is applied to the output frame, not
pic_conf_win
10 years ago
Michael Niedermayer
701c965a76
avcodec/hevc_ps: Check that log2_ctb_size is not smaller than the bounds of all profiles
...
Fixes: unaligned memory access
Fixes: signal_sigsegv_3344165_576_cov_3406448105_DBLK_A_MAIN10_VIXS_2.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Suggested-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
205b2ba3d6
avcodec/hevc_ps: Sanity checks for some log2_* values
...
log2 values which imply numeric overflow are not supported
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Mickaël Raulet
7cf6a67ef9
avcodec/hevc: adding support for monochrome sequences in hevc
...
cherry picked from commit 8e50557707d2ec11ccad657470b2e140f314348e
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3281fa8925
avcodec/hevc_ps: Check diff_cu_qp_delta_depth
...
Fixes undefined behavior
Fixes: asan_static-oob_17aa046_582_cov_1577759978_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
1adc1b97e1
avcodec/hevc_ps: Add context to av_log() call
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ea38e5a6b7
avcodec/hevc_ps: Check num_long_term_ref_pics_sps
...
Fixes out of array access
Fixes: signal_sigsegv_35bd0f0_1182_cov_791726764_STRUCT_B_Samsung_4.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
57e5812198
avcodec/hevc_ps: More complete window reset
...
Fixes out of array read
Fixes: signal_sigsegv_35bcf26_471_cov_2806540268_CAINIT_A_SHARP_4.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9f9440bd81
avcodec/hevc_ps: Check return code from pps_range_extensions()
...
Fixes out of array read
Fixes: asan_heap-oob_177e222_885_cov_1532528832_MERGE_D_TI_3.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago