summaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_ps.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/hevc_ps: Remove dead code in vps_id checkAndriy Gelman2019-09-261-8/+0
| | | | | | | | Since reading 4 bits always returns a value in the range [0, 15], the check for vps_id >= HEVC_MAX_VPS_COUNT, where HEVC_MAX_VPS_COUNT = 16, is redundant. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_ps: fix range of num_tile_{columns,rows}_minus1James Almer2019-07-051-2/+2
| | | | | | | | | | From 7.4.3.3.1: num_tile_columns_minus1 shall be in the range of 0 to PicWidthInCtbsY - 1, inclusive. num_tile_rows_minus1 shall be in the range of 0 to PicHeightInCtbsY - 1, inclusive. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_ps: Change num_tile_rows/columns checks to sps->ctb_height/weightMichael Niedermayer2019-06-301-2/+2
| | | | | | Suggested-by: James Almer <jamrial@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_ps: Fix integer overflow with num_tile_rows and num_tile_columnsMichael Niedermayer2019-06-301-10/+13
| | | | | | | | | Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' Fixes: 14880/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5130977304641536 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_ps: Expose all SPS and PPS range extension flagsPhilip Langdale2019-02-161-11/+8
| | | | | | | We need all the flags to be exposed to be able to pass them on to HW decoders. I did not attempt to nuance any of the warnings about flags being unsupported as there's no way, at the point we extract flags, to say whether an HW decoder is being used.
* lavc/hevc_ps: fix crop info for monochromeZhao Zhili2018-08-221-4/+12
| | | | | | | The values of SubWidthC and SubHeightC are 1 in the ITU-T H.265. The current code use the value of 2. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/hevc_ps: use skip_bits instead of get_bits when skip bits.Jun Zhao2018-07-131-1/+1
| | | | | | use skip_bits when want to skip some bits. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavc/hevc_ps: Refine sps_range_extension parse.Jun Zhao2018-07-131-4/+2
| | | | Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavc/hevc_ps: Use correct pix_fmt AV_PIX_FMT_GRAY9 for 9-bit 4:0:0 input.Carl Eugen Hoyos2018-05-251-1/+1
|
* avcodec/nvdec_hevc: add support for new extended sps/pps flags from SDK 8.1Timo Rothenpieler2018-04-131-3/+2
|
* avcodec/hevc_ps: Check log2_sao_offset_scale_*Michael Niedermayer2018-01-301-0/+5
| | | | | | | | Fixes: 4868/clusterfuzz-testcase-minimized-6236542906400768 Fixes: runtime error: shift exponent 126 is too large for 32-bit type 'int' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_ps: add a function to uninitialize parameter set buffersJames Almer2018-01-211-0/+16
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '1329c08ad6d2ddb304858f2972c67b508e8b0f0e'James Almer2017-11-111-2/+2
|\ | | | | | | | | | | | | | | | | * commit '1329c08ad6d2ddb304858f2972c67b508e8b0f0e': hevc: Validate the number of long term reference pictures See ea38e5a6b75706477898eb1e6582d667dbb9946c Merged-by: James Almer <jamrial@gmail.com>
| * hevc: Validate the number of long term reference picturesMark Thompson2017-08-051-0/+6
| | | | | | | | | | This would overflow if the stream contained a value greater than the maximum allowed by the standard (32).
| * hevc: Improve stream constraint values in common headerMark Thompson2017-08-051-1/+1
| | | | | | | | | | | | | | | | Add comments to describe the sources of the constraint values expressed here, and add some more related values which will be used in following patches. Fix the incorrect values for SPS and PPS count (they are not the same as those used for H.264), and remove HEVC_MAX_CU_SIZE because it is not used anywhere.
| * golomb: Convert to the new bitstream readerDiego Biurrun2017-01-311-1/+1
| |
| * hevcdec: export cropping information instead of handling it internallyAnton Khirnov2017-01-121-21/+12
| |
* | hevc: Improve stream constraint values in common headerMark Thompson2017-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | Add comments to describe the sources of the constraint values expressed here, and add some more related values which will be used in following patches. Fix the incorrect values for SPS and PPS count (they are not the same as those used for H.264), and remove HEVC_MAX_CU_SIZE because it is not used anywhere. (cherry picked from commit b88da98b34809dedf8882d43ed543632ed233538)
* | avcodec/hevc_ps: extract SPS fields required for hvcC constructionAman Gupta2017-09-281-1/+2
| | | | | | | | | | Signed-off-by: Aman Gupta <aman@tmm1.net> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc_ps: Fix limit of chroma_qp_offset_list_len_minus1Michael Niedermayer2017-09-121-1/+1
| | | | | | | | | | | | A value of 5 is allowed Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc_ps: improve check for missing default display window bitstreamJames Almer2017-09-111-6/+27
| | | | | | | | | | | | | | Fixes ticket #6644 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/hevc_ps: Fix undefined shift in pcm codeMichael Niedermayer2017-08-291-3/+3
| | | | | | | | | | | | | | | | 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>
* | avcodec/hevc_ps: Check delta_pocs in ff_hevc_decode_short_term_rps()Michael Niedermayer2017-08-241-0/+12
| | | | | | | | | | | | | | | | 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>
* | avcodec/hevc_ps: fix integer overflow in log2_parallel_merge_level_minus2Michael Niedermayer2017-07-261-3/+5
| | | | | | | | | | | | | | | | 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>
* | avcodec/hevc_ps: Fix integer overflow with beta/tc offsetsMichael Niedermayer2017-06-301-6/+8
| | | | | | | | | | | | | | | | 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>
* | avcodec/hevc_ps: Fix max_dec_buffer checkMichael Niedermayer2017-06-251-2/+2
| | | | | | | | | | | | | | | | 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>
* | hevc: Fix scaling list prediction delta for the 32x32 inter matrixMark Thompson2017-06-141-0/+1
| | | | | | | | Fixes ticket #6356.
* | avcodec/hevc_ps: Fix runtime error: index 32 out of bounds for type 'uint8_t ↵Michael Niedermayer2017-06-041-0/+6
| | | | | | | | | | | | | | | | | | [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>
* | avcodec/hevc_ps: Fix runtime error: signed integer overflow: 2147483628 + ↵Michael Niedermayer2017-05-311-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | avcodec/hevcdec: export cropping information instead of handling it internallyJames Almer2017-05-261-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merges commit a02ae1c6837a54ed9e7735da2b1f789b2f4b6e13 from libav, originally written by Anton Khirnov and skipped in fc63d5ceb357c4b760cb02772de0b50d0557140f. 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>
* | avcodec/hevcdec: remove HEVCContext usage from ff_hevc_compute_poc()James Almer2017-05-051-0/+23
| | | | | | | | | | | | | | | | 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>
* | Merge commit 'ff9db5cfd14558df9cfcc54d6c062bc34bf1f341'Clément Bœsch2017-04-081-3/+3
|\ \ | |/ | | | | | | | | | | * commit 'ff9db5cfd14558df9cfcc54d6c062bc34bf1f341': lavc: Use a stricter check for the color properties values Merged-by: Clément Bœsch <u@pkh.me>
| * lavc: Use a stricter check for the color properties valuesVittorio Giovara2016-12-021-3/+3
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * Use avpriv_report_missing_feature() where appropriateDiego Biurrun2016-11-081-4/+3
| |
* | Fix all -Wformat warnings raised by DJGPPClément Bœsch2017-03-291-1/+1
| |
* | Merge commit 'f6e2f8a9ffda2247bffba991450990d075ea68e3'James Almer2017-03-231-7/+7
|\ \ | |/ | | | | | | | | | | * commit 'f6e2f8a9ffda2247bffba991450990d075ea68e3': hevcdec: move parameter set parsing into a separate header Merged-by: James Almer <jamrial@gmail.com>
| * hevcdec: move parameter set parsing into a separate headerAnton Khirnov2016-10-161-7/+7
| | | | | | | | | | This code is independent from the decoder, so it makes more sense for it to to have its own header.
* | Merge commit '150c896a9e46b23b97debb0a5f66fbaeaa32f153'James Almer2017-03-231-0/+1
|\ \ | |/ | | | | | | | | | | * commit '150c896a9e46b23b97debb0a5f66fbaeaa32f153': hevcdec: split ff_hevc_diag_scan* declarations into a separate header Merged-by: James Almer <jamrial@gmail.com>
| * hevcdec: split ff_hevc_diag_scan* declarations into a separate headerAnton Khirnov2016-10-161-0/+1
| | | | | | | | This will be useful in the following commits.
* | Merge commit 'c359d624d3efc3fd1d83210d78c4152bd329b765'James Almer2017-03-231-8/+8
|\ \ | |/ | | | | | | | | | | * commit 'c359d624d3efc3fd1d83210d78c4152bd329b765': hevcdec: move decoder-independent declarations into a separate header Merged-by: James Almer <jamrial@gmail.com>
| * hevcdec: move decoder-independent declarations into a separate headerAnton Khirnov2016-10-161-8/+8
| | | | | | | | | | | | | | 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.
* | Merge commit '4abe3b049d987420eb891f74a35af2cebbf52144'Clément Bœsch2017-03-231-1/+1
|\ \ | |/ | | | | | | | | | | * commit '4abe3b049d987420eb891f74a35af2cebbf52144': hevc: rename hevc.[ch] to hevcdec.[ch] Merged-by: Clément Bœsch <u@pkh.me>
| * hevc: rename hevc.[ch] to hevcdec.[ch]Anton Khirnov2016-10-161-1/+1
| | | | | | | | | | This is more consistent with the rest of libav and frees up the hevc.h name for decoder-independent shared declarations.
| * hevc: set profile based on the profile compatibility flags if neededHendrik Leppkes2016-07-201-1/+5
| | | | | | | | | | | | | | 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>
| * dxva2_hevc: properly signal the num_delta_pocs from the SPS RPSHendrik Leppkes2016-02-131-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | lavc/hevc_ps: Use correct pix_fmt for 10bit 4:0:0.Carl Eugen Hoyos2016-11-141-1/+1
| | | | | | | | Fixes the second sample from ticket #5544.
* | lavc/hevc_ps: Fix an error message.Carl Eugen Hoyos2016-11-101-3/+2
| |
* | lavc/hevc_ps: Use correct pix_fmt for 12bit 4:0:0.Carl Eugen Hoyos2016-11-101-1/+1
| | | | | | | | Fixes part of ticket #5544.
* | lavc/hevc: store VPS/SPS/PPS dataMatthieu Bouron2016-09-091-0/+36
| |
* | hevc: fix size condition in ptl parsingHendrik Leppkes2016-05-071-1/+1
| | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud