From: Zhao Zhili <zhiliz...@tencent.com> This is a POC for adding hevc alpha layer decoding support. I'd like to know:
1. Is there any plan/interesting to add fullly support inside our hevc decoder? If the answer is yes, then the patchset is less useful. 2. What does the current method break? 3. Any idea to improve the method? It's kind of missing the point of hevc multi-layer extension to use multiple decoder instances. It's not easy to use. 1. Don't drop nal->nuh_layer_id > 0 until decoder. 2. Make hevcdec able to decode a selected layer. 3. Make hevc_metadata bsf able to extract a selected layer. Now it's able to use two decoders to decode the base layer and alpha layer, and then combine the results, e.g., ./ffmpeg -i alpha.mp4 \ -strict -2 -nuh_layer_id 1 -i alpha.mp4 \ -frames 60 \ -filter_complex '[0:v][1:v]alphamerge[vout]' \ -map '[vout]' -an test-%d.png It only works with software decoder. hevc_metadata can be used together with hardware decoder. The following example is how to extract the alpha layer and rewrite as base layer: ./ffmpeg -i alpha.mp4 \ -an -c:v copy \ -bsf:v hevc_metadata=nuh_layer_id=1 \ test.mp4 Zhao Zhili (4): avcodec/hevc_parse: keep nal->nuh_layer_id > 0 avcodec/cbs_h2645: keep nal->nuh_layer_id > 0 avcodec/hevcdec: add nuh_layer_id option avcodec/h265_metadata_bsf: add nuh_layer_id option doc/bitstream_filters.texi | 5 +++++ libavcodec/cbs_h2645.c | 3 --- libavcodec/h265_metadata_bsf.c | 25 +++++++++++++++++++++++++ libavcodec/hevc_parse.c | 2 -- libavcodec/hevcdec.c | 20 +++++++++++++++++++- libavcodec/version.h | 2 +- 6 files changed, 50 insertions(+), 7 deletions(-) -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".