Aman Gupta
c32077c0ee
avcodec/hevc_ps: extract SPS fields required for hvcC construction
...
Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-28 16:47:46 -07:00
Michael Niedermayer
e952d4b7ac
avcodec/hevc_ps: Fix limit of chroma_qp_offset_list_len_minus1
...
A value of 5 is allowed
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 01:52:14 +02:00
James Almer
c9a1cd08ea
avcodec/hevc_ps: improve check for missing default display window bitstream
...
Fixes ticket #6644
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-11 20:01:41 -03:00
Michael Niedermayer
2a83866c9f
avcodec/hevc_ps: Fix undefined shift in pcm code
...
Fixes: runtime error: shift exponent -1 is negative
Fixes: 3091/clusterfuzz-testcase-minimized-6229767969832960
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-29 21:16:32 +02:00
Michael Niedermayer
2b44dcbc44
avcodec/hevc_ps: Check delta_pocs in ff_hevc_decode_short_term_rps()
...
Fixes: integer overflow
Fixes: 2893/clusterfuzz-testcase-minimized-5809330567774208
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-24 11:29:40 +02:00
Michael Niedermayer
74c1c22d7f
avcodec/hevc_ps: fix integer overflow in log2_parallel_merge_level_minus2
...
Fixes: runtime error: signed integer overflow: -2147483647 - 2 cannot be represented in type 'int'
Fixes: 2702/clusterfuzz-testcase-minimized-4511932591636480
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-26 17:06:29 +02:00
Michael Niedermayer
de54a37c1d
avcodec/hevc_ps: Fix integer overflow with beta/tc offsets
...
Fixes: runtime error: signed integer overflow: 2113929216 * 2 cannot be represented in type 'int'
Fixes: 2422/clusterfuzz-testcase-minimized-5242114713583616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-30 16:24:16 +02:00
Michael Niedermayer
63e7bfe78e
avcodec/hevc_ps: Fix max_dec_buffer check
...
Fixes: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'
Fixes: 2339/clusterfuzz-testcase-minimized-6663164320022528
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-25 01:13:17 +02:00
Mark Thompson
88a2e4504d
hevc: Fix scaling list prediction delta for the 32x32 inter matrix
...
Fixes ticket #6356 .
2017-06-14 23:08:26 +01:00
Michael Niedermayer
29808fff33
avcodec/hevc_ps: Fix runtime error: index 32 out of bounds for type 'uint8_t [32]'
...
Fixes: 2010/clusterfuzz-testcase-minimized-6209288450080768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-04 17:51:02 +02:00
Michael Niedermayer
6726328f79
avcodec/hevc_ps: Fix runtime error: signed integer overflow: 2147483628 + 256 cannot be represented in type 'int'
...
Fixes: 1909/clusterfuzz-testcase-minimized-6732072662073344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-31 22:05:32 +02:00
James Almer
000fb61a71
avcodec/hevcdec: export cropping information instead of handling it internally
...
This merges commit a02ae1c683 from libav,
originally written by Anton Khirnov and skipped in
fc63d5ceb3 .
libavcodec/hevc_parser.c | 6 ++++--
libavcodec/hevc_ps.c | 31 ++++++++++++-------------------
libavcodec/hevc_ps.h | 2 --
libavcodec/hevc_refs.c | 18 +++++-------------
libavcodec/hevcdec.c | 7 ++++---
libavcodec/hevcdec.h | 2 --
6 files changed, 25 insertions(+), 41 deletions(-)
Signed-off-by: James Almer <jamrial@gmail.com>
2017-05-26 11:15:45 -03:00
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>
2017-05-05 17:30:36 -03:00
Clément Bœsch
883fe17e3b
Merge commit ' ff9db5cfd1'
...
* commit 'ff9db5cfd1 ':
lavc: Use a stricter check for the color properties values
Merged-by: Clément Bœsch <u@pkh.me>
2017-04-08 14:41:10 +02:00
Clément Bœsch
549045254c
Fix all -Wformat warnings raised by DJGPP
2017-03-29 14:49:29 +02:00
James Almer
4a5810b659
Merge commit ' f6e2f8a9ff'
...
* commit 'f6e2f8a9ff ':
hevcdec: move parameter set parsing into a separate header
Merged-by: James Almer <jamrial@gmail.com>
2017-03-23 15:53:00 -03:00
James Almer
b29c8c995f
Merge commit ' 150c896a9e'
...
* commit '150c896a9e ':
hevcdec: split ff_hevc_diag_scan* declarations into a separate header
Merged-by: James Almer <jamrial@gmail.com>
2017-03-23 15:14:06 -03:00
James Almer
6397815be0
Merge commit ' c359d624d3'
...
* commit 'c359d624d3 ':
hevcdec: move decoder-independent declarations into a separate header
Merged-by: James Almer <jamrial@gmail.com>
2017-03-23 14:27:48 -03:00
Clément Bœsch
038e6aef7a
Merge commit ' 4abe3b049d'
...
* commit '4abe3b049d ':
hevc: rename hevc.[ch] to hevcdec.[ch]
Merged-by: Clément Bœsch <u@pkh.me>
2017-03-23 16:48:41 +01:00
Vittorio Giovara
ff9db5cfd1
lavc: Use a stricter check for the color properties values
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-12-02 11:36:42 -05:00
Carl Eugen Hoyos
0674d1938e
lavc/hevc_ps: Use correct pix_fmt for 10bit 4:0:0.
...
Fixes the second sample from ticket #5544 .
2016-11-14 10:36:25 +01:00
Carl Eugen Hoyos
08be65a075
lavc/hevc_ps: Fix an error message.
2016-11-10 08:22:26 +01:00
Carl Eugen Hoyos
edb8af6e92
lavc/hevc_ps: Use correct pix_fmt for 12bit 4:0:0.
...
Fixes part of ticket #5544 .
2016-11-10 08:11:12 +01:00
Diego Biurrun
67deba8a41
Use avpriv_report_missing_feature() where appropriate
2016-11-08 17:54:34 +01:00
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.
2016-10-16 20:26:47 +02:00
Anton Khirnov
150c896a9e
hevcdec: split ff_hevc_diag_scan* declarations into a separate header
...
This will be useful in the following commits.
2016-10-16 20:26:40 +02:00
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.
2016-10-16 20:26:28 +02:00
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.
2016-10-16 20:26:17 +02:00
Matthieu Bouron
bf011695fd
lavc/hevc: store VPS/SPS/PPS data
2016-09-09 16:35:37 +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
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>
2016-05-07 21:10:59 +01:00
Carl Eugen Hoyos
4405ff2cae
lavc/hevc_ps: Fix default display window offsets for yuv422 and yuv444.
2016-03-13 13:15:17 +01:00
Carl Eugen Hoyos
db4786f1cf
lavc/hevc_ps: Support GBR decoding.
2016-03-13 09:33:38 +01:00
Carl Eugen Hoyos
a6a52ef29a
lavc/hevc_ps: Fix offset for yuv422 and yuv444.
...
Fixes ticket #4980 .
Analyzed-by: kurosu and Hendrik
Reviewed-by: Ronald
2016-03-09 14:00:57 +01:00
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>
2016-02-13 14:19:54 +01:00
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.
2016-02-01 10:34:23 +01:00
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>
2015-11-05 15:04:57 +01:00
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
2015-08-03 15:48:21 +02:00
Michael Niedermayer
94d68a41fa
Merge commit ' 7c6eb0a1b7'
...
* commit '7c6eb0a1b7 ':
lavc: AV-prefix all codec flags
Conflicts:
doc/examples/muxing.c
ffmpeg.c
ffmpeg_opt.c
ffplay.c
libavcodec/aacdec.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/ac3enc_float.c
libavcodec/atrac1.c
libavcodec/atrac3.c
libavcodec/atrac3plusdec.c
libavcodec/dcadec.c
libavcodec/ffv1enc.c
libavcodec/h264.c
libavcodec/h264_loopfilter.c
libavcodec/h264_mb.c
libavcodec/imc.c
libavcodec/libmp3lame.c
libavcodec/libtheoraenc.c
libavcodec/libtwolame.c
libavcodec/libvpxenc.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/mpeg12dec.c
libavcodec/mpeg12enc.c
libavcodec/mpegaudiodec_template.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_motion.c
libavcodec/nellymoserdec.c
libavcodec/nellymoserenc.c
libavcodec/nvenc.c
libavcodec/on2avc.c
libavcodec/options_table.h
libavcodec/opus_celt.c
libavcodec/pngenc.c
libavcodec/ra288.c
libavcodec/ratecontrol.c
libavcodec/twinvq.c
libavcodec/vc1_block.c
libavcodec/vc1_loopfilter.c
libavcodec/vc1_mc.c
libavcodec/vc1dec.c
libavcodec/vorbisdec.c
libavcodec/vp3.c
libavcodec/wma.c
libavcodec/wmaprodec.c
libavcodec/x86/hpeldsp_init.c
libavcodec/x86/me_cmp_init.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:10:35 +02:00
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>
2015-07-27 15:24:58 +01:00
Michael Niedermayer
f8e4d37983
avcodec/hevc_ps: Also print depth in failure path of map_pixel_format()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 05:12:00 +02:00
Luca Barbato
c88c5eef53
hevc: Split the struct setup from the pps parsing
2015-07-15 19:39:44 +02:00
Michael Niedermayer
4e160ecdbc
Merge commit ' c88c5eef53'
...
* commit 'c88c5eef53 ':
hevc: Split the struct setup from the pps parsing
Conflicts:
libavcodec/hevc_ps.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 21:21:40 +02:00
Michael Niedermayer
3edc6d1cd9
Merge commit ' 32c8d89c03'
...
* commit '32c8d89c03 ':
hevc: Print the non-supported chroma_format_idc
Conflicts:
libavcodec/hevc_ps.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 01:33:58 +02:00
Michael Niedermayer
e17a459af0
Merge commit ' 8e373fe048'
...
* commit '8e373fe048 ':
hevc: Factor out the pixel format mapping from the sps parser
Conflicts:
libavcodec/hevc_ps.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 01:23:39 +02:00
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>
2015-07-13 21:59:53 +02:00
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>
2015-07-13 21:59:53 +02:00
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.
2015-07-13 07:49:03 +02:00
Michael Niedermayer
d5fcca83b9
Merge commit ' b11acd5732'
...
* commit 'b11acd5732 ':
hevc: remove HEVCContext usage from hevc_ps
Conflicts:
libavcodec/hevc.c
libavcodec/hevc_cabac.c
libavcodec/hevc_filter.c
libavcodec/hevc_mvs.c
libavcodec/hevc_ps.c
libavcodec/hevc_refs.c
libavcodec/hevcpred_template.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 22:28:54 +02:00
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.
2015-07-12 18:15:39 +02:00