summaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'a1c2b48018b09d2613f075ec0748c95bd520ac00'Michael Niedermayer2014-05-191-5/+5
|\ | | | | | | | | | | | | | | | | | | * commit 'a1c2b48018b09d2613f075ec0748c95bd520ac00': hevc: templatize intra_pred Conflicts: libavcodec/hevc.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: templatize intra_predAnton Khirnov2014-05-191-5/+5
| |
* | hevc: fix key_frame as an IRAPMickaël Raulet2014-05-171-1/+2
| | | | | | | | | | | | it was always 1 before with ISOBMFF(cherry picked from commit fb1402b1ec78d80acd6ced76bf78d65560965c4c) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Fix undefined shiftsMichael Niedermayer2014-05-091-4/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: remove unused variableMichael Niedermayer2014-05-071-1/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: C code update for new motion compensationMickaël Raulet2014-05-061-229/+325
| | | | | | | | | | | | | | pretty print C Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: fix no output of prior pics and pic output flags(cherry picked ↵gcocherel2014-04-291-0/+27
| | | | | | | | | | | | from commit e99b96dff1d76d74cb5633aa9702828d863050e2) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Export picture typeMichael Niedermayer2014-03-261-0/+4
| | | | | | | | | | | | | | | | | | This only uses the first slice, improvement here is welcome analyzing all slices the trivial way would interfere with threads Fixes Ticket3185 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ed06e5d92b4c67b49068d538461fbbe0a53a8c5e'Michael Niedermayer2014-03-091-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'ed06e5d92b4c67b49068d538461fbbe0a53a8c5e': hevc: Do not turn 32bit timebases into negative numbers Conflicts: libavcodec/hevc.c See: bf2ce19e51fde57727a4ee33a4b3c2622f37a5c4 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: Do not turn 32bit timebases into negative numbersMichael Niedermayer2014-03-091-1/+1
| | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
| * hevc: use av_mallocz() for allocating tab_ipmMichael Niedermayer2014-03-091-1/+1
| | | | | | | | | | Fixes use of uninitialized memory and out of stack array read. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-02-191-14/+16
|\ \ | |/ | | | | | | | | | | * qatar/master: hevc: Always consider VLC NALU type mismatch fatal Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: Always consider VLC NALU type mismatch fatalLuca Barbato2014-02-191-14/+16
| | | | | | | | | | | | Sample-Id: 00001667-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | avcodec/hevc: Dont turn 32bit timebases into negative numbersMichael Niedermayer2014-02-151-1/+1
| | | | | | | | | | | | | | Fixes assertion failure Fixes: 499f6ecaeae8e3f79a115a72c61ffd15-asan_static-oob_124a175_2792_cov_1782273879_RPLM_A_qualcomm_4.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: remove FFUMOD() in slice qp_y initMichael Niedermayer2014-02-081-2/+1
| | | | | | | | | | | | This has become redundant Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: remove unused variablesMichael Niedermayer2014-02-081-2/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Simplify get_qPy_pred()Michael Niedermayer2014-02-081-1/+15
| | | | | | | | | | | | | | Fixes use of uninitialized memory Fixes: 93728afd9aa074ba14a09bfd93a632fd-asan_static-oob_124a17d_1445_cov_1021181966_DBLK_D_VIXS_1.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: make check for previous slice segment tighterMichael Niedermayer2014-02-081-1/+1
| | | | | | | | | | | | This ensures the previous one is matching the curent and not just any Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: hls_decode_entry: check that the previous slice segment is ↵Michael Niedermayer2014-02-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | available before decoding the next Fixes use of uninitialized memory Fixes out of array read Fixes assertion failure Fixes part of cb307d24befbd109c6f054008d6777b5/asan_static-oob_124a175_1445_cov_2355279992_DBLK_D_VIXS_1.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: clear tab_slice_address of ctb on error.Michael Niedermayer2014-02-071-2/+7
| | | | | | | | | | | | This allows us to detect which areas have failed to decode Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: clear tab_slice_address in hevc_frame_start()Michael Niedermayer2014-02-071-0/+3
| | | | | | | | | | | | | | | | Fixes inconsistencies Fixes use of uninitilaized memory Fixes part of cb307d24befbd109c6f054008d6777b5/asan_static-oob_124a175_1445_cov_2355279992_DBLK_D_VIXS_1.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b25e84b7399bd91605596b67d761d3464dbe8a6e'Michael Niedermayer2014-02-041-0/+8
|\ \ | |/ | | | | | | | | | | * commit 'b25e84b7399bd91605596b67d761d3464dbe8a6e': hevc: check that the VCL NAL types are the same for all slice segments of a frame Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: check that the VCL NAL types are the same for all slice segments of a ↵Anton Khirnov2014-02-041-0/+8
| | | | | | | | | | | | | | | | | | | | 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
* | Merge commit '816e5b997028c8215c804b1e58b2388592ed612b'Michael Niedermayer2014-02-021-0/+5
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '816e5b997028c8215c804b1e58b2388592ed612b': hevc: Reject impossible slice segment Conflicts: libavcodec/hevc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: Reject impossible slice segmentLuca Barbato2014-02-011-0/+5
| | | | | | | | | | | | | | | | | | A dependent slice cannot have address 0. Prevent an out of array bound load in ff_hevc_cabac_init(). Sample-Id: 00001406-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | avcodec/hevc: propagate error code from hls_coding_quadtree()Michael Niedermayer2014-02-021-2/+8
| | | | | | | | | | | | | | | | Fixes use of uninitialized memory Fixes out of array read Fixes: asan_static-oob_123cee5_2630_cov_1869071233_PICSIZE_A_Bossen_1.bin Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac'Michael Niedermayer2014-01-211-23/+54
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac': hevc: Bound check cu_qp_delta Conflicts: libavcodec/hevc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: Bound check cu_qp_deltaLuca Barbato2014-01-211-23/+54
| | | | | | | | | | The T-REC-H.265-2013044 page 91 states it has to be in the range [-(26 + s->sps->qp_bd_offset / 2), (25 + s->sps->qp_bd_offset / 2)].
* | Merge commit '0d999333f96a34903448579bf13a3209deaee9da'Michael Niedermayer2014-01-211-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '0d999333f96a34903448579bf13a3209deaee9da': hevc: Bound check slice_qp Conflicts: libavcodec/hevc.c See: aead772b5814142b0e530804486ff7970ecd9eef Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: Bound check slice_qpLuca Barbato2014-01-211-1/+12
| | | | | | | | | | | | | | | | | | The T-REC-H.265-2013044 page 79 states it has to be in the range [-s->sps->qp_bd_offset, 51]. Sample-Id: 00001386-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | Merge commit '838740e6420538ad45982da6b1d3aa3ae91307f5'Michael Niedermayer2014-01-211-2/+2
|\ \ | |/ | | | | | | | | | | * commit '838740e6420538ad45982da6b1d3aa3ae91307f5': hevc: Prevent some integer overflows Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: Prevent some integer overflowsLuca Barbato2014-01-211-2/+2
| | | | | | | | | | | | | | | | get_ue_golomb_long() returns an unsigned. Sample-Id: 00001541-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
| * hevc: Fix modulo operationsMichael Niedermayer2014-01-211-2/+2
| | | | | | | | | | | | | | Keep qp fields within the range. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec/hevc: Check entry point arrays for malloc failureMichael Niedermayer2014-01-131-0/+5
| | | | | | | | | | | | | | Fixes null pointer dereference Fixes: signal_sigsegv_e1d3b6_2192_DBLK_F_VIXS_2.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: Bound check slice_qpLuca Barbato2014-01-131-1/+11
| | | | | | | | | | | | | | | | | | | | The T-REC-H.265-2013044 page 79 states they have to be into the range [-s->sps->qp_bd_offset, 51]. Fixes: asan_stack-oob_eae8e3_9522_WP_MAIN10_B_Toshiba_3.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: Reject impossible dependent tileLuca Barbato2014-01-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | The tile 0 cannot depend on a previous one. Prevent an out of array bound load in ff_hevc_cabac_init(). Fixes: asan_heap-oob_e3a924_1630_DBLK_A_MAIN10_VIXS_2.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Reviewed-by: Guillaume Martres <smarter@ubuntu.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: use av_mallocz() for allocating tab_ipmMichael Niedermayer2014-01-111-1/+1
| | | | | | | | | | | | | | Fixes use of uninitialized memory and out of stack array read Fixes: signal_sigsegv_ecc526_7846_WPP_C_ericsson_MAIN_2.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e588615d938f8581f0d6f3771662d08cadfc00de'Michael Niedermayer2014-01-091-17/+18
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'e588615d938f8581f0d6f3771662d08cadfc00de': hevc: fix decoding of one PU wide files Conflicts: libavcodec/hevc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: fix decoding of one PU wide filesGuillaume Martres2014-01-091-15/+18
| | | | | | | | | | | | | | 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>
| * hevc: support luma bit depth != chroma bit depth for PCM coding unitsMickaël Raulet2013-12-201-3/+3
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * hevc: store profile and level in AVCodecContextGildas Cocherel2013-12-201-0/+3
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec/hevc: Fix modulo operationsMichael Niedermayer2014-01-061-2/+2
| | | | | | | | | | | | | | Fixes qp fields becoming out of range Fixes: asan_static-oob_e393a3_6998_WPP_A_ericsson_MAIN10_2.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: clear HEVClc when its deallocated in hevc_decode_free()Michael Niedermayer2013-12-311-0/+2
| | | | | | | | | | | | | | Fixes reading freed memory Fixes: asan_heap-uaf_1abf8ef_3987_NUT_A_ericsson_4.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2a41826bea3833895dc06939831b7f35ca1f597e'Michael Niedermayer2013-12-211-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '2a41826bea3833895dc06939831b7f35ca1f597e': lavc: add HEVC profiles names Conflicts: libavcodec/hevc.c libavcodec/version.h See: fb7d70c1cd95529cbbbeeab5e9fa3b200ef2545c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: add HEVC profiles namesGildas Cocherel2013-12-201-0/+9
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * hevc: set time_base when possibleGuillaume Martres2013-12-111-0/+14
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * hevc: store the VPS list as an AVBufferRef, just like the others *PSGildas Cocherel2013-12-111-2/+11
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * hevc: do not dereference pointer before NULL check in verify_md5()Michael Niedermayer2013-12-111-1/+3
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | hevc: rename ptl structs and variablesGuillaume Martres2013-12-141-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: Correctly set time_baseGuillaume Martres2013-12-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | - Try reading the time_base information from the VPS too, not just the VUI - Only set time_base when an SPS is activated, not when it's decoded. - Reduce the fraction before setting it. - Don't set anything if the fraction is invalid (because the VUI is not present or because the encoded value is invalid). Conflicts: libavcodec/hevc_ps.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud