[FFmpeg-devel] [PATCH 04/11] avformat/hevc: don't write NALUs with nuh_layer_id > 0 in hvcC boxes

James Almer jamrial at gmail.com
Sun Jul 7 19:09:32 EEST 2024


On 7/7/2024 12:46 PM, Andreas Rheinhardt wrote:
> James Almer:
>> hvcC should only contain nuh_layer_id == 0 NALUs. Support for a box meant to
>> contain higher layer NALUs will be added in a following patch.
>> To achieve this, all sources are parsed and filtered, including hvcC source
>> that until now were propagated untouched. This is reflected in how the affected
>> reference files now have ps_array_completeness set to 0 instead of 1 for some
>> non-PS NALUs.
> 
> Was the earlier stuff wrong?

Probably, but it's unlikely that any nuh_layer_id > 0 NALU was ever 
written as it would have required either a broken isobmff source (where 
such NALUs were wrongly put in hvcC for us to then blindly copy), or a 
raw multilayer annex-b source.

> 
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>   libavformat/hevc.c                         | 140 ++++++++++++++++-----
>>   libavformat/hevc.h                         |   3 +-
>>   tests/ref/fate/enhanced-flv-hevc           |   4 +-
>>   tests/ref/fate/matroska-dovi-write-config8 |   4 +-
>>   tests/ref/lavf-fate/hevc.flv               |   2 +-
>>   5 files changed, 118 insertions(+), 35 deletions(-)
>>
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list