summaryrefslogtreecommitdiff
path: root/libavcodec/hevc.c
Commit message (Collapse)AuthorAge
* avcodec/hevc: Remove unused variableMichael Niedermayer2015-05-20
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/hevc: Fix typo in num_entry_point_offsets checkMichael Niedermayer2015-05-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* hevc: make avcodec_decode_video2() fail if get_format() failswm42015-05-14
| | | | | | | | | | | | Personally, I need the decoder to back out if get_format() returns no usable pixel format. This didn't work because the error code was not propagated down the call chain. This in turn happened because the variable declaration removed in this patch shadowed the variable, whose value is returned at the end of the function. Consequently, failures of decode_nal_unit() were ignored in this place. Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/hevc: Simplify entry_point_offset parsingMichael Niedermayer2015-05-13
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/hevc: Check num_entry_point_offsetsMichael Niedermayer2015-05-13
| | | | | | Fixes CID1239099 part 2 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/hevc: Check offset_lenMichael Niedermayer2015-05-13
| | | | | | Fixes CID1239099 part 1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/hevc: Fix order of operations in hls_decode_neighbour()Michael Niedermayer2015-05-12
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/hevc: Remove current_spsMichael Niedermayer2015-04-28
| | | | | | The variable should not be needed anymore Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec: use av_mod_uintp2() where usefulJames Almer2015-04-21
| | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '7693ba0a0eecdcdba71b7fbd9a4a12d1ba7b82aa'Michael Niedermayer2015-04-03
|\ | | | | | | | | | | | | * commit '7693ba0a0eecdcdba71b7fbd9a4a12d1ba7b82aa': hevc: export stream parameters from extradata Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: export stream parameters from extradataAnton Khirnov2015-04-03
| | | | | | | | | | This allows the callers to have a hint of the probable stream parameters without actually decoding anything.
* | Merge commit '1ae7afd256f9af1eb4f63f9adcf03d581ce4e2b5'Michael Niedermayer2015-04-03
|\| | | | | | | | | | | | | | | | | | | * commit '1ae7afd256f9af1eb4f63f9adcf03d581ce4e2b5': hevc: split out setting AVCodecContext parameters Conflicts: libavcodec/hevc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: split out setting AVCodecContext parametersAnton Khirnov2015-04-03
| | | | | | | | | | | | Additionally always set the software pixel format, so it's available even if ff_get_format() is not called later. This will be useful for exporting stream parameters from init().
* | hevc: avoid unnecessary calls to get_formatRainer Hochecker2015-03-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Fix undefined shiftsMichael Niedermayer2015-03-16
| | | | | | | | | | | | Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: delay ff_thread_finish_setup for hwaccelRainer Hochecker2015-03-12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: Use av_clip_uintp2() where possibleMichael Niedermayer2015-02-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'eea769df322fac2601a96db195fa7dc8d12a8fbc'Michael Niedermayer2015-02-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'eea769df322fac2601a96db195fa7dc8d12a8fbc': hevc: Use generic av_clip function, not C implementation Conflicts: libavcodec/hevc.c libavcodec/hevc_filter.c libavcodec/hevc_mvs.c See: 83976e40e89655162e5394cf8915d9b6d89702d9 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: Use generic av_clip function, not C implementationPeter Meerwald2015-02-13
| | | | | | | | | | | | | | | | | | hevc seems to be the only place where the C implementation of the av_clip function is explicitly selected, precluding platform-specific optimizations Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * Add DXVA2 HEVC HWAccelHendrik Leppkes2015-01-27
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * hevc: reindent after previous commitHendrik Leppkes2015-01-27
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * hevc: add hwaccel hooksHendrik Leppkes2015-01-27
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * hevc: store the short term rps flag and size in the contextHendrik Leppkes2015-01-27
| | | | | | | | | | | | For future use by hardware accelerators. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * hevc: store the escaped/raw bitstream in HEVCNALHendrik Leppkes2015-01-27
| | | | | | | | | | | | Hardware Accelerators require access to the escaped bitstream. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * hevc: pass the full HEVCNAL struct to decode_nal_unitHendrik Leppkes2015-01-27
| | | | | | | | | | | | | | This enables decode_nal_unit to access additional fields added in subsequent commits. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec/hevc: drop redundant ifs()Michael Niedermayer2015-02-05
| | | | | | | | | | Found-by: Clément Bœsch <u@pkh.me> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: free sao buffers when receiving a new SPSChristophe Gisquet2015-02-05
| | | | | | | | | | | | | | The buffer pointers would be otherwise overwritten, causing a leak on e.g. PERSIST_RPARAM_A_RExt_Sony_1. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Update the USE_SAO_SMALL_BUFFER case for the alignment ↵Christophe Gisquet2015-02-04
| | | | | | | | | | | | | | | | | | | | | | | | requirements in FFmpeg Use edge emu buffers And enable the code unconditionally Speed difference without USE_SAO_SMALL_BUFFER and with the new code: Decicycles: 26772->26220 (BO32), 83803->80942 (BO64) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Do not zero is_pcm on allocationChristophe Gisquet2015-02-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: reduce memory for SAOFabrice Bellard2015-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cherry picked from commit 5d9f79edef2c11b915bdac3a025b59a32082f409 SAO edge filter uses pre-SAO pixel data on the left and top of the ctb, so this data must be kept available. This was done previously by having 2 copies of the frame, one before and one after SAO. This commit reduces the storage to just that, instead of the previous whole frame. Commit message taken from patch by Christophe Gisquet <christophe.gisquet@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: adding support for monochrome sequences in hevcMickaël Raulet2015-02-02
| | | | | | | | | | | | cherry picked from commit 8e50557707d2ec11ccad657470b2e140f314348e Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | x86: hevc/sao: aligned source buffersChristophe Gisquet2015-02-01
| | | | | | | | | | | | | | | | | | | | | | | | Usefull for at least band filter, for which: - Band filter call only: 32 64 Before: 16556 54015 After: 16497 52355 - Whole case: 32 64 Before: 37031 103008 After: 32045 93952
* | avcodec/hevc: Check for av_malloc failureMichael Niedermayer2015-01-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Replace more mallocs by av_malloc_array()Michael Niedermayer2015-01-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '443b71928b2f36362e805c037751e6c3c79ea4e8'Michael Niedermayer2015-01-27
|\| | | | | | | | | | | | | | | | | | | * commit '443b71928b2f36362e805c037751e6c3c79ea4e8': hevc: unref the current frame if frame_start() fails Conflicts: libavcodec/hevc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: unref the current frame if frame_start() failsAnton Khirnov2015-01-27
| | | | | | | | Prevents DPB from filling up with damaged input.
* | Add DXVA2 HEVC HWAccelHendrik Leppkes2015-01-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: reindent after previous commitHendrik Leppkes2015-01-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: add hwaccel hooksHendrik Leppkes2015-01-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: store the short term rps flag and size in the contextHendrik Leppkes2015-01-27
| | | | | | | | | | | | For future use by hardware accelerators. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: store the escaped/raw bitstream in HEVCNALHendrik Leppkes2015-01-27
| | | | | | | | | | | | Hardware Accelerators require access to the escaped bitstream. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: pass the full HEVCNAL struct to decode_nal_unitHendrik Leppkes2015-01-24
| | | | | | | | | | | | | | This enables decode_nal_unit to access additional fields added in subsequent commits. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Fix handling of skipped_bytes() reallocation failuresMichael Niedermayer2015-01-13
| | | | | | | | | | | | Fixes CID1260704 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: move qp_block_mask to where its usedMichael Niedermayer2014-12-18
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: clear filter_slice_edges() on allocationMichael Niedermayer2014-12-17
| | | | | | | | | | | | | | 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>
* | avcodec/hevc: Print an error if luma_log2_weight_denom is out of rangeMichael Niedermayer2014-12-15
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b2bece5e9a4dd96142962c6798e187c77b88bbfa'Michael Niedermayer2014-12-15
|\| | | | | | | | | | | | | * commit 'b2bece5e9a4dd96142962c6798e187c77b88bbfa': hevc: always clip luma_log2_weight_denom Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: always clip luma_log2_weight_denomVittorio Giovara2014-12-15
| | | | | | | | | | | | | | Its value shall be between 0 and 7 according to the specifications. CC: libav-stable@libav.org Bug-Id: CID 1257502
* | avcodec/hevc: Silence "warning: ref0/1 may be used uninitialized in this ↵Michael Niedermayer2014-12-11
| | | | | | | | | | | | | | | | function" Also make code more robust by initializing the pointers to NULL Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'cd975d5658a1cbe99939df75db59d5ae9fbcb4e0'Michael Niedermayer2014-11-22
|\| | | | | | | | | | | | | | | | | | | * commit 'cd975d5658a1cbe99939df75db59d5ae9fbcb4e0': hevc: Spin the mv_mpv_mode calls in a stand alone function Conflicts: libavcodec/hevc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>