[FFmpeg-devel] [PATCH] lavc/h2645_parse: Don't automatically remove nuh_layer_id > 0 packets
James Almer
jamrial at gmail.com
Mon Dec 2 05:10:48 EET 2019
On 12/2/2019 12:07 AM, James Almer wrote:
> On 12/1/2019 11:48 PM, Andriy Gelman wrote:
>> From: Andriy Gelman <andriy.gelman at gmail.com>
>>
>> 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 bsf where such packets are
>> currently not supported.
>> ---
>> libavcodec/cbs_h2645.c | 3 +++
>> libavcodec/h2645_parse.c | 7 +++----
>> libavcodec/h2645_parse.h | 5 +++++
>> libavcodec/hevc_parse.c | 2 ++
>> libavcodec/hevc_parser.c | 2 ++
>> libavcodec/hevcdec.c | 2 +-
>> 6 files changed, 16 insertions(+), 5 deletions(-)
>
> Missing changes to extract_extradata_bsf.
Actually, probably not. Skipping them there may result in lost data in
the output packet.
More information about the ffmpeg-devel
mailing list