summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_parser.c
Commit message (Collapse)AuthorAge
* avcodec/cavsdec, h264*, hevc_parser: Use get_ue_golomb_31 where possibleAndreas Rheinhardt2020-07-29
| | | | | | | | | | instead of get_ue_golomb(). The difference between the two is that the latter also has to take into account the case in which the read code is more than 9 bits (four preceding zeroes + at most five value bits) long, leading to more code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* hevc_parser: drop the use of SliceHeaderAnton Khirnov2020-06-08
| | | | | It is only used to store a few local variables within one function, which is better accomplished by just declaring them on stack explicitly.
* avcodec/hevc: add support for Frame Duplication (Doubling/Tripling)Praveen Karadugattu2020-02-06
| | | | Parse picture_struct SEI value.
* lavc/h2645_parse: Don't automatically remove nuh_layer_id > 0 packetsAndriy Gelman2020-01-17
| | | | | | | | | | | | | | | | | | | HEVC standard supports multi-layer streams (ITU-T H.265 02/2018 Annex F). Each NAL unit belongs to a particular layer defined by nuh_layer_id in the header. Currently, all NAL units that do not belong to a base layer are automatically removed in ff_h2645_packet_split(). Some data may therefore be lost when future filters/decoders are designed to support multi-layer streams. A better approach is to forward nuh_layer_id > 0 packets and let blocks down the chain decide how to process them. The condition to remove packets has been moved to hevcdec and cbs. Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* h2645_parse: Make ff_h2645_packet_split reference-compatibleAndreas Rheinhardt2019-01-23
| | | | | | | This is in preparation for a patch for cbs_h2645. Now the packet's rbsp_buffer can be owned by an AVBuffer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
* lavc/hevc_parser: report detailed log when missing picture occursLinjie Fu2019-01-12
| | | | | | | | | | Report the detailed log with buf_size in parse_nal_units to provide more information when picture could not be found. Match the behaviour in h264_parser. Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_parser: very minor simplification in hevc_parse()Michael Niedermayer2018-09-30
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/hevc: Don't parse NAL unit for a dummy bufferHaihao Xiang2018-09-30
| | | | | | | | | | | | hevc parser mistakenly reports the following message if a dummy buffer is padded for EOF [hevc @ 0x559b63848610] missing picture in access unit Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Reviewed-by: "Li, Zhong" <zhong.li@intel.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_parser: use ff_hevc_decode_extradata() to parse extradataJames Almer2018-01-30
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_parser: use ff_hevc_uninit_parameter_sets()James Almer2018-01-21
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: rename HEVCSEIContext to HEVCSEIJames Almer2017-10-31
| | | | | | | Cosmetic change skipped in 0b30cb8dae5e7edb2a5f35900547321499c217f1 by mistake. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevcdec: export cropping information instead of handling it internallyJames Almer2017-05-26
| | | | | | | | | | | | | | | | 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>
* hevc: fix race condition in max_ra/seq_decode.Ronald S. Bultje2017-05-25
| | | | | | | | | | These variables are shared between frame threads, but they are updated post-setup_finished() if a EOB/EOS slice type occurs. Moving the EOB/EOS slices to the next frame thread instance (by parsing them leading into the next picture instead of trailing behind the last picture) effectively prevents this race condition. This fixes tsan failures on hevc-conformance-NoOutPrior_A_Qualcomm_1.
* avcodec/hevc_parser: add missing call to ff_hevc_reset_sei()James Almer2017-05-18
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_parser: cosmeticsJames Almer2017-05-05
| | | | | | Reduces differences with libav slightly. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_parser: move hevc_find_frame_end() down in the fileJames Almer2017-05-05
| | | | Reduces differences with libav.
* avcodec/hevc_parser: move slice header parsing to its own functionJames Almer2017-05-05
| | | | | | Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_parser: remove HEVCContext usageJames Almer2017-05-05
| | | | | | | | This gets rid of the duplicate, limited parser. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_parser: use ff_h2645_packet_split() to parse NAL unitsJames Almer2017-05-05
| | | | | | | | This simplifies the code considerably. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevcdec: remove HEVCContext usage from ff_hevc_compute_poc()James Almer2017-05-05
| | | | | | | | 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>
* avcodec/hevcdec: remove HEVCContext usage from hevc_seiJames Almer2017-05-05
| | | | | | | | Based on the H264 SEI implementation. 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 '0bfdcce4d42a6e654c00ea5f9237dc987626457f'James Almer2017-03-23
|\ | | | | | | | | | | | | * commit '0bfdcce4d42a6e654c00ea5f9237dc987626457f': hevc: move the SliceType enum to hevc.h Merged-by: James Almer <jamrial@gmail.com>
* | Merge commit 'c359d624d3efc3fd1d83210d78c4152bd329b765'James Almer2017-03-23
|\| | | | | | | | | | | | | * 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-16
| | | | | | | | | | | | | | 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-23
|\| | | | | | | | | | | | | * 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-16
| | | | | | | | | | This is more consistent with the rest of libav and frees up the hevc.h name for decoder-independent shared declarations.
* | avcodec/hevc_parser: export framerate, remove one dependency on the decoderMichael Niedermayer2017-02-14
| | | | | | | | | | | | Fixes Ticket6090 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | hevc: Return stream format information from parserMark Thompson2016-10-31
| |
* | avcodec/h2645: Fix NAL unit paddingMichael Niedermayer2016-08-18
| | | | | | | | | | | | | | | | | | The parser changes have lost the support for the needed padding, this adds it back Fixes out of array reads Fixes: 03ea21d271abc8acf428d42ace51d8b4/asan_heap-oob_3358eef_5692_16f0cc01ab5225e9ce591659e5c20e35.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | hevc: Fix memory leak related to a53_caption dataWill Kelleher2016-05-15
| | | | | | | | | | Signed-off-by: Will Kelleher <wkelleher@gogoair.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc_parser: fix packet_split function nameJames Almer2016-05-04
| | | | | | | | | | | | Fixes compilation of hevc_parser without hevc_decoder Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit 'b667252a41fbf5a3f6ea8c67fdbc03db3d748977'Derek Buitenhuis2016-04-26
|\| | | | | | | | | | | | | * commit 'b667252a41fbf5a3f6ea8c67fdbc03db3d748977': h2645_parse: add support for parsing h264 Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h2645_parse: add support for parsing h264Anton Khirnov2016-03-28
| |
* | Merge commit '8229eff4b7a98ae5d85bb75f3bb072781b4a8ebe'Derek Buitenhuis2016-04-26
|\| | | | | | | | | | | | | * commit '8229eff4b7a98ae5d85bb75f3bb072781b4a8ebe': h2645_parse: add a function for uninitializing the packet Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h2645_parse: add a function for uninitializing the packetAnton Khirnov2016-03-28
| |
* | Merge commit 'fa936a307f5cddfc2664600157a8207ca8080af6'Derek Buitenhuis2016-04-26
|\| | | | | | | | | | | | | * commit 'fa936a307f5cddfc2664600157a8207ca8080af6': hevc_parse: rename into h2645_parse Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * hevc_parse: rename into h2645_parseAnton Khirnov2016-03-28
| | | | | | | | This code will be shared with h264.
* | lavc/hevc_parse: Don't take a HEVCContextDerek Buitenhuis2016-04-25
| | | | | | | | | | | | | | It's not even used anymore, and the checks are no longer functionally important. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | lavc: use get_bitsz to simplify the codeAndreas Cadhalpun2016-01-03
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avcodec/hevc_parser: Check init_get_bits8() for failureMichael Niedermayer2015-09-04
| | | | | | | | | | | | Fixes: CID1322322 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc_parser: fix split function of parserRainer Hochecker2015-09-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc_parser: Treat extradata parsing differently, as it should not ↵Michael Niedermayer2015-07-19
| | | | | | | | | | | | | | | | contain an AU Fixes ticket4718 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc_parser: Fix memleaks in parser mixMichael Niedermayer2015-07-13
| | | | | | | | | | Found-by: jamrial Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc_parser: use the old parser only when hevc decoder is availableJames Almer2015-07-13
| | | | | | | | | | | | | | If it's not, then the new dependence-free parser will be used instead Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/hevc_parser: Reenable the old parser under ADVANCED_PARSER defineMichael Niedermayer2015-07-13
| | | | | | | | | | | | | | Feel free to use either, they both work but the old one provides more information but needs the hevc decoder Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '650060dfb665552442ec11b456660e3e9a9d9016'Michael Niedermayer2015-07-13
|\| | | | | | | | | | | | | | | | | | | | | * commit '650060dfb665552442ec11b456660e3e9a9d9016': hevc_parser: parse and export some stream parameters Conflicts: configure libavcodec/hevc_parser.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * hevc_parser: parse and export some stream parametersAnton Khirnov2015-07-12
| | | | | | | | | | Particularly those that will be needed by the QSV decoder. More can be added later as necessary.
* | avcodec/hevc: Simplify skipped_bytes_pos code furtherMichael Niedermayer2015-07-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0'Michael Niedermayer2015-07-12
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0': hevc: move splitting the packet into NALUs into a separate function Conflicts: libavcodec/hevc.c libavcodec/hevc.h libavcodec/hevc_parse.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2'Michael Niedermayer2015-07-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2': 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>