summaryrefslogtreecommitdiff
path: root/libavcodec/h2645_parse.h
Commit message (Collapse)AuthorAge
* avcodec/h2645_parse: Move ref_idc further up in H2645NALAndreas Rheinhardt2021-12-16
| | | | | | | | This puts it directly near the NALU type which is more natural and furthermore reduces the size of the structure because it can be placed in padding (on 64-bit systems). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h2645_parse: Remove H2645NAL.rbsp_bufferAndreas Rheinhardt2021-12-16
| | | | | | | | | | Forgotten in 03b82b3ab9883cef017e513c7d0b3b986b3b3e7b. (Moving data to the front is only done to make existing initializations like H2645NAL nal = { NULL } not emit int->pointer conversion warnings.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove/replace some unnecessary avcodec.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | Also remove other unnecessary headers and include headers directly while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* 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>
* avcodec/h2645_parse: Use av_fast_realloc() for nals arrayMichael Niedermayer2019-10-06
| | | | | | | | | Fixes: Timeout (17sec ->281ms) Fixes: 17833/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5638346914660352 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>
* 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>
* cbs_h2645: Avoid memcpy when splitting fragmentAndreas Rheinhardt2018-11-22
| | | | | | | | | | | | Now memcpy is avoided for NAL units that don't contain 0x03 escape characters. Improves performance of cbs_h2645_fragment_add_nals from 36940 decicycles to 6364 decicycles based on 8 runs with a 5.1 Mb/s H.264 sample (262144 runs each). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* h2645_parse: Allocate a single buffer per packetKieran Kunhya2017-11-04
| | | | | Drastically reduces memory usage on pathological streams. Fixes ticket #6789
* Merge commit '61bd0ed781b56eea1e8e851aab34a2ee3b59fbac'Hendrik Leppkes2016-11-17
|\ | | | | | | | | | | | | * commit '61bd0ed781b56eea1e8e851aab34a2ee3b59fbac': h264: Log more information about invalid NALu size Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | avcodec/h264_parser: Factor get_avc_nalsize() outMichael Niedermayer2016-08-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | 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>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '90ed6c5cf7f236bc9efb47c97b40358c666d1386'Derek Buitenhuis2016-04-26
|\| | | | | | | | | | | | | * commit '90ed6c5cf7f236bc9efb47c97b40358c666d1386': h2645_parse: compute the actual data length, without trailing paddding Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h2645_parse: compute the actual data length, without trailing padddingAnton Khirnov2016-03-28
| | | | | | | | This is required by h264.
* | 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 '52ec149fbee57b6ca817049c9706212a0774a32c'Derek Buitenhuis2016-04-26
|\| | | | | | | | | | | | | * commit '52ec149fbee57b6ca817049c9706212a0774a32c': h2645_parse: change the AVCodecContext* parameter to void* Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h2645_parse: change the AVCodecContext* parameter to void*Anton Khirnov2016-03-28
| | | | | | | | | | This should make it more clear that it is not supposed to be used for anything except logging.
* | 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.